/* Phone input states */
#studentPhone.phone-valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}
#studentPhone.phone-invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Progress bar complete */
#phoneProgress.progress-complete {
    background: linear-gradient(90deg, #10b981, #059669);
}

/* Modal entrance */
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-animate {
    animation: modalSlideUp 0.3s ease-out forwards;
}

/* Smooth backdrop */
#modalBackdrop.show {
    opacity: 1;
}

/* Button loading state — show text alongside spinner */
#submitBtn.loading #btnArrow { display: none; }
#submitBtn.loading #btnLoader { display: inline-flex; }

/* Toast slide */
#toast.show {
    opacity: 1;
    transform: translate(-50%, -12px);
    pointer-events: auto;
}

/* ── Mobile-first: form card above info ── */
@media (max-width: 1023px) {
    .grid > .form-card { order: -1; }
}

/* ── Badge glow animation ── */
@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); }
    50%      { box-shadow: 0 4px 24px rgba(79, 70, 229, 0.55); }
}
.badge-glow {
    animation: badgeGlow 2.5s ease-in-out infinite;
}

/* ── OTP section slide-down animation ── */
.otp-section-anim {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.45s ease, opacity 0.35s ease, margin-top 0.35s ease;
}
.otp-section-anim.open {
    max-height: 280px;
    opacity: 1;
    margin-top: 1.25rem;
}

/* ── Input dimming transition ── */
#studentName, #studentPhone {
    transition: opacity 0.3s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* ── OTP individual digit boxes ── */
.otp-box {
    flex: none;
    width: 44px;
    height: 52px;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}
.otp-box::-webkit-inner-spin-button,
.otp-box::-webkit-outer-spin-button { display: none; }
.otp-box:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
    background: #fff;
}
.otp-box.filled {
    border-color: #10b981;
    background: #f0fdf4;
}
@media (min-width: 640px) {
    .otp-box { width: 48px; height: 56px; font-size: 1.4rem; }
}

/* ── FAQ accordion ── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.faq-item.open .faq-answer {
    max-height: 200px;
}
.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

/* ── Step indicator completed check ── */
.step-done {
    background: #10b981 !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3) !important;
}
