/* Site chrome (includes/pages/chrome.php), design v3: one dark navy header, the phone's round buttons, and the footer on public pages only (rule: ld_chrome_show_footer()) on every page except the homepage.
   Scoped to body.ld-chrome. The nav and footer classes (ld-nav, ld-footer, ld-y7c) come from landdu.css and landdu-sections.css;
   this file only hides Adrian's chrome and adds what a bar on an inner page needs (solid bar, search, avatar, bell). Undo: remove the file and its enqueue. */

/* Adrian's BuddyBoss header, category bar, mobile header and footer widget area. Hidden, not removed, so his scripts keep their markup. */
body.ld-chrome #masthead,
body.ld-chrome .site-header,
body.ld-chrome .idu-hdr-nav,
body.ld-chrome .bb-mobile-header-wrapper,
body.ld-chrome .idu-mobile-search-bar,
body.ld-chrome #page > .footer-widget-area,
body.ld-chrome #page > footer.bb-footer,
body.ld-chrome #page > #colophon,
body.ld-chrome #page > .site-footer,
/* 15 Oct: on the wp_router pages (My Events, Create Event, the events shell) the theme prints its footer AFTER #page, as children of body, so the #page > rules above never matched: Adrian's join band ("Join the Community. Build Your Life in Australia.") and footer showed, and aside#block-15 ran 10px wider than the screen at 1440. Same rule, either place. */
body.ld-chrome > .footer-widget-area,
body.ld-chrome > footer.bb-footer,
body.ld-chrome > #colophon,
body.ld-chrome > .site-footer { display: none !important; }

/* The theme pads content for its fixed header; ours is in the flow. */
body.ld-chrome #content { padding-top: 0; margin-top: 0; }
body.ld-chrome .site-content-grid { margin-top: 0; } /* the child theme adds 140px under 800px for its fixed phone header */

/* The bar: solid night, in the flow (the homepage nav is absolute over the hero photo). */
body.ld-chrome .ld-nav--bar { position: relative; z-index: 120; background: var(--ld-ink-night); padding: 16px var(--ld-wrap-pad); gap: 32px; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
body.ld-chrome .ld-nav--bar .ld-nav__links { gap: 24px; }
body.ld-chrome .ld-nav--bar .ld-nav__links a { position: relative; padding: 6px 0; transition: color 140ms; }
body.ld-chrome .ld-nav--bar .ld-nav__links a:hover,
body.ld-chrome .ld-nav--bar .ld-nav__links a[aria-current] { color: var(--ld-white); }
body.ld-chrome .ld-nav--bar .ld-nav__links a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--ld-ice); }
body.ld-chrome .ld-nav--bar a:focus-visible,
body.ld-chrome .ld-nav--bar input:focus-visible,
body.ld-chrome .ld-nav--bar button:focus-visible,
body.ld-chrome .ld-nav--bar .ld-nav__burger:focus-visible { outline: 2px solid var(--ld-ice); outline-offset: 3px; }
body.ld-chrome .ld-nav--bar .ld-nav__right { gap: 16px; }
/* The burger is a <label>; the sign-in pages style every label as a form label (display:block, margin), so say it again here. */
body.ld-chrome .ld-nav--bar .ld-nav__burger { display: none; margin: 0 0 0 auto; padding: 0; width: 40px; height: 40px; }
body.ld-chrome .ld-nav--bar .ld-nav__burger span { display: block; }

/* Search: a glass pill; Enter submits, the Search button shows on phones only. */
body.ld-chrome .ld-nav__search { position: relative; display: flex; align-items: center; margin-left: auto; width: 230px; height: 40px; box-sizing: border-box; padding: 0 14px; gap: 8px; border-radius: 999px; background: var(--ld-glass-dark); border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.72); transition: background 160ms, border-color 160ms; }
body.ld-chrome .ld-nav__search:focus-within { background: rgba(255,255,255,.12); border-color: var(--ld-ice); }
body.ld-chrome .ld-nav__search svg { flex: none; }
body.ld-chrome .ld-nav__search input[type="search"] { flex: 1; min-width: 0; height: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ld-white); font: 400 14.5px/1 var(--ld-text); -webkit-appearance: none; appearance: none; }
body.ld-chrome .ld-nav__search input[type="search"]::placeholder { color: rgba(255,255,255,.6); opacity: 1; }
body.ld-chrome .ld-nav__search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
body.ld-chrome .ld-nav__search button { display: none; }
body.ld-chrome .ld-nav__search + .ld-nav__tools { margin-left: 0; }

/* Round buttons (bell, photo, phone search) and the Sign in link: one row, left of Post on desktop, beside the menu button on phones. */
body.ld-chrome .ld-nav--bar .ld-nav__tools { display: flex; align-items: center; gap: 14px; }
body.ld-chrome .ld-nav--bar .ld-nav__right { margin-left: 0; }
body.ld-chrome .ld-nav--bar .ld-nav__signin { color: var(--ld-white); text-decoration: none; font: 500 14.5px/1 var(--ld-text); }
body.ld-chrome .ld-nav--bar .ld-nav__signin:hover { color: var(--ld-ice); }
body.ld-chrome .ld-nav--bar .ld-nav__signin-m { display: none; }
body.ld-chrome .ld-nav--bar .ld-nav__s { display: none; }

/* Signed in: notification bell with a count, and the member photo. */
body.ld-chrome .ld-nav__bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ld-glass-dark); color: var(--ld-white); text-decoration: none; transition: background 160ms; }
body.ld-chrome .ld-nav__bell:hover { background: rgba(255,255,255,.16); }
body.ld-chrome .ld-nav__bell b { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: var(--ld-electric); color: var(--ld-white); font: 600 11px/18px var(--ld-text); text-align: center; }
body.ld-chrome .ld-nav__me { display: block; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--ld-glass-dark); box-shadow: 0 0 0 2px rgba(255,255,255,.22); }
body.ld-chrome .ld-nav__me img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.ld-chrome .ld-nav__me .ldcp-av { display: grid; place-items: center; width: 100% !important; height: 100% !important; border-radius: 50%; color: #fff; font: 800 14px/1 var(--ld-heading, "Inter Tight", system-ui, sans-serif); letter-spacing: -.01em; } /* no photo: coloured initials, not a grey silhouette (round two, 20 Oct) */

/* Desktop: the bar stays at the top while the page scrolls (Adrian's header was fixed). */
@media (min-width: 901px) {
	body.ld-chrome .ld-nav--bar { position: sticky; top: 0; }
	body.admin-bar.ld-chrome .ld-nav--bar { top: 32px; }
}
@media (max-width: 1100px) and (min-width: 901px) {
	body.ld-chrome .ld-nav--bar { gap: 20px; }
	body.ld-chrome .ld-nav--bar .ld-nav__links { gap: 16px; }
	body.ld-chrome .ld-nav__search { width: 170px; }
}

/* Phone: logo on the left, round buttons on the right (bell, search, menu), same 40px glass circles as the burger. The menu opens under the bar. */
@media (max-width: 900px) {
	body.ld-chrome .ld-nav--bar { padding: 12px 16px; gap: 0; align-items: center; }
	body.ld-chrome .ld-nav--bar .ld-nav__logo { margin-right: auto; }
	body.ld-chrome .ld-nav--bar .ld-nav__burger { display: flex; margin-left: 10px; }
	body.ld-chrome .ld-nav__search { display: none !important; } /* the search button opens the bottom bar's search sheet instead */
	body.ld-chrome .ld-nav--bar .ld-nav__tools { gap: 10px; }
	body.ld-chrome .ld-nav--bar .ld-nav__s { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--ld-glass-dark); color: var(--ld-white); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 160ms; }
	body.ld-chrome .ld-nav--bar .ld-nav__s:hover { background: rgba(255,255,255,.16); }
	body.ld-chrome .ld-nav--bar .ld-nav__s:active,
	body.ld-chrome .ld-nav--bar .ld-nav__bell:active,
	body.ld-chrome .ld-nav--bar .ld-nav__burger:active { transform: scale(.94); }
	body.ld-chrome .ld-nav--bar .ld-nav__me { display: none; } /* the photo is one tap away in the bottom bar's More menu */
	/* Sign in as a small pill, since signed-out visitors have no photo to tap */
	body.ld-chrome .ld-nav--bar .ld-nav__signin { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; box-sizing: border-box; border-radius: 999px; background: var(--ld-glass-dark); font-weight: 600; font-size: 14px; }
	/* open menu: links, then Sign in and Post on one line */
	body.ld-chrome .ld-nav--bar .ld-nav__t:checked ~ .ld-nav__links { margin-top: 12px; }
	body.ld-chrome .ld-nav--bar .ld-nav__t:checked ~ .ld-nav__right { align-items: center; gap: 12px; flex-wrap: nowrap; justify-content: flex-end; }
	body.ld-chrome .ld-nav--bar .ld-nav__t:checked ~ .ld-nav__right .ld-nav__signin-m { display: inline; margin-right: auto; color: var(--ld-white); text-decoration: none; }
	body.ld-chrome .ld-nav--bar .ld-nav__links a[aria-current]::after { display: none; }
	body.ld-chrome .ld-nav--bar .ld-nav__links a[aria-current] { color: var(--ld-ice); }
}
@media (max-width: 380px) { body.ld-chrome .ld-nav--bar .ld-nav__signin { padding: 0 12px; } }

/* Footer block (public pages only, see ld_chrome_show_footer): no gap above it, and room on phones for the fixed bottom bar so it never covers the last line. */
body.ld-chrome .ld-chrome-foot { clear: both; margin: 0; padding: 0; }
body.ld-chrome .ld-chrome-foot > .ld-y7c { margin: 0; }
@media (max-width: 799px) {
	body.ld-chrome--foot { padding-bottom: 0 !important; } /* the theme pads the body for the bottom bar; the footer carries that room instead, so no light strip under it */
	body.ld-chrome--foot .ld-chrome-foot { background: var(--ld-ink-night); padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
	/* no footer (feeds, lists, the signed-in account): the page ends in its own content with the bottom bar's height under it */
	body.ld-chrome--nofoot { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Footer column headings stay ice on night on every page: a page stylesheet colouring all h4s (jobs.css: body.ld-jobs :is(h1..h4)) turned them navy on navy. */
body.ld-chrome .ld-chrome-foot .ld-footer h4 { color: var(--ld-ice); text-shadow: none; font-family: var(--ld-text); letter-spacing: .1em; }

/* Desktop bar height: the search form inherited a 32px bottom margin (a theme form rule), which made the bar 104px; v3 is about 72. */
body.ld-chrome .ld-nav--bar .ld-nav__search { margin: 0 0 0 auto; }
/* Signed-in admins: the theme scrolls the body under the admin bar, so a 32px sticky offset left a light strip above the bar. */
@media (min-width: 901px) { body.admin-bar.ld-chrome .ld-nav--bar { top: 0; } }

/* Cookie bar (WPConsent): cookie-bar.css, loaded on every page from includes/pages/chrome.php. */

/* QA C, 15 Oct: the theme gives #content a viewport min-height (765px at 390), so a short page with a footer (Plans, the 404) left a 300 to 660px empty band above the join band and footer. The footer follows the content directly instead. */
body.ld-chrome--foot #content.site-content { min-height: 0 !important; }

/* Footer hairline: the acknowledgement line kept its 760px reading width AND its border, so at 1440 the hairline stopped short (960px) while the legal links row below it ran to the full width (1240px, Chatty 15 Oct).
   The line now runs the full width and the text keeps its 760px measure through right padding. */
body.ld-chrome .ld-chrome-foot .ld-footer__ack { max-width: none; padding-right: max(0px, calc(100% - 760px)); }

/* Scrolling tab rows (group header tabs, profile tabs, sub tabs): while a row has more to scroll to the right, its right edge fades out so the cut tab reads as "keep going", not as a clipped word.
   assets/js/tabs-fade.js sets .ld-fade-r only while there is more to scroll and removes it at the end of the row. */
.ld-fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }

/* The closing join band on the signed-out text pages and the 404 ("You won't be the new one for long."), v3 (Kyle, 15 Oct: no pastel lavender). The same navy cover the page heads use, heavy white type, one row on a desktop
   (words left, button right) and one stack on a phone; the lavender sky, the luggage tag and the 76px shadowed heading are not drawn. Words unchanged. Scoped to the inner pages' footer block: the homepage keeps its own band. */
body.ld-chrome .ld-chrome-foot > .ld-y7c { padding: 36px 0 38px; background: linear-gradient(90deg, #0a0e24 0%, #141a66 62%, #1e2fa8 100%); color: var(--ld-white); }
body.ld-chrome .ld-chrome-foot > .ld-y7c :is(.ld-y7c-tag, .ld-sky, .ld-opr, .ld-brg) { display: none; }
body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-section__in { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 0; align-items: center; }
body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-y7c-l { margin: 0; max-width: 640px; font: 800 28px/1.1 var(--ld-heading); letter-spacing: -.03em; text-shadow: none; color: var(--ld-white); overflow-wrap: anywhere; }
body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-support { margin: 8px 0 0; max-width: 520px; font: 400 16px/1.5 var(--ld-text); color: rgba(255,255,255,.84); }
body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-btn { justify-self: start; margin: 18px 0 0; height: 48px; padding: 0 24px; font-size: 15px; background: var(--ld-white); color: var(--ld-midnight); }
body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-btn:hover { background: var(--ld-ice); color: var(--ld-midnight); }
@media (min-width: 768px) {
	body.ld-chrome .ld-chrome-foot > .ld-y7c { padding: 44px 0 46px; }
	body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-section__in { grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; }
	body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-y7c-l { grid-column: 1; font-size: 40px; }
	body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-support { grid-column: 1; }
	body.ld-chrome .ld-chrome-foot > .ld-y7c .ld-btn { grid-column: 2; grid-row: 1 / span 2; justify-self: end; margin: 0; }
}

/* A homepage variant under the site bar (/home-2/): the bar is the nav, so the hero's own nav gives way (no two headers stacked; final QA, 15 Oct). */
body.ld-chrome .ld-hero > .ld-nav { display: none; }
body.ld-chrome .ld-nav__me .ldcp-av { background: #cfdcff !important; color: #0a0e24 !important; } /* on the navy header the initial is the ice accent, not the member's feed colour (checker, 20 Oct) */

/* Tablet bar (28 Oct, GCP check at 1024): from 901 to 1439 the full bar did not fit, so "Buy & Sell" and "Sign in" wrapped (and signed in, the logo was squeezed out). Here the search field is a round icon that opens its input as a small popover under the bar, labels never wrap, and the gaps tighten. 1440 and up and the phone bar are as before. */
@media (min-width: 901px) and (max-width: 1439px) {
	body.ld-chrome .ld-nav--bar { padding-left: 20px; padding-right: 20px; gap: 16px; }
	body.ld-chrome .ld-nav--bar .ld-nav__logo { flex: none; }
	body.ld-chrome .ld-nav--bar .ld-nav__links { gap: 14px; flex-wrap: nowrap; }
	body.ld-chrome .ld-nav--bar .ld-nav__links a, body.ld-chrome .ld-nav--bar .ld-nav__signin, body.ld-chrome .ld-nav--bar .ld-nav__right a { white-space: nowrap; }
	body.ld-chrome .ld-nav--bar .ld-nav__tools { gap: 12px; flex: none; }
	body.ld-chrome .ld-nav--bar .ld-nav__right { flex: none; }
	body.ld-chrome .ld-nav--bar .ld-nav__search { position: relative; flex: none; width: 40px; padding: 0; justify-content: center; gap: 0; }
	body.ld-chrome .ld-nav--bar .ld-nav__search input[type="search"] { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
	body.ld-chrome .ld-nav--bar .ld-nav__search input[type="search"]:focus { opacity: 1; cursor: text; inset: auto; top: calc(100% + 18px); right: 0; width: 280px; height: 46px; padding: 0 18px; box-sizing: border-box; border-radius: 999px; background: #131a3a; border: 1px solid var(--ld-ice); box-shadow: 0 18px 40px -16px rgba(0,0,0,.7); z-index: 130; outline: none; }
	body.ld-chrome .ld-nav--bar .ld-nav__s { display: none; }
}
/* the narrowest tablets, signed in (Home, chat, bell, photo, search and Post all show): a little tighter still */
@media (min-width: 901px) and (max-width: 1040px) {
	body.ld-chrome .ld-nav--bar { padding-left: 16px; padding-right: 16px; gap: 12px; }
	body.ld-chrome .ld-nav--bar .ld-nav__links { gap: 10px; }
	body.ld-chrome .ld-nav--bar .ld-nav__links a { font-size: 14px; }
	body.ld-chrome .ld-nav--bar .ld-nav__tools { gap: 8px; }
}
@media (min-width: 901px) and (max-width: 990px) {
	body.ld-chrome .ld-nav--bar .ld-nav__right .ld-btn { font-size: 0; gap: 0; padding-left: 13px; padding-right: 13px; } /* Post shows as its plus, the aria-label keeps the name */
	body.ld-chrome .ld-nav--bar .ld-nav__links a { font-size: 13.5px; }
}
