﻿/* ==========================================================================
   Forgot Password Page & Error Modal Styles
   Matches Login Card Aesthetics & Account Modal Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page Layout & Card
   -------------------------------------------------------------------------- */
.forgot-card,
.reset-card {
    aspect-ratio: 1440 / 616;
    width: 100%;
    background-image: url("../img/banners/banner-login.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.forgot-box,
.reset-box {
    font-size: 1rem;
    width: 100%;
    max-width: 48em;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 1.6em;
    border-radius: 1.6em;
    padding: 3.2em;
    background-color: var(--neutral-1, #FFFFFF);
    box-shadow: 0.6rem 0.6rem 5.4em 0 rgba(0, 0, 0, 0.05);
}

.forgot-header,
.reset-header {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 0.6em;
    width: 100%;
    color: var(--brand-1, #006E45);
}

.forgot-header > h2,
.reset-header > h2 {
    font-size: 2.2em;
    font-weight: 600;
    line-height: 1.25;
    color: var(--brand-1, #006E45);
    margin: 0;
}

.forgot-header > p,
.reset-header > p {
    font-size: 1.3em;
    font-weight: 400;
    line-height: 1.5;
    color: var(--neutral-12, #6B6868);
    margin: 0;
}

/* --------------------------------------------------------------------------
   2. Form Controls & Inputs
   -------------------------------------------------------------------------- */
.forgot_form,
.reset_form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.6em;
    width: 100%;
}

.forgot_group,
.reset_group {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    width: 100%;
}

.forgot_group > label,
.reset_group > label {
    font-size: 1.3em;
    font-weight: 500;
    color: var(--neutral-9, #3C3C3C);
}

.forgot_input,
.reset_input {
    position: relative;
    font-size: 1rem;
    width: 100%;
    height: 4em;
    border: 1px solid var(--neutral-7, #E5E5E5);
    border-radius: 0.8em;
    padding-left: 4em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--neutral-1, #FFFFFF);
}

.reset_input--has-eye input {
    padding-right: 3.2em !important;
}

.forgot_input > svg,
.reset_input > svg:not(.icon_eye) {
    position: absolute;
    top: 50%;
    left: 1.2em;
    transform: translateY(-50%);
    width: 2em;
    height: 2em;
    fill: #C3C2C2;
    pointer-events: none;
}

.forgot_input input,
.reset_input input {
    font-size: 1.3em;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background-color: transparent;
    padding-right: 0.5em;
    color: var(--neutral-9, #3C3C3C);
}

.forgot_input input::placeholder,
.reset_input input::placeholder {
    color: var(--neutral-9, #3C3C3C);
    opacity: 0.5;
}

.forgot_input:focus-within,
.reset_input:focus-within {
    border-color: var(--brand-1, #006E45);
    box-shadow: 0 0 0 2px rgba(0, 110, 69, 0.15);
}

.forgot_input.is_invalid,
.reset_input.is_invalid {
    border-color: var(--secondary-5, #E8241B) !important;
    box-shadow: 0 0 0 2px rgba(232, 36, 27, 0.15) !important;
}

.forgot_error_msg,
.reset_error_msg {
    display: none;
    align-items: center;
    gap: 0.6em;
    font-size: 1.2em;
    color: var(--secondary-5, #E8241B);
    line-height: 1.4;
    animation: fadeInError 0.2s ease-in-out;
}

.forgot_error_msg.show,
.reset_error_msg.show {
    display: flex;
}

.forgot_error_msg svg,
.reset_error_msg svg {
    flex-shrink: 0;
    width: 1.4em;
    height: 1.4em;
}

/* Password Toggle Eye */
.reset_eye {
    font-size: 1rem;
    position: absolute;
    top: 50%;
    right: 1em;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 2em;
    height: 2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    color: var(--neutral-11, #A0AEC0);
    transition: color 0.2s ease;
}

.reset_eye svg {
    width: 2em;
    height: 2em;
    color: inherit;
}

.reset_eye:hover,
.reset_eye.show {
    color: var(--neutral-9, #2D3748);
}

.reset_eye .icon_eye_on {
    display: none;
}

.reset_eye .icon_eye_off {
    display: block;
}

.reset_eye.is_visible .icon_eye_off,
.reset_eye.show .icon_eye_off {
    display: none;
}

.reset_eye.is_visible .icon_eye_on,
.reset_eye.show .icon_eye_on {
    display: block;
}

/* --------------------------------------------------------------------------
   3. Buttons & Footer Links
   -------------------------------------------------------------------------- */
.forgot_submit,
.reset_submit {
    position: relative;
    font-size: 1.4em;
    font-weight: 600;
    width: 100%;
    height: 3.2em;
    background-color: var(--brand-1, #006E45);
    color: var(--neutral-1, #FFFFFF);
    border: none;
    border-radius: 0.7em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s;
    margin-top: 0.4em;
}

.forgot_submit:not(:disabled):hover,
.reset_submit:not(:disabled):hover {
    background-color: #025737;
    transform: translateY(-1px);
}

.forgot_submit:disabled,
.reset_submit:disabled {
    opacity: 0.5;
    background-color: #94A3B8 !important;
    color: #FFFFFF !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.forgot_footer,
.reset_footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 0.8em;
}

.forgot_back_link,
.reset_back_link {
    font-size: 1.3em;
    font-weight: 500;
    color: var(--brand-1, #006E45);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    transition: color 0.15s ease;
}

.forgot_back_link:hover,
.reset_back_link:hover {
    text-decoration: underline;
    color: #025737;
}

/* --------------------------------------------------------------------------
   4. State 2: Check Your Email (Success Container)
   -------------------------------------------------------------------------- */
#forgot_success_state {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2em;
}

#forgot_success_state.is_active {
    display: flex;
}

.forgot_success_banner {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.2rem;
    gap: 1rem;
    width: 100%;
    min-height: 5.8rem;
    background: #F8FAF8;
    mix-blend-mode: normal;
    border-radius: 1rem;
    box-sizing: border-box;
    align-self: stretch;
}

.forgot_success_icon {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 1.163rem;
    width: 3.8rem;
    height: 3.8rem;
    background: #FFFFFF;
    box-shadow: 0 0.19rem 0.543rem rgba(103, 99, 99, 0.05);
    border-radius: 1rem;
    flex: none;
    order: 0;
    flex-grow: 0;
    flex-shrink: 0;
}

.forgot_success_icon svg {
    width: 2rem;
    height: 2rem;
    display: block;
    flex-shrink: 0;
}

.forgot_success_content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
    order: 1;
    flex-grow: 1;
}

.forgot_success_text {
    font-style: normal;
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.8rem;
    display: flex;
    align-items: center;
    color: #024A2F;
    align-self: stretch;
    margin: 0;
}

.forgot_resend_text {
    font-size: 1.3em;
    color: var(--neutral-12, #6B6868);
    text-align: center;
    width: 100%;
}

.forgot_resend_btn {
    background: transparent;
    border: none;
    color: var(--brand-1, #006E45);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot_resend_btn:hover {
    color: #025737;
}

.forgot_resend_btn:disabled {
    color: #A0A0A0;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   5. Password Validation Rules Checklist (For Reset Password)
   -------------------------------------------------------------------------- */
.pwd_rules_card {
    background-color: #F8F9FA;
    border-radius: 1.2rem;
    padding: 1.6rem 2rem;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.4rem;
}

.pwd_rules_title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1E293B;
}

.pwd_rules_list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.pwd_rule_item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.3rem;
    color: #64748B;
    transition: color 0.15s ease;
}

.pwd_rule_item.is_valid {
    color: var(--brand-1, #006E45);
}

.pwd_rule_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    color: #CBD5E1;
}

.pwd_rule_item.is_valid .pwd_rule_icon {
    color: var(--brand-1, #006E45);
}

/* --------------------------------------------------------------------------
   5b. Reset Success Box (Screenshot 2: Password Updated Successfully)
   -------------------------------------------------------------------------- */
.reset_success_box {
    background-color: #F8F9FA;
    border-radius: 1.2rem;
    padding: 1.6rem 2rem;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.6rem;
}

.reset_success_icon_card {
    width: 4.4rem;
    height: 4.4rem;
    background: #FFFFFF;
    border-radius: 1rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reset_success_badge {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: #65A30D;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset_success_content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.reset_success_label {
    font-size: 1.45rem;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.reset_actions {
    width: 100%;
    margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   6. Notification Error Modal (Email Not Found)
   Exact Figma Design & Account Modal System
   -------------------------------------------------------------------------- */
/* Modal Overlay / Backdrop */
.auth_modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.auth_modal_overlay.show,
.auth_modal_overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Dialog */
.auth_modal_dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    width: 40rem;
    max-width: calc(100vw - 3.2rem);
    min-height: 25.8rem;
    background: #FFFFFF;
    border-radius: 1.6rem;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    overflow: hidden;
    transform: scale(0.92) translateY(1.2rem);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth_modal_overlay.show .auth_modal_dialog,
.auth_modal_overlay.active .auth_modal_dialog {
    transform: scale(1) translateY(0);
}

/* Button close X (Top-Right) */
.auth_modal_close_btn {
    position: absolute;
    width: 4.4rem;
    height: 4.4rem;
    right: 1.6rem;
    top: 1.6rem;
    border-radius: 0.8rem;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.15s ease;
}

.auth_modal_close_btn:hover {
    background-color: #F5F5F5;
}

.auth_modal_close_btn svg {
    width: 2rem;
    height: 2rem;
    stroke: #737373;
}

/* Modal Content (Header / Featured Icon / Text) */
.auth_modal_content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 2.4rem 2.4rem 0rem;
    gap: 1.6rem;
    width: 40rem;
    max-width: 100%;
    box-sizing: border-box;
    background: #FFFFFF;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    z-index: 0;
}

/* Featured Icon Circle */
.auth_modal_icon_wrap {
    width: 4.8rem;
    height: 4.8rem;
    background: #FEE4E2;
    border: 0.8rem solid #FEF3F2;
    border-radius: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
    flex-shrink: 0;
    position: relative;
}

.auth_modal_icon_wrap svg {
    width: 2rem;
    height: 2rem;
    color: #E8241B;
}

/* Text and Supporting Text Group */
.auth_modal_text_group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 0.4rem;
    width: 35.2rem;
    max-width: 100%;
    box-sizing: border-box;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
}

/* Title */
.auth_modal_title {
    width: 100%;
    font-style: normal;
    font-weight: 600;
    font-size: 1.8rem;
    line-height: 2.6rem;
    color: #3C3C3C;
    margin: 0;
    text-align: left;
}

/* Supporting Text */
.auth_modal_desc {
    width: 100%;
    font-style: normal;
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 2rem;
    color: #6B6868;
    margin: 0;
    text-align: left;
}

/* Modal Actions (Bottom Button Area) */
.auth_modal_actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 3.2rem 2.4rem 2.4rem;
    width: 40rem;
    max-width: 100%;
    box-sizing: border-box;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
}

/* Secondary Button (Close button) */
.auth_modal_btn_close {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 1.2rem 2rem;
    gap: 1rem;
    width: 100%;
    height: 4.4rem;
    background: #FFFFFF;
    border: 1px solid #006E45;
    border-radius: 1rem;
    font-style: normal;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 2rem;
    color: #006E45;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.15s ease, border-color 0.2s;
}

.auth_modal_btn_close:hover {
    background-color: #F8FAF8;
    transform: translateY(-0.1rem);
}

/* --------------------------------------------------------------------------
   7. Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .forgot-card,
    .reset-card {
        aspect-ratio: auto;
        min-height: 80vh;
        background-size: cover;
        padding: 4rem 1.6rem;
    }

    .forgot-box,
    .reset-box {
        padding: 2.4em 1.8em;
        max-width: 100%;
        border-radius: 1.2em;
    }

    .auth_modal_dialog {
        width: 100%;
        max-width: 36rem;
    }

    .auth_modal_content,
    .auth_modal_actions {
        width: 100%;
    }
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-0.3rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
