/* =========================================================
   Student WhatsApp Contact Form
   ========================================================= */

.student-contact-form {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}


/* ---------------------------------------------------------
   Inner
   --------------------------------------------------------- */

.student-contact-form-inner {
    width: 100%;
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.student-contact-form-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.25rem;
    background: var(--color-primary);
    color: var(--color-white);
}

.student-contact-form-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    font-size: 1.2rem;
}

.student-contact-form-heading {
    min-width: 0;
}

.student-contact-form-heading h2 {
    margin: 0;
    color: var(--color-white);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.student-contact-form-heading p {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   Form Area
   --------------------------------------------------------- */

.student-contact-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}


/* ---------------------------------------------------------
   Field
   --------------------------------------------------------- */

.student-form-field {
    width: 100%;
}

.student-form-field label {
    display: block;
    margin: 0 0 0.4rem;
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

.student-form-field label span {
    color: var(--color-secondary);
}


/* ---------------------------------------------------------
   Input Wrapper
   --------------------------------------------------------- */

.student-form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.student-form-input-wrap > i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 0.82rem;
    pointer-events: none;
}


/* ---------------------------------------------------------
   Inputs
   --------------------------------------------------------- */

.student-form-input-wrap input,
.student-form-input-wrap textarea {
    width: 100%;
    margin: 0;
    padding: 0.72rem 0.85rem 0.72rem 2.45rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    line-height: 1.5;
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

.student-form-input-wrap input::placeholder,
.student-form-input-wrap textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.75;
}

.student-form-input-wrap input:hover,
.student-form-input-wrap textarea:hover {
    border-color: var(--color-text-muted);
}

.student-form-input-wrap input:focus,
.student-form-input-wrap textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(53, 104, 89, 0.1);
}


/* ---------------------------------------------------------
   Textarea
   --------------------------------------------------------- */

.student-form-textarea-wrap {
    align-items: flex-start;
}

.student-form-textarea-wrap > i {
    top: 0.9rem;
    transform: none;
}

.student-form-input-wrap textarea {
    min-height: 120px;
    resize: vertical;
}


/* ---------------------------------------------------------
   Validation Error
   --------------------------------------------------------- */

.student-form-error {
    display: block;
    min-height: 0;
    margin-top: 0.3rem;
    color: #b42318;
    font-size: 0.75rem;
    line-height: 1.4;
}

.student-form-input-wrap.is-invalid input,
.student-form-input-wrap.is-invalid textarea {
    border-color: #b42318;
}

.student-form-input-wrap.is-invalid > i {
    color: #b42318;
}


/* ---------------------------------------------------------
   Message Counter
   --------------------------------------------------------- */

.student-form-field-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.student-form-counter {
    flex: 0 0 auto;
    margin-top: 0.3rem;
    color: var(--color-text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   WhatsApp Submit Button
   --------------------------------------------------------- */

.student-whatsapp-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 48px;
    margin: 0.25rem 0 0;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.student-whatsapp-submit i {
    font-size: 1.15rem;
}

.student-whatsapp-submit:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(53, 104, 89, 0.18);
}

.student-whatsapp-submit:active {
    transform: translateY(1px);
}

.student-whatsapp-submit:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

.student-whatsapp-submit.is-sending {
    pointer-events: none;
    opacity: 0.7;
}


/* ---------------------------------------------------------
   Privacy Note
   --------------------------------------------------------- */

.student-contact-form-note {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.student-contact-form-note i {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    font-size: 0.68rem;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 640px) {

    .student-contact-form-header {
        padding: 1rem;
    }

    .student-contact-form-fields {
        padding: 1rem;
    }

    .student-contact-form-icon {
        flex-basis: 2.25rem;
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.05rem;
    }

    .student-contact-form-heading h2 {
        font-size: 1rem;
    }

    .student-contact-form-heading p {
        font-size: 0.78rem;
    }

    .student-whatsapp-submit {
        min-height: 46px;
    }
}


/* ---------------------------------------------------------
   Reduced Motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .student-form-input-wrap input,
    .student-form-input-wrap textarea,
    .student-whatsapp-submit {
        transition: none;
    }
}