/* ============================================================================
   gv-forgot-password.css
   Overrides and new components for the Forgot Password / Account Recovery page.
   gv-registration.css and gv-glass-button.css are loaded before this file.
   ============================================================================ */

/* --------------------------------------------------------------------------
   PAGE WRAPPER
   -------------------------------------------------------------------------- */
.gv-fp-page-wrapper {
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;

    /* Break out of WordPress content column to fill full viewport */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    box-sizing: border-box;
}

/* The existing .gv-reg-video-bg class handles the video background.
   Ensure it stacks correctly inside the FP wrapper. */
.gv-fp-page-wrapper .gv-reg-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.gv-fp-card {
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    background: linear-gradient(145deg, rgba(17, 25, 40, 0.65), rgba(17, 25, 40, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    width: 38em; 
    max-width: 90vw;
    min-height: 400px; /* Lock height to prevent jumping when errors show */
    padding: 3.5em 3.5em 3em; 
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Reset child elements */
.gv-fp-card * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------------------
   STEP TITLES & SUBTITLES
   -------------------------------------------------------------------------- */
.gv-fp-step-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 0.25em;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.gv-fp-step-subtitle {
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin-bottom: 1em; /* Increased spacing */
    line-height: 1.5;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   STEP VISIBILITY
   -------------------------------------------------------------------------- */
.gv-step-hidden {
    display: none !important;
}

/* Each step is relatively positioned so the absolute back button anchors to it */
/* Flex properties added to allow top/center/bottom alignment natively */
.gv-fp-step {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1; /* Take up absolute full height of the fixed height container */
    height: 100%;
}

/* This pushes the middle container down by absorbing 50% of free space */
.gv-fp-tabs-body,
.gv-fp-card .gv-otp-input-container,
#gv-fp-step-4 .gv-input-group:first-of-type {
    margin-top: auto;
}

/* Push footer away from input so input stays perfectly centered, and footer rests above button */
#gv-fp-step-3 .gv-otp-footer {
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   BACK BUTTON (Internal Step Return)
   -------------------------------------------------------------------------- */
.gv-fp-back-btn {
    position: absolute;
    top: -3em; /* Pull up into the padding space of the card */
    left: -2em;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    padding: 0.5em 1em 0.5em 0; /* Wider right pad for easier clicking */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.gv-fp-back-btn:hover {
    color: #fff;
    transform: translateX(-3px); /* Subtle shift to the left on hover */
}

/* --------------------------------------------------------------------------
   STEP ENTER ANIMATION  
   -------------------------------------------------------------------------- */
@keyframes gvFpStepIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gv-step-entering {
    animation: gvFpStepIn 0.35s ease forwards;
}

/* --------------------------------------------------------------------------
   MODERN SEGMENTED SWITCHER (Replaces Tabs)
   -------------------------------------------------------------------------- */
.gv-fp-switcher {
    position: relative;
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 999px;
    padding: 0.3em;
    margin: 0 auto 1em; /* Increased bottom spacing */
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gv-fp-switcher-bg {
    position: absolute;
    top: 0.3em;
    bottom: 0.3em;
    /* width is calculated dynamically by JS */
    width: 50%;
    left: 0.3em;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none; /* so clicks pass through to buttons */
}

.gv-fp-switch-btn {
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.6em 1.5em;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: inherit;
    border-radius: 999px;
    width: 7em;
    text-align: center;
}

.gv-fp-switch-btn.gv-active {
    color: #fff;
}

/* Base override for tabs body */
.gv-fp-tabs-body {
    position: relative;
    width: 100%;
}

.gv-fp-tab-content {
    display: block !important;
}

.gv-fp-tab-content.gv-step-hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   INPUT STYLES (inherit from gv-registration.css, minor adjustments)
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-input-group {
    position: relative;
    width: 100%;
    margin-bottom: 2em; /* Spread inputs more */
}

.gv-fp-card input[type="email"],
.gv-fp-card input[type="password"],
.gv-fp-card input[type="text"] {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.7em 0.9em 0.7em 45px;
    font-size: 0.9em;
    border-radius: 2em;
    width: 100%;
    height: 3em;
    outline: none;
    color: #fff;
    transition: all 0.3s ease;
    letter-spacing: 0.07em;
    font-family: 'Montserrat', sans-serif;
}

/* Phone input has special generous padding for the custom prefix */
.gv-fp-card input[type="tel"].gv-fp-phone-input {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.7em 0.9em 0.7em 85px; /* Ensures text never overlaps the prefix */
    font-size: 0.9em;
    border-radius: 2em;
    width: 100%;
    height: 3em;
    outline: none;
    color: #fff;
    transition: all 0.3s ease;
    letter-spacing: 0.07em;
    font-family: 'Montserrat', sans-serif;
}

.gv-fp-card input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.gv-fp-card input:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5);
}

.gv-fp-card input.gv-input-invalid {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
}

.gv-fp-card input.gv-input-valid {
    border-color: #53ff1f !important;
    box-shadow: 0 0 10px rgba(83, 255, 31, 0.2);
}

/* Password toggle eye */
.gv-fp-card .gv-password-toggle {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1em;
    transition: color 0.2s ease;
}

.gv-fp-card .gv-password-toggle:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   CUSTOM PHONE PREFIX
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-phone-flex-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.gv-fp-card .gv-fp-phone-prefix {
    position: absolute;
    left: 1.25em;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5em;
    z-index: 2;
}

.gv-fp-card .gv-fp-bd-flag {
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gv-fp-card .gv-fp-bd-code {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
}

/* Adjust the floating pill label for the phone to sit comfortably above
   the larger input area without overlapping the internal prefix. */
.gv-fp-card .gv-phone-group .gv-input-label {
    left: 4em;
}

/* Autofill override */
.gv-fp-card input:-webkit-autofill,
.gv-fp-card input:-webkit-autofill:hover,
.gv-fp-card input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #5b5b5b inset !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --------------------------------------------------------------------------
   ACCOUNT CARD (Step 2)
   -------------------------------------------------------------------------- */
.gv-fp-account-card {
    display: flex;
    align-items: center;
    gap: 1em;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.2em;
    padding: 1em 1.2em;
    margin-bottom: 1.5em;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gv-fp-account-card:hover {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
}

.gv-fp-account-card.selected {
    border-color: rgba(255, 204, 0, 0.8);
    box-shadow: 0 0 18px rgba(255, 204, 0, 0.2);
}

.gv-fp-account-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.gv-fp-account-info {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    flex: 1;
    min-width: 0;
}

.gv-fp-account-name {
    color: #fff;
    font-weight: 700;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Montserrat', sans-serif;
}

.gv-fp-account-identifier {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Montserrat', sans-serif;
}

/* --------------------------------------------------------------------------
   BACK LINK (Global Top Left)
   -------------------------------------------------------------------------- */
.gv-fp-global-back {
    position: fixed;
    top: 2rem;
    left: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    transition: all 0.25s ease;
    z-index: 10;
    font-family: 'Montserrat', sans-serif;
    background: rgba(17, 25, 40, 0.3);
    padding: 0.8em 1.2em;
    border-radius: 999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gv-fp-global-back:hover {
    color: #fff;
    background: rgba(17, 25, 40, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

@media (max-width: 600px) {
    .gv-fp-global-back {
        top: 1rem;
        left: 1rem;
        padding: 0.6em 1em;
        font-size: 0.85em;
    }
}

/* --------------------------------------------------------------------------
   PASSWORD STRENGTH BAR (Step 4)
   -------------------------------------------------------------------------- */
.gv-pass-strength-bar {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: -0.8em;
    margin-bottom: 0.5em;
    overflow: hidden;
}

.gv-pass-strength-fill {
    height: 100%;
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    background-color: transparent;
}

.gv-pass-strength-fill.weak {
    width: 33%;
    background-color: #ff4d4d;
}

.gv-pass-strength-fill.medium {
    width: 66%;
    background-color: #ffcc00;
}

.gv-pass-strength-fill.strong {
    width: 100%;
    background-color: #00e676;
}

/* --------------------------------------------------------------------------
   OTP INPUTS (re-style within the FP card context)
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-otp-input-container {
    display: flex;
    justify-content: center;
    gap: 0.6em;
    margin: 0.5em 0 1em;
}

.gv-fp-card .gv-otp-input {
    width: 3em;
    height: 3.5em;
    text-align: center;
    font-size: 1.4em;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.8em;
    background: transparent !important;
    color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0 !important;
    letter-spacing: 0;
    font-family: 'Montserrat', sans-serif;
}

.gv-fp-card .gv-otp-input:focus {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.gv-fp-card .gv-otp-input.gv-otp-invalid {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
}

/* --------------------------------------------------------------------------
   OTP RESEND BUTTON & FOOTER (Step 3)
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-otp-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Aligns left text and right button */
    gap: 0.6em;
    flex-wrap: wrap;
}

.gv-fp-card .gv-otp-footer-text {
    font-size: 1em; /* Normalized text size */
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Montserrat', sans-serif;
}

.gv-fp-card .gv-otp-resend-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em; /* Unified text scale */
    padding: 0.4em 1.2em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.03em;
}

.gv-fp-card .gv-otp-resend-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.gv-fp-card .gv-otp-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   OTP BLOCK OVERLAY (within the FP card)
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-otp-block-overlay {
    position: absolute;
    inset: 0;
    background: rgb(10 14 25);
    border-radius: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 2em;
}

.gv-fp-card .gv-otp-block-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8em;
}

.gv-fp-card .gv-otp-block-icon {
    font-size: 2.5em;
    color: #ffcc00;
}

.gv-fp-card .gv-otp-block-message {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9em;
    line-height: 1.6;
    max-width: 30em;
}

.gv-fp-card .gv-otp-block-timer {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82em;
}

/* --------------------------------------------------------------------------
   GLASS BUTTON OVERRIDES FOR FP CARD
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-sign-up-btn-wrap {
    width: 100%;
    font-size: 1.1em;
    margin-bottom: 0.5em;
    margin-top: auto !important; /* Pushes button hard to the bottom, centering the middle elements */
}

/* In Step 3, the footer carries the auto margin, so the button sticks to it without extra gap */
#gv-fp-step-3 .gv-sign-up-btn-wrap {
    margin-top: 0.5em !important;
}

.gv-fp-card .gv-sign-up-btn {
    width: 100%;
    height: clamp(38px, 6vw, 42px) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

/* --------------------------------------------------------------------------
   ERROR / STATUS MESSAGES
   -------------------------------------------------------------------------- */
.gv-fp-card .gv-account-exists-msg {
    color: #ff4d4d !important;
    font-size: 0.85em;
    font-weight: 400;
    /* Override the negative margin-top bleed from gv-registration.css */
    margin-top: -2em !important;
    margin-bottom: 0.4em;
    display: block;
    line-height: 1.5;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    animation: gvFpStepIn 0.3s ease forwards;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .gv-fp-card {
        width: 90vw;
        padding: 1.8em 1.2em 1.5em;
        border-radius: 20px;
    }

    .gv-fp-step-title {
        font-size: 1.3em;
    }

    .gv-fp-step-subtitle {
        font-size: 0.78em;
    }

    .gv-fp-card .gv-otp-input {
        width: 2.5em;
        height: 3em;
        font-size: 1.2em;
    }

    .gv-fp-account-avatar {
        width: 48px;
        height: 48px;
    }

    .gv-fp-account-name {
        font-size: 0.9em;
    }

    .gv-fp-account-identifier {
        font-size: 0.72em;
    }
}
