/* ZMCaravan auth drawer — builds on main.css .modal-wrapper / .login-section */

.auth-drawer-session-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(198, 40, 40, 0.25);
    background: rgba(198, 40, 40, 0.08);
    color: #b71c1c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.auth-drawer-session-notice[hidden] {
    display: none !important;
}

.auth-drawer-modal.modal-wrapper {
    z-index: 1105;
}

.auth-drawer-modal.modal-wrapper.active {
    pointer-events: auto;
}

.auth-drawer-modal .auth-drawer-surface,
.auth-drawer-modal .auth-drawer-inner,
.auth-drawer-modal .auth-drawer-body-scroll,
.auth-drawer-modal .auth-drawer-panel,
.auth-drawer-modal input,
.auth-drawer-modal select,
.auth-drawer-modal textarea,
.auth-drawer-modal button {
    pointer-events: auto;
}

body.auth-drawer-open .offcanvas-backdrop {
    display: none !important;
    pointer-events: none !important;
}

body.auth-drawer-open .offcanvas.show {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Premium Deep Navy Blurred Backdrop */
.auth-drawer-modal .anywhere-away {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 18, 36, 0.62) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

/* Slide in from right side transition for auth drawer surface */
.auth-drawer-modal .auth-drawer-surface {
    width: min(58.2rem, 100vw);
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: rgba(11, 22, 44, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.35), inset 1px 0 0 rgba(255, 255, 255, 0.06) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Gold accent line — matches header ::after */
.auth-drawer-modal .auth-drawer-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 193, 7, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    z-index: 5;
    pointer-events: none;
}

/* Soft blue glow for depth */
.auth-drawer-modal .auth-drawer-surface::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 35%;
    background: radial-gradient(ellipse at top right, rgba(43, 116, 254, 0.14) 0%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.auth-drawer-modal .modal-main {
    padding: clamp(2.4rem, 5vw, 7rem) clamp(1.8rem, 4vw, 6rem);
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: transparent !important;
    position: relative;
    z-index: 1;
}

.auth-drawer-modal .auth-drawer-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.auth-drawer-modal .auth-drawer-section-head.section-head {
    display: block;
    margin-bottom: clamp(2rem, 4vw, 5rem);
    flex-shrink: 0;
}

.auth-drawer-modal .login-section .section-title {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Title + red close on one row (top of drawer — aligns X with Login / Sign Up heading) */
.auth-drawer-modal .auth-drawer-title-close-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.auth-drawer-modal .auth-drawer-title-close-row .title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.15;
    color: #ffffff;
    flex: 1;
    min-width: 0;
    font-family: "Outfit", sans-serif;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.auth-drawer-modal .section-detail {
    font-size: clamp(1.4rem, 2.5vw, 1.6rem);
    color: rgba(255, 255, 255, 0.65);
    margin: 0.5rem 0 1rem;
    line-height: 1.45;
    font-family: "Outfit", sans-serif;
}

.auth-drawer-modal .auth-drawer-close-btn.close-btn {
    flex-shrink: 0;
    margin: 0;
    line-height: 0;
    align-self: flex-start;
    position: relative !important;
    z-index: 99 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.auth-drawer-modal .auth-drawer-close-btn.close-btn:hover {
    transform: scale(1.06);
    opacity: 0.92;
}

.auth-drawer-modal .auth-drawer-close-btn svg circle {
    fill: rgba(255, 255, 255, 0.1) !important;
    stroke: rgba(255, 255, 255, 0.28);
    stroke-width: 1.5;
}

.auth-drawer-modal .auth-drawer-close-btn:hover svg circle {
    fill: rgba(255, 193, 7, 0.18) !important;
    stroke: rgba(255, 193, 7, 0.55);
}

/* Slight optical lift on small screens so the X sits with the title cap-height */
@media (max-width: 991.98px) {
    .auth-drawer-modal .auth-drawer-close-btn.close-btn {
        margin-top: 0.2rem;
    }
}

@media (max-width: 399px) {
    .auth-drawer-modal .auth-drawer-close-btn.close-btn {
        margin-top: 0.15rem;
    }

    .auth-drawer-modal .auth-drawer-close-btn.close-btn svg {
        width: 30px;
        height: 30px;
    }
}

/* Log in / Sign up switcher — navy glass pills */
.auth-drawer-modal .auth-drawer-mode-tabs {
    display: flex;
    gap: 0.6rem;
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50rem;
    width: fit-content;
    max-width: 100%;
}

.auth-drawer-mode-tab {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-family: "Outfit", sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 0.75rem 1.6rem;
    border-radius: 50rem;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.auth-drawer-mode-tab:hover {
    color: #ffc107;
}

.auth-drawer-mode-tab.is-active {
    background: rgba(255, 193, 7, 0.16);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.35);
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.12);
}

.auth-drawer-mode-tab:focus-visible {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}

.auth-drawer-modal .close-btn {
    cursor: pointer;
    line-height: 0;
}

/* Scrollable form area (header + tabs stay fixed above) */
.auth-drawer-modal .auth-drawer-body-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.6rem;
    margin-right: -0.2rem;
}

.auth-drawer-modal .auth-drawer-body-scroll::-webkit-scrollbar {
    width: 8px;
}

.auth-drawer-modal .auth-drawer-body-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50rem;
}

.auth-drawer-modal .auth-drawer-body-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.35);
    border-radius: 50rem;
}

.auth-drawer-modal .auth-drawer-body-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.55);
}

.auth-drawer-modal .form-section.auth-drawer-panel {
    display: none;
}

.auth-drawer-modal .form-section.auth-drawer-panel.is-active {
    display: block;
}

/* Submit buttons — header Sign up gradient CTA */
.auth-drawer-modal .login-section .contact-form .primary-btn {
    font-size: 1.6rem;
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, #2b74fe 0%, #1a56db 100%) !important;
    border: 1.5px solid transparent !important;
    box-shadow: 0 4px 18px rgba(43, 116, 254, 0.35) !important;
}

.auth-drawer-modal .login-section .contact-form .primary-btn::after {
    background: rgba(255, 193, 7, 0.85) !important;
}

.auth-drawer-modal .login-section .contact-form .primary-btn:hover {
    box-shadow: 0 8px 28px rgba(43, 116, 254, 0.5), 0 0 16px rgba(255, 193, 7, 0.15) !important;
}

.auth-drawer-modal .login-section .contact-form .primary-btn span {
    font-size: inherit;
}

/* Form labels & fields — dark glass inputs */
.auth-drawer-modal .login-section .contact-form label {
    color: rgba(255, 255, 255, 0.88);
    font-family: "Outfit", sans-serif;
}

.auth-drawer-modal .login-section .contact-form .form-control,
.auth-drawer-modal .login-section .contact-form textarea {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.auth-drawer-modal .login-section .contact-form .form-control::placeholder,
.auth-drawer-modal .login-section .contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.38) !important;
}

.auth-drawer-modal .login-section .contact-form .form-control:focus,
.auth-drawer-modal .login-section .contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 193, 7, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12) !important;
}

.auth-drawer-modal .login-section .contact-form .form-control.is-invalid {
    border-color: rgba(255, 56, 92, 0.75) !important;
    background: rgba(255, 56, 92, 0.08) !important;
}

/* Password show / hide eye toggle */
.auth-drawer-password-wrap {
    position: relative;
    width: 100%;
}

.auth-drawer-password-wrap .form-control {
    padding-right: 5.2rem !important;
}

.auth-drawer-password-toggle {
    position: absolute;
    top: 50%;
    right: 1.4rem;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-drawer-password-toggle:hover {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.auth-drawer-password-toggle:focus-visible {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
    color: #ffc107;
}

.auth-drawer-password-toggle svg {
    display: block;
    pointer-events: none;
}

.auth-drawer-password-toggle .auth-drawer-eye-show {
    display: none;
}

.auth-drawer-password-toggle .auth-drawer-eye-hide {
    display: block;
}

/* Click → password visible → open eye */
.auth-drawer-password-toggle.is-showing .auth-drawer-eye-show {
    display: block;
}

.auth-drawer-password-toggle.is-showing .auth-drawer-eye-hide {
    display: none;
}

.auth-drawer-password-toggle[aria-pressed="true"] {
    color: #ffc107;
}

.auth-drawer-modal .login-section .contact-form .forget-pass .remember label {
    color: rgba(255, 255, 255, 0.75);
}

.auth-drawer-modal .login-section .contact-form .forget-pass .forget {
    color: #ffc107 !important;
}

.auth-drawer-modal .login-section .contact-form .forget-pass .forget:hover {
    color: #ffdb4d !important;
}

/* Validation messages */
.auth-drawer-modal .login-section .contact-form .invalid-feedback {
    font-size: 1.6rem;
    line-height: 1.45;
    font-family: "Outfit", sans-serif;
    font-weight: 500;
    margin-top: 0.75rem;
    width: 100%;
    color: #ff8fa3;
}

/* First + last name row on wider panels */
.auth-drawer-modal .login-section .contact-form .form-input.auth-drawer-form-input-row {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(1rem, 3vw, 3rem);
}

@media (max-width: 480px) {
    .auth-drawer-modal .login-section .contact-form .form-input.auth-drawer-form-input-row {
        flex-direction: column;
    }
}

/* Native select matches pill inputs */
.auth-drawer-modal .auth-drawer-select.form-select {
    height: 5.6rem;
    border-radius: 10rem;
    padding-left: 2.5rem;
    font-size: 1.6rem;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(255,255,255,0.65)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.auth-drawer-modal .auth-drawer-select.form-select option {
    background: #0b162c;
    color: #ffffff;
}

.auth-drawer-modal .auth-drawer-select.form-select:focus {
    border-color: rgba(255, 193, 7, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.12) !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.auth-drawer-modal .auth-drawer-account-switch {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-drawer-modal .auth-drawer-account-switch .account {
    display: inline-block;
    font-size: 1.6rem;
    margin-top: 0;
    font-family: "Outfit", sans-serif;
    color: rgba(255, 255, 255, 0.65);
}

.auth-drawer-modal .auth-drawer-account-switch .account .btn-link {
    color: #ffc107;
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    vertical-align: baseline;
}

.auth-drawer-modal .auth-drawer-account-switch .account .btn-link:hover {
    color: #ffdb4d;
}

.auth-drawer-modal .login-section .contact-form .input-check {
    accent-color: #ffc107;
}

.auth-drawer-modal .login-section .contact-form input:-webkit-autofill,
.auth-drawer-modal .login-section .contact-form input:-webkit-autofill:hover,
.auth-drawer-modal .login-section .contact-form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 28, 56, 0.95) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 9999s ease-out 0s;
}

@media (max-width: 399px) {
    .auth-drawer-mode-tab {
        font-size: 1.25rem;
        padding: 0.65rem 1.2rem;
    }
}

/* Site header — signed-in user (round icon + dropdown on hover / focus) */
.header-account-menu {
    position: relative;
    z-index: 2100;
    display: inline-flex;
    align-items: center;
}

.header-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.header-account-btn:hover,
.header-account-btn:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.header-account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-account-popover {
    position: absolute;
    /* Directly under the icon (no gap) so moving to Profile/Logout never leaves the hover path */
    top: 100%;
    right: 0;
    min-width: 15rem;
    padding: 0.5rem 0;
    background: #fff;
    border-radius: 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 2001;
    pointer-events: none;
}

/* Invisible strip above the panel — covers any subpixel/diagonal path off the icon */
.header-account-popover::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 0.75rem;
    background: transparent;
}

.header-account-menu:hover .header-account-popover,
.header-account-menu:focus-within .header-account-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.header-account-link-icon {
    width: 1.8rem;
    height: 1.8rem;
    flex-shrink: 0;
    opacity: 0.88;
}

.header-account-popover-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1.2rem;
    text-align: left;
    font-family: "Outfit", sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #212529;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1.45;
}

.header-account-popover-link:hover {
    background: #f3f4f9;
    color: #212529;
}

.header-account-popover-logout {
    color: #b02a37;
}

.header-account-popover-logout:hover {
    background: #fcebec;
    color: #842029;
}

.header-account-popover-logout .header-account-link-icon {
    opacity: 1;
}

.header-account-menu--light .header-account-btn--light {
    border-color: rgba(43, 116, 254, 0.45);
    color: #2b74fe;
    background: rgba(43, 116, 254, 0.08);
}

.header-account-menu--light .header-account-btn--light:hover,
.header-account-menu--light .header-account-btn--light:focus-visible {
    background: rgba(43, 116, 254, 0.14);
}

.header-account-menu--light .header-account-popover {
    right: auto;
    left: 0;
}

/* Mobile offcanvas: desktop-matching navy drawer + auth buttons */
@media (max-width: 991.98px) {
    .mobile-menu .mobile-menu-auth-list {
        gap: 1rem !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .mobile-menu .mobile-menu-auth-list li a.list-item {
        font-size: 1.6rem !important;
        min-height: 5rem !important;
        padding: 1rem 2rem !important;
    }
}

@media (max-width: 400px) {
    .mobile-menu .mobile-menu-auth-list li a.list-item {
        font-size: 1.5rem !important;
        min-height: 4.8rem !important;
    }
}
