/* ============================================================
 * UI / Forgot Password  (Content/admin/css/ui/forgot-password.css)
 *
 * Modernized forgot-password + confirmation pages. Scoped via
 * body.ui-forgot-password so it never leaks into legacy pages
 * sharing _LoginLayout. Loaded LAST in the adminlogin bundle to
 * win specificity vs. light-theme.css, bootstrap-extended.css.
 * ============================================================ */

body.ui-forgot-password,
body.ui-forgot-password * {
    box-sizing: border-box;
}

body.ui-forgot-password {
    margin: 0 !important;
    padding: 0 !important;
    background: #0f172a !important;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    overflow: hidden;
}

    /* Neutralize layout chrome */
    body.ui-forgot-password #container-login {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.ui-forgot-password #login-footer,
    body.ui-forgot-password .spacer-40,
    body.ui-forgot-password .spacer-15,
    body.ui-forgot-password .spacer-10,
    body.ui-forgot-password .spacer-5 {
        display: none !important;
    }

    /* ----- wrapper / fullscreen background ----- */

    body.ui-forgot-password .ui-forgot-password {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
    }

    body.ui-forgot-password .ui-forgot-password__bg {
        position: absolute !important;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        transition: opacity 0.35s ease;
        z-index: 0;
    }

        body.ui-forgot-password .ui-forgot-password__bg.is-fading {
            opacity: 0;
        }

    body.ui-forgot-password .ui-forgot-password__overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(2, 6, 23, 0.55), rgba(15, 23, 42, 0.35));
        z-index: 1;
    }

    /* ----- card ----- */

    body.ui-forgot-password .ui-forgot-password__card {
        position: relative;
        z-index: 2;
        width: 100%;
        max-width: 420px;
        margin: 16px;
        padding: 40px 36px 32px;
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45), 0 2px 6px rgba(2, 6, 23, 0.08);
        text-align: left;
        overflow: hidden;
        animation: uiForgotPasswordIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

        body.ui-forgot-password .ui-forgot-password__card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #2563eb, #7c3aed, #2563eb);
            background-size: 200% 100%;
        }

    body.ui-forgot-password .ui-forgot-password__card--confirmation {
        text-align: center;
        padding-top: 32px;
    }

@keyframes uiForgotPasswordIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.ui-forgot-password .ui-forgot-password__brand {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-align: center;
}

body.ui-forgot-password .ui-forgot-password__title {
    margin: 0 0 24px;
    font-size: 14px;
    color: #64748b;
    text-align: center;
    line-height: 1.4;
}

/* ----- segmented control (phone / email toggle) ----- */

body.ui-forgot-password .ui-forgot-password__toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 22px;
    background: #f1f5f9;
    border-radius: 12px;
}

body.ui-forgot-password .ui-forgot-password__toggle-option {
    flex: 1 1 50%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    body.ui-forgot-password .ui-forgot-password__toggle-option i {
        width: auto !important;
        font-size: 13px;
    }

    body.ui-forgot-password .ui-forgot-password__toggle-option:hover:not(.is-active) {
        color: #334155;
    }

    body.ui-forgot-password .ui-forgot-password__toggle-option.is-active {
        background: #ffffff;
        color: #2563eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    body.ui-forgot-password .ui-forgot-password__toggle-option input[type="radio"] {
        position: absolute !important;
        opacity: 0 !important;
        pointer-events: none;
        width: 1px;
        height: 1px;
    }

/* ----- form fields ----- */

body.ui-forgot-password .ui-forgot-password__field {
    margin-bottom: 18px;
}

body.ui-forgot-password .ui-forgot-password__label {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

body.ui-forgot-password .ui-forgot-password__input,
body.ui-forgot-password .ui-forgot-password__input.form-control,
body.ui-forgot-password input.ui-forgot-password__input {
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    padding: 12px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

    body.ui-forgot-password .ui-forgot-password__input:focus,
    body.ui-forgot-password .ui-forgot-password__input.form-control:focus {
        border-color: #2563eb !important;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
        outline: none !important;
    }

    body.ui-forgot-password .ui-forgot-password__input::placeholder {
        color: #94a3b8;
    }

body.ui-forgot-password .ui-forgot-password__error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: #b91c1c;
}

/* ----- submit button ----- */

body.ui-forgot-password .ui-forgot-password__submit,
body.ui-forgot-password button.ui-forgot-password__submit,
body.ui-forgot-password a.ui-forgot-password__submit {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    height: 48px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-align: center !important;
    text-decoration: none !important;
    transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

    body.ui-forgot-password .ui-forgot-password__submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(37, 99, 235, 0.55) !important;
        color: #ffffff !important;
    }

    body.ui-forgot-password .ui-forgot-password__submit:active {
        transform: translateY(0);
    }

    body.ui-forgot-password .ui-forgot-password__submit[disabled] {
        opacity: 0.65;
        cursor: wait;
    }

    body.ui-forgot-password .ui-forgot-password__submit i {
        width: auto !important;
        font-size: 13px;
    }

/* ----- back link ----- */

body.ui-forgot-password .ui-forgot-password__back {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 18px auto 0;
    padding: 6px 12px;
    color: #64748b !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
    width: fit-content;
}

    body.ui-forgot-password .ui-forgot-password__back:hover {
        color: #2563eb !important;
        background: rgba(37, 99, 235, 0.08);
    }

    body.ui-forgot-password .ui-forgot-password__back i {
        width: auto !important;
        font-size: 11px;
    }

body.ui-forgot-password .ui-forgot-password__card:not(.ui-forgot-password__card--confirmation) {
    text-align: center;
}

    body.ui-forgot-password .ui-forgot-password__card:not(.ui-forgot-password__card--confirmation) .ui-forgot-password__form,
    body.ui-forgot-password .ui-forgot-password__card:not(.ui-forgot-password__card--confirmation) .ui-forgot-password__field {
        text-align: left;
    }

/* ----- success icon (confirmation page) ----- */

body.ui-forgot-password .ui-forgot-password__success-icon {
    margin: 8px auto 20px;
    width: 72px;
    height: 72px;
}

    body.ui-forgot-password .ui-forgot-password__success-icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }

body.ui-forgot-password .ui-forgot-password__success-circle {
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: uiForgotPasswordCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.15s forwards;
}

body.ui-forgot-password .ui-forgot-password__success-check {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: uiForgotPasswordCheck 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.65s forwards;
}

@keyframes uiForgotPasswordCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes uiForgotPasswordCheck {
    to {
        stroke-dashoffset: 0;
    }
}

body.ui-forgot-password .ui-forgot-password__message {
    margin: 0 0 26px;
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

body.ui-forgot-password .ui-forgot-password__submit--link {
    margin-top: 8px;
}

/* ----- carousel nav (same look as Login) ----- */

body.ui-forgot-password .ui-forgot-password__nav {
    position: absolute;
    z-index: 3;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent !important;
}

body.ui-forgot-password .ui-forgot-password__arrow,
body.ui-forgot-password button.ui-forgot-password__arrow {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
    box-shadow: none !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    body.ui-forgot-password .ui-forgot-password__arrow:hover {
        background: rgba(255, 255, 255, 0.22) !important;
        border-color: rgba(255, 255, 255, 0.35) !important;
        color: #ffffff !important;
    }

    body.ui-forgot-password .ui-forgot-password__arrow:active {
        transform: scale(0.92);
    }

/* ----- footer ----- */

body.ui-forgot-password .ui-forgot-password__footer {
    position: absolute;
    z-index: 3;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    line-height: 1.5;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    padding: 0 16px;
}

    body.ui-forgot-password .ui-forgot-password__footer strong {
        display: block;
        font-weight: 600;
        font-size: 12px;
    }

    body.ui-forgot-password .ui-forgot-password__footer a {
        color: #ffffff !important;
        text-decoration: none !important;
        pointer-events: auto;
        border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
        padding-bottom: 1px;
    }

        body.ui-forgot-password .ui-forgot-password__footer a:hover {
            border-bottom-color: #ffffff;
            color: #ffffff !important;
        }

    body.ui-forgot-password .ui-forgot-password__footer small {
        display: block;
        margin-top: 2px;
        opacity: 0.8;
        font-size: 11px;
    }

/* ----- responsive ----- */

@media (max-width: 480px) {
    body.ui-forgot-password .ui-forgot-password__card {
        padding: 32px 24px 28px;
        border-radius: 14px;
    }

    body.ui-forgot-password .ui-forgot-password__nav {
        bottom: 56px;
    }

    body.ui-forgot-password .ui-forgot-password__footer {
        bottom: 12px;
        font-size: 10px;
    }
}
