/* Phone bottom bar (nav.idu-bottom-toolbar, IDU Listings), design v3: dark navy, Home, a raised blue Search circle, Post, More. Plugin style over Adrian's feature; undo = remove this file and its enqueue in includes/frontend.php.
   Its search sheet and More menu (account links) stay Adrian's; the header's own menu holds the site sections. The header's search button opens the same search sheet. */
@media (max-width: 799px) {
	nav.idu-bottom-toolbar { background: var(--ld-ink-night); border-top: 1px solid rgba(255,255,255,.10); box-shadow: 0 -12px 28px -14px rgba(11,13,26,.55); padding-bottom: env(safe-area-inset-bottom, 0px); }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item { color: rgba(255,255,255,.72); font-family: var(--ld-text); font-size: 12px; font-weight: 600; letter-spacing: 0; gap: 4px; padding: 10px 0 12px; -webkit-tap-highlight-color: transparent; transition: color 140ms; }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item i { font-size: 24px; color: inherit; transition: transform 140ms cubic-bezier(.2,0,0,1); }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:active i { transform: scale(.9); }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:hover,
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:focus-visible,
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item.is-current { color: var(--ld-white); }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:focus-visible { outline: 2px solid var(--ld-ice); outline-offset: -4px; border-radius: 12px; }
	/* Search is the centre action: a raised blue circle */
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:nth-child(2) { color: var(--ld-white); }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:nth-child(2) i { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -20px 0 0; border-radius: 999px; background: var(--ld-electric); font-size: 20px; box-shadow: 0 8px 20px -6px rgba(61,107,255,.8); }
}

/* QA C, 15 Oct: the bar's two sheets (More: account links; Search) were still Adrian's look, a white sheet with green type, an orange-focus close button, cream-bordered tiles with
   amber icons and a dark green Search button, beside a navy v3 header and bar. Same markup and scripts (child theme functions.php), v3 tokens only: page grey, midnight type,
   white rows on a soft card shadow, electric icons and Search, a quiet round close. */
@media (max-width: 799px) {
	.idu-overlay { background: var(--ld-page); }
	.idu-overlay .idu-overlay__head { padding-top: 20px; padding-bottom: 14px; }
	.idu-overlay .idu-overlay__title { color: var(--ld-midnight); font: 800 24px/1.15 var(--ld-heading); letter-spacing: -.02em; }
	.idu-overlay .idu-overlay__close, .idu-overlay .idu-overlay__close:hover, .idu-overlay .idu-overlay__close:focus, .idu-overlay .idu-overlay__close:active {
		width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--ld-white); color: var(--ld-midnight); box-shadow: var(--ld-shadow-card); outline: none;
	}
	.idu-overlay .idu-overlay__close:focus-visible { outline: 2px solid var(--ld-electric); outline-offset: 2px; }
	.idu-overlay .idu-overlay__close:active { transform: scale(.94); }
	.idu-more-menu .idu-more-menu__label { color: var(--ld-text-muted); font: 700 11.5px/1.2 var(--ld-text); letter-spacing: .12em; }
	.idu-more-menu .idu-more-menu__grid { gap: 10px; }
	.idu-more-menu .idu-more-menu__link { min-height: 56px; border: 0; border-radius: 16px; background: var(--ld-white); box-shadow: var(--ld-shadow-card); color: var(--ld-midnight); font: 600 15px/1.25 var(--ld-text); overflow-wrap: anywhere; transition: transform 140ms cubic-bezier(.2,0,0,1); }
	.idu-more-menu .idu-more-menu__link i { color: var(--ld-electric); }
	.idu-more-menu .idu-more-menu__link:active { background: var(--ld-white); transform: scale(.97); }
	.idu-search-menu .idu-search-menu__label { color: var(--ld-midnight); font: 800 24px/1.2 var(--ld-heading); letter-spacing: -.02em; }
	.idu-search-menu .idu-search-menu__row { border: 0; background: var(--ld-white); box-shadow: var(--ld-shadow-card); padding: 5px; gap: 6px; }
	.idu-search-menu .idu-search-menu__row input[type="search"] { height: 46px; padding: 0 14px; color: var(--ld-midnight); font: 400 16px/1 var(--ld-text); }
	.idu-search-menu .idu-search-menu__submit, .idu-search-menu .idu-search-menu__submit:hover, .idu-search-menu .idu-search-menu__submit:focus { border-radius: 999px; padding: 0 20px; background: var(--ld-electric); color: var(--ld-white); font: 600 15px/1 var(--ld-text); }
}

/* Search sheet suggestion chips (added by ld_chrome_bar_extras() in includes/pages/chrome.php): the homepage hero's chips, light version. Any width: the sheet only opens on phones. */
.idu-search-menu .ld-bar-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.idu-search-menu .ld-bar-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ld-white); box-shadow: var(--ld-shadow-card); color: var(--ld-midnight); font: 600 14px/1.2 var(--ld-text); text-decoration: none; transition: transform 140ms cubic-bezier(.2,0,0,1); }
.idu-search-menu .ld-bar-chip:active { transform: scale(.96); }
.idu-search-menu .ld-bar-chip:focus-visible { outline: 2px solid var(--ld-electric); outline-offset: 2px; }

/* Primary buttons and the tab bar: one rule for every composer and form (Nikita 1 Nov, item 2: "Can't find post button", the group composer's Post
   sat under this bar). The bar is 81px tall plus the phone's safe area and sits at z-index 999.
   1. A sheet or dialog (a composer, a picker, a confirm) covers the tab bar: it sits at --ld-z-sheet and pads its foot with the safe area, the way
      BuddyBoss's post sheet does.
   2. A page form (rooms, sale, cars, jobs, business, events, start a group, profile edit) trades the tab bar for its own fixed action bar with the
      safe area in its padding (forms-listing.css .ldlf-bar, job-post.css .ljp-nav, profile-home.css .ldpf-ebar): Start a group is the reference.
   3. Anything else pinned to the bottom of a page with the tab bar showing sits at bottom: calc(var(--ld-tabbar-h) + env(safe-area-inset-bottom)). */
:root { --ld-tabbar-h: 0px; --ld-z-sheet: 100001; }
@media (max-width: 799px) { body:has(nav.idu-bottom-toolbar) { --ld-tabbar-h: 81px; } }

/* While the iPhone keyboard is up the bar steps aside (frontend.php adds .ld-kb from visualViewport), so it can't be left floating mid-screen */
nav.idu-bottom-toolbar.ld-kb { visibility: hidden; }

/* Bars pinned to the screen bottom on iPhone Safari (Kyle 5 Nov: the tab bar floating mid-screen while scrolling, a grey strip under it, and car and
   job pages that stop with the owner and employer behind the sticky price bar). The BuddyBoss theme sets html { height: 100% } and
   body { overflow-x: hidden }: the root box is the first-load (short) viewport and the body becomes a scroll box, so when Safari's toolbar
   collapses or the page bounces, bottom-fixed bars and the scroll end are measured against the old, shorter screen. The root grows with its
   content instead, and the body clips sideways without becoming a scroll box (the feed's fix, 47a908d, now for every page). */
html { height: auto; }
html body { overflow-x: clip; overflow-y: visible; }

/* One rule for every sticky page action bar (Kyle 5 Nov 8:23pm, "obviously a site wide issue": the job's Apply bar hid View business and clipped
   the Search button; the car's price bar hid the owner; the Apply bar drew over the More menu). frontend.php's bar script marks each page bar
   (job, listing, room, car, buy and sell, event, forms, founding, profile edit, sign-up questions) .ld-actbar and measures, on the real screen,
   --ld-nav-h (the tab bar with the phone's safe area, 0 when the page has none) and --ld-nav-bump (how far its round Search button rises above
   it). Each bar sits on top of the tab bar and clear of the bump; the page keeps --ld-bars-h (tab bar + bump + bar) free at its foot, so its
   last element always scrolls clear of the bars; a menu sheet (More, Search) hides the bar while it is open. */
@media (max-width: 799px) {
	html body .ld-actbar:not(#ld-none) { bottom: var(--ld-nav-h, 0px) !important; }
	/* over a tab bar: the bar's foot is padded by the bump (the tab bar already carries the safe area), and the tab bar draws over that padding, so the
	   round Search button shows whole, the bar's buttons stay clear of it, and no strip of page shows between the two bars */
	html.ld-nav-on body .ld-actbar:not(#ld-none) { padding-bottom: calc(10px + var(--ld-nav-bump, 0px)) !important; }
	html.ld-nav-on body:has(.ld-actbar):not(:has(.idu-overlay.is-open)) nav.idu-bottom-toolbar:not(#ld-none) { z-index: 9991; }
	/* the page keeps the bars' height free at its foot; the page wrappers' own guesses at it (190px, 96px) step aside so the end isn't doubly empty */
	html body:has(.ld-actbar) { padding-bottom: calc(var(--ld-bars-h, 0px) + 24px) !important; }
	html body:has(.ld-actbar) :is(.idu-wrap.ljs, .lx) { padding-bottom: 0 !important; }
	html body.ld-cookie-float:has(.ld-actbar) #wpconsent-root *::part(wpconsent-banner) { bottom: calc(var(--ld-bars-h, 0px) + 8px) !important; }
	html body:has(.idu-overlay.is-open) .ld-actbar { visibility: hidden; }
}

/* 20 Nov audit at 390: the bar's labels sat on three different lines (Search 2px high, More 2px low) because the two buttons carry a 27px line height and
   More's icon is 27px tall. One line height and one icon height; the bar stays 81px and the Search circle stays where it was. */
@media (max-width: 799px) {
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item { min-height: 80px; }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item > span { line-height: 15px; }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item > i { height: 24px; line-height: 24px; }
	nav.idu-bottom-toolbar .idu-bottom-toolbar__item:nth-child(2) > i { height: 40px; line-height: 40px; margin: -24px 0 8px; }
}
