/* Listings page header. Loaded after listings.css.
   Nothing outside the min-width:768px block touches .site-nav or .nav-*,
   so the mobile bottom navbar is exactly as it was. */

.lt-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Bar ---------- */
.lt-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(247, 243, 236, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

/* 1100px of content + 2 x 16px of page padding: the same geometry as .listings-page,
   so the brand and the search pill line up with the heading and the filter panel. */
.lt-bar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1132px;
    min-height: 60px;
    margin: 0 auto;
    padding: 8px var(--space-3);
}

/* ---------- Brand (the only one on this page) ---------- */
.lt-brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 9px;
    color: var(--color-ink);
    text-decoration: none;
}
.lt-brand__icon { width: 28px; height: 28px; color: var(--color-primary); }
.lt-brand__name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ---------- Search pill ---------- */
.lt-search {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 440px;
    height: 44px;
    margin-left: auto;
    padding: 0 4px 0 18px;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lt-search:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(15, 92, 86, 0.12);
}
.lt-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-ink);
    font: inherit;
    font-size: 0.92rem;
    -webkit-appearance: none;
    appearance: none;
}
.lt-search input::placeholder { color: var(--color-ink-soft); }
.lt-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.lt-search button {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
}
.lt-search button:hover { background: var(--color-primary-hover); }
/* base.css lifts every button on hover; the icon must stay put. */
.lt-search button,
.lt-search button:hover,
.lt-search button:active { transform: none !important; }

/* Page content sits closer to the bar now that it isn't clearing a floating button. */
.listings-page { padding-top: 24px; }

/* ---------- Hamburger: desktop only ---------- */
.lt-menu-btn { display: none; }

/* ---------- Mobile: one compact row ---------- */
@media (max-width: 767px) {
    /* 16px stops iOS from zooming the page when the field is focused. */
    .lt-search input { font-size: 16px; }
}

/* ---------- Desktop (the same 768px breakpoint nav.css uses) ---------- */
@media (min-width: 768px) {
    .listings-page { padding-top: 32px; }

    .lt-bar__inner { min-height: 72px; gap: 14px; }
    .lt-brand__name { font-size: 1.15rem; }

    .lt-menu-btn {
        display: grid;
        place-items: center;
        flex: none;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1.5px solid var(--color-border);
        border-radius: 12px;
        background: var(--color-surface);
        color: var(--color-ink);
        cursor: pointer;
    }
    .lt-menu-btn:hover,
    .lt-menu-btn[aria-expanded="true"] {
        border-color: var(--color-primary);
        background: var(--color-success-soft);
        color: var(--color-primary);
    }
    .lt-menu-btn,
    .lt-menu-btn:hover,
    .lt-menu-btn:active { transform: none !important; }

    /* The main navbar lives behind the hamburger on this page, so the page
       no longer reserves space for a fixed top bar. */
    body.listings-page-body { padding-top: 0; }

    /* Main navbar becomes a dropdown panel under the hamburger.
       listings-menu.js sets --lt-menu-top / --lt-menu-left when it opens. */
    body.listings-page-body .site-nav {
        top: var(--lt-menu-top, 80px);
        left: var(--lt-menu-left, 16px);
        right: auto;
        bottom: auto;
        width: 260px;
        padding: 8px;
        border: 1px solid var(--color-border);
        border-radius: 16px;
        background: var(--color-surface);
        box-shadow: 0 18px 48px rgba(26, 26, 26, 0.16);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
    }
    body.listings-page-body.lt-menu-open .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s;
    }

    body.listings-page-body .site-nav-inner {
        display: block;
        min-height: 0;
        padding: 0;
    }
    /* The brand is already in the page header. */
    body.listings-page-body .nav-brand { display: none; }

    body.listings-page-body .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
    body.listings-page-body .nav-link,
    body.listings-page-body .nav-logout button {
        justify-content: flex-start;
        width: 100%;
        min-height: 46px;
        padding: 10px 14px;
        border: 0;
        border-radius: 10px;
        font-size: 0.95rem;
        text-align: left;
    }
    body.listings-page-body .nav-logout {
        height: auto;
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid var(--color-border);
    }
}