/* =============================================
   FORGOT PASSWORD MODAL (inline overlay)
   ============================================= */
.forgot-modal-overlay {
    --fm-teal:     #0E7274;
    --fm-teal-dark:#0A5A5C;
    --fm-red:      #E02424;
    --fm-link:     #0E7274;
}

.forgot-modal-overlay .modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    padding: 20px;
    animation: fadeIn .2s ease;
}

.forgot-modal-overlay .modal-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35), 0 4px 18px rgba(0,0,0,.15);
    padding: 20px 22px 20px;
    animation: cardIn .28s cubic-bezier(.2,.8,.3,1);
}

.forgot-modal-overlay .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}
.forgot-modal-overlay .modal-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--slate);
    letter-spacing: -.02em;
    line-height: 1.25;
}
.forgot-modal-overlay .modal-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    transition: background .15s;
    margin: -4px -4px 0 8px;
}
.forgot-modal-overlay .modal-close:hover { background: var(--slate-100); }
.forgot-modal-overlay .modal-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; fill: none; }

.forgot-modal-overlay .otp-subtext {
    font-size: 13.5px;
    color: var(--slate-500);
    margin-bottom: 12px;
    line-height: 1.4;
}

.forgot-modal-overlay .field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-500);
    margin-bottom: 4px;
}
.forgot-modal-overlay .field-group { margin-bottom: 10px; }
.forgot-modal-overlay .field-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--slate);
    border: 1.5px solid var(--slate-200);
    border-radius: 8px;
    outline: none;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.forgot-modal-overlay .field-input::placeholder { color: var(--slate-400); }
.forgot-modal-overlay .field-input:focus {
    border-color: var(--fm-teal);
    box-shadow: 0 0 0 3px rgba(14,114,116,.14);
}
.forgot-modal-overlay .field-input.invalid {
    border-color: var(--fm-red);
}
.forgot-modal-overlay .field-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(224,36,36,.14);
}

.forgot-modal-overlay .field-error {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fm-red);
}
.forgot-modal-overlay .field-error.show { display: flex; }
.forgot-modal-overlay .field-error svg { width: 14px; height: 14px; stroke: var(--fm-red); fill: none; stroke-width: 2; flex-shrink: 0; }

.forgot-modal-overlay .field-success {
    display: none;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 500;
    color: #059669;
}
.forgot-modal-overlay .field-success.show { display: flex; }
.forgot-modal-overlay .field-success svg { width: 14px; height: 14px; stroke: #059669; fill: none; stroke-width: 2; flex-shrink: 0; }

.forgot-modal-overlay .submit-btn {
    width: 100%;
    height: 42px;
    margin-top: 4px;
    background: var(--fm-teal);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    letter-spacing: .01em;
    transition: background .15s, transform .1s;
}
.forgot-modal-overlay .submit-btn:hover { background: var(--fm-teal-dark); }
.forgot-modal-overlay .submit-btn:active { transform: translateY(1px); }
.forgot-modal-overlay .submit-btn:disabled { opacity: .7; cursor: default; }

.forgot-modal-overlay .terms-text {
    margin-top: 14px;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--slate-500);
    text-align: center;
}
.forgot-modal-overlay .terms-text a {
    color: var(--fm-link);
    text-decoration: underline;
    font-weight: 600;
}

/* ============= RESPONSIVE — MOBILE (bottom sheet) ============= */
@media (max-width: 560px) {
    .forgot-modal-overlay .modal-backdrop { align-items: flex-end; padding: 0; }
    .forgot-modal-overlay .modal-card {
        max-width: 100%;
        max-height: calc(80vh - env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
        padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        animation: sheetIn .3s cubic-bezier(.2,.8,.3,1);
    }
    .forgot-modal-overlay .modal-card::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 3px;
        background: var(--slate-200);
    }
    .forgot-modal-overlay .modal-header { margin-top: 10px; }
    .forgot-modal-overlay .modal-title { font-size: 19px; }
}

@media (max-width: 360px) {
    .forgot-modal-overlay .modal-title { font-size: 18px; }
    .forgot-modal-overlay .field-input,
    .forgot-modal-overlay .submit-btn { font-size: 14px; }
}
