/* ═══ Shared site chrome: the themed header/menu used by the shell pages, the search app
   and the listing-details page. All site-specific values arrive via CSS custom properties
   (--accent, --ink, --submenu-bg, --hdr-bg, --hdr-text, --font-display, --font-body)
   emitted by _SiteChromeHead.cshtml. ═══ */

/* Scoped copies of the shell's base helpers so the header renders identically on pages
   that don't load the shell's inline styles (search/details). Also guards against the
   Tailwind CDN preflight on those pages (Inter font, stripped anchors/buttons). */
.site-header { font-family: var(--font-body); line-height: 1.5; }
.site-header a { color: inherit; text-decoration: none; }
.site-header [hidden] { display: none !important; }
.site-header .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-header .display { font-family: var(--font-display); font-weight: 400; }
.site-header .nav-caret { font-size: 10px; opacity: .5; margin-left: 4px; }
.site-header .acct-link { background: none; border: none; font: inherit; color: inherit; cursor: pointer; padding: 0; }

/* ── Site header (configurable: layout, transparent overlay, sticky) ── */
.site-header { position: relative; width: 100%; z-index: 90; color: var(--ink);
    transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.site-header .hdr-bar { display: flex; align-items: stretch; gap: 24px; padding-top: 0; padding-bottom: 0; min-height: 84px; flex-wrap: wrap; }
.site-logo { font-size: 26px; display: flex; align-items: center; flex: none; }
.site-logo img { height: 44px; max-width: 220px; object-fit: contain; display: block; }
.site-account { display: flex; gap: 9px; align-items: center; font-size: 14.5px; font-weight: 600; margin-left: auto; white-space: nowrap; }
.site-account .acct-sep { opacity: .35; font-weight: 400; }
.site-header.hdr-center .hdr-bar { display: grid; grid-template-columns: 1fr auto 1fr; }
.site-header.hdr-center .site-nav { justify-self: start; }
.site-header.hdr-center .site-account { justify-self: end; margin-left: 0; }
/* Menu items fill the full header height; hovering shows a solid block in the
   sub-menu color plus an accent bar expanding along the top (works over transparent too) */
.site-nav { display: flex; align-items: stretch; gap: 0; font-size: 15px; flex-wrap: wrap; }
.nav-item { position: relative; display: flex; align-items: stretch; }
.site-nav > a, .nav-item > a, .nav-item > span { display: flex; align-items: center; padding: 0 15px; position: relative;
    transition: background .15s ease, color .15s ease; }
.site-nav > a::after, .nav-item > a::after, .nav-item > span::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent);
    transform: scaleX(0); transition: transform .18s ease; }
.site-nav > a:hover, .nav-item:hover > a, .nav-item:hover > span {
    background: var(--submenu-bg); color: var(--ink); text-shadow: none; }
.site-nav > a:hover::after, .nav-item:hover > a::after, .nav-item:hover > span::after { transform: scaleX(1); }
/* Dropdowns share the hover fill color and open flush under the item */
.nav-item .submenu, .acct-menu .submenu { display: none; position: absolute; top: 100%; left: 0; background: var(--submenu-bg);
    border-radius: 0 0 12px 12px; box-shadow: 0 16px 36px rgba(0,0,0,.18); padding: 6px; min-width: 210px; z-index: 60; }
.nav-item:hover .submenu { display: block; }
.submenu a { display: block; padding: 10px 14px; border-radius: 8px; font-size: 14.5px; white-space: nowrap;
    transition: background .12s ease, color .12s ease; }
.submenu a:hover { background: var(--accent); color: #FDFBF6; }
/* Logged-in account menu: initials avatar + first name with a hover dropdown,
   structured like a nav-item so the same submenu look applies */
.acct-menu { position: relative; display: flex; align-items: center; }
.acct-menu .acct-trigger { display: flex; align-items: center; gap: 8px; background: none; border: none;
    font: inherit; color: inherit; cursor: pointer; padding: 6px 2px; }
.acct-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #FDFBF6;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700;
    letter-spacing: .02em; text-shadow: none; flex: none; }
.acct-menu .submenu { left: auto; right: 0; border-radius: 12px; top: 100%; }
.acct-menu:hover .submenu, .acct-menu:focus-within .submenu { display: block; }
.acct-menu .submenu a, .acct-menu .submenu button { display: block; width: 100%; text-align: left;
    padding: 10px 14px; border-radius: 8px; font-size: 14.5px; white-space: nowrap; background: none;
    border: none; font-family: inherit; font-weight: 600; color: inherit; cursor: pointer;
    transition: background .12s ease, color .12s ease; }
.acct-menu .submenu a:hover, .acct-menu .submenu button:hover { background: var(--accent); color: #FDFBF6; }
/* Sticky: pinned; solid configured colors once scrolled */
.site-header.hdr-sticky { position: sticky; top: 0; background: var(--bg); }
/* Transparent: out of flow so the hero bumps to the very top; dark scrim keeps text readable */
.site-header.hdr-transparent { position: absolute; top: 0; left: 0; right: 0; color: #fff;
    background: linear-gradient(to bottom, rgba(0,0,0,.52), rgba(0,0,0,0));
    text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.site-header.hdr-transparent.hdr-sticky { position: fixed; }
.site-header.hdr-sticky.hdr-scrolled { background: var(--hdr-bg); color: var(--hdr-text);
    box-shadow: 0 2px 14px rgba(0,0,0,.09); text-shadow: none; }
.site-header .submenu { color: var(--ink); text-shadow: none; }
/* Non-hero pages under a transparent header need room so content isn't hidden */
.hdr-spacer { height: 96px; }
/* ── Mobile header: logo left + hamburger right (same for every layout), slide-down panel ── */
.hdr-burger { display: none; width: 44px; height: 44px; flex: none; margin-left: auto; align-self: center;
    border: none; background: none; color: inherit; cursor: pointer; padding: 0; }
.hdr-burger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto;
    border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hdr-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr-burger.open span:nth-child(2) { opacity: 0; }
.hdr-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 95;
    background: var(--hdr-bg); color: var(--hdr-text); padding: 4px 22px 20px;
    box-shadow: 0 18px 30px rgba(0,0,0,.16); max-height: calc(100vh - 64px); overflow-y: auto;
    text-shadow: none; font-family: var(--font-body); }
.mobile-menu a { display: block; padding: 13px 2px; font-size: 16px; border-bottom: 1px solid rgba(0,0,0,.07); }
.mobile-menu .mm-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%;
    border: none; background: none; color: inherit; font: inherit; font-size: 16px; padding: 13px 2px;
    border-bottom: 1px solid rgba(0,0,0,.07); cursor: pointer; }
.mobile-menu .mm-caret { font-size: 11px; opacity: .55; transition: transform .18s ease; }
.mobile-menu .mm-group.open .mm-caret { transform: rotate(180deg); }
.mobile-menu .mm-sub { display: none; padding-left: 16px; }
.mobile-menu .mm-group.open .mm-sub { display: block; }
.mobile-menu .mm-sub a { font-size: 15px; opacity: .85; }
.mobile-menu .mm-account { display: flex; gap: 10px; margin-top: 18px; }
.mobile-menu .mm-account a, .mobile-menu .mm-account button { flex: 1; text-align: center; border-bottom: none; border-radius: 9px;
    padding: 12px 0; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; }
.mobile-menu .mm-account .mm-login { background: var(--accent); color: #FDFBF6; }
.mobile-menu .mm-account .mm-register { border: 2px solid currentColor; background: none; color: inherit; }
.mobile-menu .mm-user { display: flex; align-items: center; gap: 12px; padding: 14px 2px 4px; }
.mobile-menu .mm-user .acct-avatar { width: 40px; height: 40px; font-size: 15px; }
.mobile-menu .mm-user-email { font-size: 13px; opacity: .65; }
/* When the panel is open the bar itself goes solid so it reads as one surface */
.site-header.hdr-open { background: var(--hdr-bg); color: var(--hdr-text); text-shadow: none;
    box-shadow: 0 2px 14px rgba(0,0,0,.09); }
.site-header.hdr-open .mobile-menu { display: block; }
/* ── Contact info in the menu (Header & menu → "Contact info in the menu"): phone / email /
   social icons, either as a slim bar ABOVE the menu (.hdr-contact-top, colored --hc-bg /
   --hc-text — defaults: design accent + near-white) or INLINE beside Login/Register
   (.hdr-contact-inline, inherits the bar's colors). The mobile panel always lists them at
   the bottom (.mm-contact). ── */
.hdr-contact { font-size: 13px; font-weight: 500; }
.hdr-contact a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hdr-contact svg { width: 15px; height: 15px; fill: currentColor; display: block; flex: none; }
.hdr-contact .hc-socials { display: inline-flex; align-items: center; gap: 2px; }
.hdr-contact .hc-social { width: 28px; height: 28px; border-radius: 50%; justify-content: center;
    transition: background .15s ease; }
.hdr-contact .hc-social svg { width: 16px; height: 16px; }
.hdr-contact-top { background: var(--hc-bg, var(--accent)); color: var(--hc-text, #FDFBF6); text-shadow: none; }
.hdr-contact-top .hc-row { display: flex; align-items: center; justify-content: flex-end; gap: 22px;
    min-height: 36px; padding-top: 2px; padding-bottom: 2px; flex-wrap: wrap; }
.hdr-contact-top .hc-social:hover { background: rgba(255,255,255,.2); }
.hdr-contact-inline { display: flex; align-items: center; gap: 16px; padding-right: 16px; margin-right: 6px;
    border-right: 1px solid color-mix(in srgb, currentColor 30%, transparent); font-weight: 600; }
.hdr-contact-inline .hc-social:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
/* A top bar makes a see-through header taller — pages that need the spacer get the tall one */
.hdr-spacer.hdr-spacer-tall { height: 132px; }
.mobile-menu .mm-contact { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.07);
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14.5px; font-weight: 600; }
.mobile-menu .mm-contact a { display: inline-flex; padding: 0; border-bottom: none; font-size: inherit; }
.mobile-menu .mm-contact svg { width: 16px; height: 16px; }
.mobile-menu .mm-contact .hc-socials { display: flex; gap: 6px; width: 100%; }
.mobile-menu .mm-contact .hc-social { width: 38px; height: 38px; border-radius: 50%; justify-content: center;
    background: color-mix(in srgb, currentColor 10%, transparent); }
.mobile-menu .mm-contact .hc-social svg { width: 18px; height: 18px; }
/* Search-page slot for the app's mobile search pill: takes the space between the logo and
   the hamburger on phones; collapses to nothing on desktop widths (the pill only teleports
   in when the app is in mobile mode). */
.hdr-search-slot { flex: 0 0 auto; width: 0; overflow: hidden; }
@media (max-width: 900px) {
    .site-header .hdr-bar, .site-header.hdr-center .hdr-bar { display: flex; flex-wrap: nowrap; gap: 12px; min-height: 64px; }
    .site-nav, .site-account { display: none; }
    .site-logo { margin-right: auto; font-size: 21px; }
    .site-logo img { height: 34px; max-width: 165px; }
    .hdr-burger { display: block; }
    .hdr-spacer { height: 72px; }
    .hdr-spacer.hdr-spacer-tall { height: 104px; }
    /* Phones: the top contact bar keeps phone + socials centered; email moves to the panel */
    .hdr-contact-top .hc-row { justify-content: center; gap: 14px; min-height: 32px; font-size: 12.5px; }
    .hdr-contact-top .hc-email { display: none; }
    .hdr-search-slot { flex: 1 1 auto; width: auto; min-width: 0; overflow: visible;
        display: flex; align-items: center; }
    /* Search-app phones with a TEXT brand (no uploaded logo): the full-size name would
       squeeze the teleported filter pill out of the bar — compact it to a small
       two-line lockup capped at 96px so the pill keeps its room. */
    body.al-chrome-appfit .site-logo-text { flex: 0 1 auto; min-width: 0; max-width: 96px;
        margin-right: 0; font-size: 12px; line-height: 1.2; }
    body.al-chrome-appfit .site-logo-text .logo-name { display: -webkit-box;
        -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        overflow-wrap: anywhere; }
}

/* ── Shared themed footer (shell pages, search list view, listing details) ── */
.site-footer { background: var(--foot-bg); color: var(--foot-ink); font-family: var(--font-body);
    line-height: 1.5; margin-top: 40px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.site-footer .display { font-family: var(--font-display); font-weight: 400; }
.site-footer .foot-bar { padding-top: 40px; padding-bottom: 40px; display: flex;
    justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.site-footer .foot-name { font-size: 20px; margin-bottom: 8px; }
.site-footer .foot-muted { opacity: .7; }
.site-footer .foot-links { text-align: right; opacity: .7; }
.site-footer .foot-links div + div { margin-top: 4px; }

/* ── App-page fit: the search app is a fixed-height flex app; the header sits above it
   as a flex row so the app keeps a definite height (Google Maps needs one). ── */
body.al-with-chrome > .site-header { flex: none; }
/* On app pages (white surfaces, no themed body background behind the bar) the solid header
   wears its configured bar colors — the same pair the scrolled-sticky state uses. */
body.al-with-chrome > .site-header { background: var(--hdr-bg); color: var(--hdr-text);
    box-shadow: 0 1px 0 rgba(0,0,0,.07); }
body.al-chrome-appfit { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.al-chrome-appfit #app { flex: 1 1 auto; min-height: 0; position: relative; }
body.al-chrome-appfit #app .al-app-shell { height: 100%; }
