/* Contact Form 7 Custom Styling */
.wpcf7 form.unsubscribe-form {
    max-width: 600px;
    margin: 0 auto;
    font-family: "Segoe UI", Arial, sans-serif;
}

.wpcf7 form.unsubscribe-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

/* Row and Columns */
.wpcf7 form.unsubscribe-form .cf7-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.wpcf7 form.unsubscribe-form .cf7-col {
    flex: 1;
    min-width: 250px;
}

/* Inputs, Textarea, Captcha */
.wpcf7 form.unsubscribe-form input[type="text"],
.wpcf7 form.unsubscribe-form input[type="email"],
.wpcf7 form.unsubscribe-form input[type="tel"],
.wpcf7 form.unsubscribe-form textarea,
.wpcf7 form.unsubscribe-form input[type="number"],
.wpcf7 form.unsubscribe-form input[type="url"],
.wpcf7 form.unsubscribe-form input[type="password"],
.wpcf7 form.unsubscribe-form input[type="search"],
.wpcf7 form.unsubscribe-form input[type="date"],
.wpcf7 form.unsubscribe-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.wpcf7 form.unsubscribe-form input:focus,
.wpcf7 form.unsubscribe-form textarea:focus,
.wpcf7 form.unsubscribe-form select:focus {
    border-color: #0073e6;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.15);
    outline: none;
}

/* Textarea */
.wpcf7 form.unsubscribe-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Captcha Field */
.wpcf7 form.unsubscribe-form #input-captcha-cf7 {
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Submit Button */
.wpcf7 form.unsubscribe-form input[type="submit"] {
    background: #0073e6;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.wpcf7 form.unsubscribe-form input[type="submit"]:hover {
    background: #005bb5;
    transform: translateY(-2px);
}

.wpcf7 form.unsubscribe-form input[type="submit"]:active {
    background: #004999;
    transform: translateY(0);
}

/* Validation Errors */
.wpcf7 form.unsubscribe-form .wpcf7-not-valid-tip {
    color: #d93025;
    font-size: 13px;
    margin-top: 4px;
}

.wpcf7 form.unsubscribe-form .wpcf7-response-output {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

/* Success & Error messages */
.wpcf7 form.unsubscribe-form .wpcf7-mail-sent-ok {
    background: #e6f9f0;
    border: 1px solid #34c759;
    color: #065f46;
}

.wpcf7 form.unsubscribe-form .wpcf7-validation-errors,
.wpcf7 form.unsubscribe-form .wpcf7-acceptance-missing {
    background: #fef2f2;
    border: 1px solid #f87171;
    color: #7f1d1d;
}

/* Loading states */
.wpcf7 form.unsubscribe-form.form-loading {
    opacity: 0.8;
    pointer-events: none;
    position: relative;
}

.wpcf7 form.unsubscribe-form.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: 8px;
}

.wpcf7 form.unsubscribe-form input[type="submit"].loading {
    opacity: 0.7;
    cursor: not-allowed;
    background: #6c757d;
    color: #fff;
}

.wpcf7 form.unsubscribe-form .wpcf7-spinner {
    display: none;
    margin-left: 10px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073e6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.wpcf7 form.unsubscribe-form .wpcf7-spinner.show {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Field validation */
.wpcf7 form.unsubscribe-form .wpcf7-form-control-wrap.wpcf7-not-valid {
    border-color: #f87171;
}

.wpcf7 form.unsubscribe-form .wpcf7-form-control-wrap.wpcf7-not-valid input {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.wpcf7 form.unsubscribe-form .field-error {
    color: #d93025;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* Form container */
.unsubscribe-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unsubscribe-form-container {
        padding: 15px;
    }
    
    .wpcf7 form.unsubscribe-form input[type="text"],
    .wpcf7 form.unsubscribe-form input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}