/* =============================================================
   Hamburger nav (mobile + tablet, < 992px)
   Pairs with widget_header_navigation to swap the desktop inline
   nav for a slide-in drawer at Bootstrap lg breakpoint.
   ============================================================= */

/* -------- Hamburger button (hidden on desktop) -------- */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    padding: 10px;
    margin: 0;
    width: 44px;
    height: 44px;
    cursor: pointer;
    line-height: 0;
}
.hamburger-btn img {
    width: 24px;
    height: 24px;
    display: block;
}
.hamburger-btn:focus {
    outline: none;
}

/* -------- Drawer + backdrop (hidden on desktop) -------- */
.hamburger-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1040;
}
.hamburger-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.hamburger-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85vw;
    max-width: 360px;
    background: #FFFFFF;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: Inter, sans-serif;
}
.hamburger-drawer.is-open {
    transform: translateX(0);
}

/* Body scroll-lock while drawer is open */
body.hamburger-open {
    overflow: hidden;
}

/* -------- Drawer header (close button) -------- */
.drawer-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 16px 8px;
}
.drawer-close-btn {
    background: transparent;
    border: none;
    padding: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    line-height: 0;
}
.drawer-close-btn img {
    width: 20px;
    height: 20px;
    display: block;
    margin: 0 auto;
}

/* -------- Login CTA (logged-out only) -------- */
.drawer-login-cta {
    padding: 8px 20px 20px;
    border-bottom: 1px solid #E5E5E5;
}
.drawer-login-cta .drawer-login-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #FFD800;
    color: #2D3236;
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    text-decoration: none;
}
.drawer-login-cta .drawer-login-btn:hover {
    background: #F5CC00;
    color: #2D3236;
    text-decoration: none;
}

/* -------- Accordion sections -------- */
.drawer-section {
    border-bottom: 1px solid #E5E5E5;
}
.drawer-section-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #2D3236;
    text-align: left;
    font-family: inherit;
}
.drawer-section-trigger:focus {
    outline: none;
}
.drawer-section-chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid #2D3236;
    border-bottom: 2px solid #2D3236;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}
.drawer-section.is-open .drawer-section-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.drawer-section-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.drawer-section.is-open .drawer-section-panel {
    max-height: 600px;
}
.drawer-section-panel a,
.drawer-section-panel .help li a {
    display: block;
    padding: 12px 20px 12px 36px;
    color: #2D3236;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
}
.drawer-section-panel a:hover {
    background: #F5F5F5;
    color: #2D3236;
    text-decoration: none;
}
.drawer-section-panel .help {
    list-style: none;
    margin: 0;
    padding: 0;
}
.drawer-section-panel .help li {
    list-style: none;
}
.drawer-section-panel .help-faq {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #E5E5E5;
}
.drawer-section-panel .help-faq li {
    list-style: none;
}
.drawer-section-panel .citiesViewMore {
    font-weight: 600;
    color: #2D3236;
    border-top: 1px solid #E5E5E5;
    margin-top: 4px;
}

/* -------- Direct link rows (For Business, Lease) -------- */
.drawer-link {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #2D3236;
    text-decoration: none;
    border-bottom: 1px solid #E5E5E5;
}
.drawer-link:hover {
    background: #F5F5F5;
    color: #2D3236;
    text-decoration: none;
}

/* =============================================================
   Breakpoint swap: desktop nav <=> hamburger at 992px
   ============================================================= */

@media (max-width: 991.98px) {
    /* Hide desktop nav cols */
    .header-nav .nav-content .col-search,
    .header-nav .nav-content .col-business,
    .header-nav .nav-content .col-cities,
    .header-nav .nav-content .col-airport,
    .header-nav .nav-content .col-gap,
    .header-nav .nav-content .col-help,
    .header-nav .nav-content .col-lease {
        display: none !important;
    }

    /* Show hamburger button */
    .hamburger-btn {
        display: inline-block;
    }
    .header-nav .nav-content .col-hamburger {
        display: table-cell;
        width: 1%;
        vertical-align: middle;
        text-align: right;
        padding-left: 4px;
    }

    /* Drawer + backdrop visible in this range (hidden above 992 via display:none) */
    .hamburger-drawer,
    .hamburger-backdrop {
        display: block;
    }

    /* Hide the account column entirely on mobile.
       All account items (Login OR avatar+menu) live inside the hamburger drawer. */
    .header-nav .nav-content .col-account {
        display: none !important;
    }
}

@media (min-width: 992px) {
    /* Safety: ensure drawer elements stay hidden on desktop */
    .hamburger-btn,
    .hamburger-drawer,
    .hamburger-backdrop,
    .header-nav .nav-content .col-hamburger {
        display: none !important;
    }
}

/* =============================================================
   Drawer account section (logged-in state)
   Shown in place of the Login CTA for logged-in users.
   ============================================================= */

/* -------- User header: avatar + name + email -------- */
.drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #E5E5E5;
}
.drawer-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.drawer-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.drawer-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #2D3236;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.drawer-user-email {
    font-size: 13px;
    color: #6B7175;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -------- Account links list (Dashboard, Bookings, etc.) -------- */
.drawer-account-links {
    border-bottom: 1px solid #E5E5E5;
}
.drawer-account-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 14px 52px;
    font-size: 15px;
    font-weight: 500;
    color: #2D3236;
    text-decoration: none;
    border-bottom: 1px solid #F0F0F0;
    background-repeat: no-repeat;
    background-position: 20px center;
    background-size: 20px 20px;
}
.drawer-account-link:last-child {
    border-bottom: none;
}
.drawer-account-link:hover {
    background-color: #F5F5F5;
    color: #2D3236;
    text-decoration: none;
}
.drawer-account-link--dashboard {
    background-image: url(/images/v3/icons_icon-dash-black.png);
}
.drawer-account-link--bookings {
    background-image: url(/images/icons_icon-bookings-black.png);
}
.drawer-account-link--listings {
    background-image: url(/images/icons_icon-listings-black.png);
}
.drawer-account-link--messages {
    background-image: url(/images/svg/icons-message-border-black.svg);
    background-size: 18px 18px;
}
.drawer-account-link--profile {
    background-image: url(/images/v3/icons_icon-profile-black.png);
}
.drawer-account-link--billing {
    background-image: url(/images/icons_icon-billing-black.png);
}

/* -------- Unread message badge -------- */
.drawer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #FFD800;
    color: #2D3236;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1;
}

/* -------- Logout link (bottom of drawer) -------- */
.drawer-link--logout {
    padding-left: 52px;
    color: #C0392B;
    border-bottom: none;
    border-top: 1px solid #E5E5E5;
    background-image: url(/images/v3/icons_icon-logout-black.png);
    background-repeat: no-repeat;
    background-position: 20px center;
    background-size: 20px 20px;
}
.drawer-link--logout:hover {
    color: #A93226;
    background-color: #FDF2F2;
}
