/**
 * Contact Form 7 Custom Styling
 * Countryman Academy WordPress Theme
 *
 * @package Countryman
 * @since 1.0.0
 */

/* ══════════════════════════════════════════════════════════════
   CONTACT FORM CONTAINER
   ══════════════════════════════════════════════════════════════ */

.countryman-contact-form {
    max-width: 100%;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   FORM FIELDS - Glass-morphism Style
   ══════════════════════════════════════════════════════════════ */

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Textarea specific */
.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* ══════════════════════════════════════════════════════════════
   SUBMIT BUTTON
   ══════════════════════════════════════════════════════════════ */

.wpcf7-form input[type="submit"] {
    width: auto;
    min-width: 200px;
    padding: 0.75rem 2rem;
    background-color: #6e2a30;
    color: #ffffff;
    font-weight: 600;
    border: 1px solid #6e2a30;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.wpcf7-form input[type="submit"]:hover {
    background-color: #6e2a30;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.wpcf7-form input[type="submit"]:active {
    transform: scale(0.98);
}

/* ══════════════════════════════════════════════════════════════
   VALIDATION & ERROR MESSAGES
   ══════════════════════════════════════════════════════════════ */

.wpcf7-not-valid-tip {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.wpcf7-not-valid {
    border-color: #ff6b6b !important;
}

.wpcf7-response-output {
    border: none !important;
    padding: 1rem 1.5rem !important;
    margin: 1rem 0 0 0 !important;
    border-radius: 0.5rem !important;
    font-size: 0.95rem !important;
}

.wpcf7-mail-sent-ok {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border-left: 4px solid #10b981 !important;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border-left: 4px solid #ef4444 !important;
}

.wpcf7-spam-blocked {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    border-left: 4px solid #f59e0b !important;
}

/* ══════════════════════════════════════════════════════════════
   LOADING STATE
   ══════════════════════════════════════════════════════════════ */

.wpcf7-form.submitting input[type="submit"] {
    opacity: 0.7;
    cursor: not-allowed;
}

.wpcf7-spinner {
    visibility: visible;
    opacity: 1;
    margin-left: 10px;
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .wpcf7-form input[type="submit"] {
        width: auto;
        min-width: 200px;
    }
}

/* ══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════════════════════ */

.wpcf7-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-weight: 500;
}

.screen-reader-response {
    position: absolute;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
}

/* ══════════════════════════════════════════════════════════════
   HONEYPOT FIELD (Hidden spam protection)
   ══════════════════════════════════════════════════════════════ */

.wpcf7-form .wpcf7-form-control.wpcf7-text.wpcf7-validates-as-required[aria-required="true"][aria-invalid="false"] {
    /* Let honeypot fields remain hidden */
}

.wpcf7-form .hp-field {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   GRID LAYOUT FOR PAIRED FIELDS
   ══════════════════════════════════════════════════════════════ */

.countryman-contact-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

/* Full-width fields */
.wpcf7-form-control-wrap.full-width {
    grid-column: 1 / -1;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .countryman-contact-form {
        grid-template-columns: 1fr;
    }
}
