/* Chicago Lifts — WP-environment shims for the ported design system.
 * The design CSS (cl-styles/cl-components/page css) is verbatim from the
 * prototype; this file adapts the handful of environment differences. */

/* Content width (improvement — Tariq 2026-07-06): the prototype's --max:1440px
 * lets content sprawl to the screen edges on wide displays, so left-aligned
 * headings and body hug the left with dead space on the right. Tighten the
 * shared measure so every page reads centered and balanced on 1440px+ monitors.
 * One token → applies everywhere via .container. */
:root { --max: 1200px; }

/* Density (improvement — Tariq 2026-07-06): the prototype's editorial section
 * padding runs up to 96–120px vertical, which reads as excess empty space in the
 * WP build — content feels spread out and needs a lot of scrolling. Tighten the
 * vertical rhythm on the big content / CTA sections so related info sits closer. */
.ud-cta, .ud-history, .ud-included, .svc-cta, .svc-promises, .svc-calc,
.uptime-sla, .uptime-grandfather, .product-picker, .svc-faq, .prod-breadth,
.prod-compare, .csv-cta, .bsv-models, .csv-related, .prod-grid-sec {
	padding-top: clamp(28px, 3vw, 52px);
	padding-bottom: clamp(28px, 3vw, 52px);
}

/* Detail-hero actions (improvement — Tariq): Reserve + Make-offer share the top
 * row, Call sits full-width below (the prototype's 2+1 layout), independent of
 * container width so it doesn't collapse to 1+1+1 on the narrower measure. */
.ud-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ud-hero__actions > .btn:nth-child(1),
.ud-hero__actions > .btn:nth-child(2) { flex: 1 1 calc(50% - 6px); }
.ud-hero__actions > .btn:nth-child(3) { flex: 1 1 100%; }

/* FAQ accordion: the prototype mounts answers conditionally in React.
 * Server-rendered pages keep all answers in the DOM and toggle a class. */
.city-faq__item .city-faq__a { display: none; }
.city-faq__item.is-open .city-faq__a { display: block; }

/* Mobile drawer accordion (server-rendered): a group's children stay collapsed
 * until its chevron toggles .is-expanded (cl-pages.js); rotate the chevron open.
 * Verbatim drawer markup, WP just needs the display toggle the React conditional
 * gave it for free. */
.cl-nav__mobile-children { display: none; }
.cl-nav__mobile-group.is-expanded .cl-nav__mobile-children { display: block; }
.cl-nav__mobile-toggle svg { transition: transform .18s ease; }
.cl-nav__mobile-group.is-expanded .cl-nav__mobile-toggle svg { transform: rotate(180deg); }

/* The prototype's secondary util-nav styles target <button>; the WP port
 * uses real links. Mirror the button rule EXACTLY (components.css:168) —
 * 11px uppercase tracked mono is part of the documented type system. */
.cl-nav__util-nav a {
	background: transparent;
	border: none;
	color: var(--bg);
	font: inherit;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0;
	cursor: pointer;
	transition: color .15s ease;
	text-decoration: none;
}
.cl-nav__util-nav a:hover { color: var(--red); }

/* Brand-hero chip list: prototype rule targets <button> (page-brands.css:366). */
.brand-hero__chip-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	background: transparent;
	border: 0;
	padding: 12px 0;
	text-align: left;
	font: inherit;
	color: inherit;
	cursor: pointer;
	transition: padding .12s ease;
	text-decoration: none;
}
.brand-hero__chip-list a:hover { padding-left: 6px; color: var(--brand-accent); }

/* Same treatment for the universal-crumbs anchors (prototype uses buttons). */
.universal-crumbs a {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--ink-2);
	cursor: pointer;
	transition: color .12s ease;
	text-decoration: none;
}
.universal-crumbs a:hover { color: var(--red); text-decoration: underline; }

/* Util-strip promo link: the prototype's own class rule applies to anchors
 * (safety-yellow, components.css:1069) — only kill the default underline. */
a.cl-nav__util-offer-link { text-decoration: none; }

/* Sticky site header under the WP admin bar (logged-in reviewers). */
body.admin-bar .cl-nav { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .cl-nav { top: 46px; }
}

/* Positioning context for the static DropPhoto port. */
.drop-photo { position: relative; overflow: hidden; }

/* Anchors that play button roles inherit the pointer. */
a.cl-nav__mobile-item, a.cl-nav__item { cursor: pointer; }

/* Mega-menu anchor variants (v0.2.15) — REPAIRED 0.2.64: the old
 * display:block overrides here defeated the design system's flex-column
 * stacking on <a> items and column heads (labels + descriptions ran inline
 * and wrapped mid-item — Tariq's prototype-vs-WP catch, 2026-07-10). The
 * flex layout now lives in cl-components-v3.css with selectors covering
 * both <button> and <a>; the shim only keeps color inheritance. */
.cl-mega__col-head, .cl-mega__list a, .cl-mega__feature-cta, .cl-mega__feature-foot a { color: inherit; }

/* ── Touch ergonomics (Fitts/Baymard pass 2026-07-03) ────────────────────
 * 44px minimum touch targets on coarse pointers for the controls people
 * actually hammer: qty stepper, Remove, checkboxes, drawer. Desktop mouse
 * keeps the denser design-system metrics. */
@media (pointer: coarse) {
	.chk-qty-btn { min-width: 44px; min-height: 44px; }
	.chk-qty-input { min-height: 44px; }
	.chk-line__remove { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
	.chk-check input[type="checkbox"], .chk-rail input[type="checkbox"] { width: 18px; height: 18px; }
	.cl-nav__burger, [class*="cl-nav__menu"] { min-width: 44px; min-height: 44px; }
	.cl-footer a { padding-top: 5px; padding-bottom: 5px; }
}
/* Promo dismiss × was a 14×15 hit box — pad the target, keep the visual. */
.cl-nav__util-offer-close { padding: 8px; margin: -8px; line-height: 1; }

/* ── Clickable cards (stretched-link, UX 2026-07-03) ─────────────────────
 * Whole card = "view details"; explicit buttons keep their own actions by
 * sitting above the overlay. Standard catalog pattern (Fitts's law). */
.rental-unit, .prod-card { position: relative; }
.cl-card-link { position: absolute; inset: 0; z-index: 1; }
.rental-unit a:not(.cl-card-link), .prod-card a:not(.cl-card-link),
.rental-unit button, .prod-card button { position: relative; z-index: 2; }

/* ── New-card uniform height (Tariq no-gap pass 2026-07-06) ───────────────
 * The prod-card foot is bottom-pinned (margin-top:auto — verbatim). When one
 * card in a grid row has a 2-line product name, the row stretches its 1-line
 * siblings and floats their price row on a 50–70px gap. Reserving two name
 * lines makes every card the same height, so the gap stays at the ~24px
 * design floor across the whole grid. */
/* Compact fix (Tariq 2026-07-06 rev): stretching every card to the row's tallest
 * is what opened the whitespace above the bottom-pinned foot and made cards too
 * long to fit. Natural height = the price sits right under the specs, no gap. */
.prod-grid { align-items: start; }
.prod-card__name { min-height: 0; }

/* Header cart icon (Tariq: standard cart entry point in the nav). Appears only
 * when the cart has items; count badge in brand red. */
.cl-nav__cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--ink); text-decoration: none; margin-right: 2px; }
.cl-nav__cart:hover { color: var(--red); }
.cl-nav__cart-count { position: absolute; top: 1px; right: -1px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--red); color: #fff; border-radius: 9px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* Nav width (Tariq nav-verbatim pass 2026-07-06): the content measure was
 * tightened to --max:1200 so left-aligned copy reads centered on wide screens.
 * The NAV, though, carries logo + 7 hubs + Sign-in + Get-a-Quote and needs the
 * prototype's fuller width or the logo tagline compresses to 3 lines and the
 * CTA crowds. Give the header rows their own slightly wider measure so the bar
 * matches the prototype while page content stays centered at 1200. */
.cl-nav__util-inner, .cl-nav__main { max-width: 1320px; }

/* ── QuoteCartBadge (global floating cart) ────────────────────────────────
 * Verbatim from page-checkout.css:576-623. Lives HERE (not in the shop-only
 * cl-page-checkout.css enqueue) because the badge follows the user across
 * EVERY page — city, brand, hub, product. Element is an <a> in the WP port
 * (prototype used <button>), hence the text-decoration guard. */
.chk-fab {
	position: fixed;
	right: clamp(16px, 3vw, 32px);
	bottom: clamp(16px, 3vw, 32px);
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 22px;
	background: var(--red);
	color: #fff;
	border: 0;
	font-family: var(--display);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 12px 32px rgba(212, 52, 30, 0.35), 0 2px 6px rgba(0, 0, 0, 0.18);
	transition: transform .15s, background .15s;
}
a.chk-fab { text-decoration: none; }
.chk-fab--buy {
	background: #2a8a3e;
	box-shadow: 0 12px 32px rgba(42, 138, 62, 0.35), 0 2px 6px rgba(0, 0, 0, 0.18);
}
.chk-fab--rental {
	background: #a07800; /* audit fix: was #b07a00 — second ad-hoc amber; one amber now */
	box-shadow: 0 12px 32px rgba(160, 120, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.18);
}
.chk-fab:hover { background: var(--ink); transform: translateY(-2px); color: #fff; }
.chk-fab__icon { font-size: 11px; opacity: 0.9; }
.chk-fab__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 8px;
	background: #fff;
	color: inherit;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0;
}
.chk-fab--buy .chk-fab__count    { color: #2a8a3e; }
.chk-fab--rental .chk-fab__count { color: #a07800; }
.chk-fab--quote .chk-fab__count,
.chk-fab:not(.chk-fab--buy):not(.chk-fab--rental) .chk-fab__count { color: var(--red); }

/* ── Checkout chooser (Tariq 2026-07-07) ──────────────────────────────────
 * The "two separate requests" split screen was two small pills on a tall
 * empty column. Give each choice a real card that previews the actual items
 * in that group, and add a how-it-works row underneath, so the step reads as
 * full and intentional instead of sparse. */
.chk-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
@media (max-width: 680px) { .chk-choose { grid-template-columns: 1fr; } }
.chk-choose__card {
	display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
	text-align: left; width: 100%; min-height: 240px;
	background: #fff; border: 1px solid #e3ded6; border-radius: 4px;
	padding: 22px 22px 20px; cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.chk-choose__card:hover { border-color: var(--red); box-shadow: 0 12px 30px rgba(14,13,11,.09); transform: translateY(-2px); }
.chk-choose__tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.chk-choose__label { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.08; color: var(--ink); }
.chk-choose__sub { font-size: 13px; color: #6b6862; }
.chk-choose__items { list-style: none; margin: 12px 0 0; padding: 12px 0 0; width: 100%; border-top: 1px solid #f0ece4; display: flex; flex-direction: column; gap: 7px; }
.chk-choose__items li { font-size: 13.5px; color: #3a3833; line-height: 1.35; }
.chk-choose__items li b { color: var(--ink); }
.chk-choose__go { margin-top: auto; padding-top: 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--red); }
.chk-how { margin-top: 24px; border-top: 1px solid #e3ded6; padding-top: 20px; }
.chk-how__t { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6b6862; margin-bottom: 14px; }
.chk-how__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 680px) { .chk-how__row { grid-template-columns: 1fr; gap: 14px; } }
.chk-how__step { display: flex; gap: 11px; align-items: flex-start; }
.chk-how__n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chk-how__tx { display: flex; flex-direction: column; gap: 3px; }
.chk-how__b { font-weight: 700; font-size: 14px; color: var(--ink); }
.chk-how__d { font-size: 12.5px; color: #6b6862; line-height: 1.5; }

/* Live reviews widget (Featurable, Light theme) manages its OWN internal grid
 * and background. The prototype's .hh-reviews__grid is a DARK card-panel (for
 * the built-in light cards); the live widget must NOT inherit that dark panel
 * or its light-theme title/text disappears. Reset to a full-width, transparent
 * block so the widget sits cleanly on the section's light (cream) surface. */
.hh-reviews .hh-reviews__grid--live {
	display: block;
	background: transparent;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
/* The live (carousel) widget is compact, so tighten the section's vertical
 * rhythm — it shouldn't take up as much room as the built-in card grid did. */
.hh-reviews--live { padding-top: clamp(36px, 4vw, 52px); padding-bottom: clamp(36px, 4vw, 52px); }
.hh-reviews--live .hh-fleetnames { margin-top: 28px; }

/* Homepage vertical rhythm (Tariq: "crazy amount of whitespace before/after
 * each section"). The prototype's editorial padding runs 64–115px on the big
 * content sections; tighten them to a consistent ~52px so the page reads denser.
 * Intentionally-flush sections (hero, hh-band, same-day-band) are left alone. */
.hh-browse, .hh-brands, .hh-promise, .hh-industries, .hh-coverage,
.hh-rentals, .hh-results, .hh-emergency {
	padding-top: clamp(36px, 4vw, 52px);
	padding-bottom: clamp(36px, 4vw, 52px);
}

/* Sitewide section rhythm (Tariq: same excess whitespace on every page). The
 * prototype's content sections run 72–115px vertical across service, product,
 * city, catalog and resource pages. Tighten every content <section> to ~56px.
 * Heroes (…-hero) keep their own intentional, larger padding. Attribute
 * selectors so newly-added sections in these clusters inherit the tighter
 * rhythm automatically. */
section[class*="svc-"]:not([class*="hero"]),
section[class*="prdt-"]:not([class*="hero"]),
section[class*="city-"]:not([class*="hero"]),
section[class*="csv-"]:not([class*="hero"]),
section[class*="ipf-"],
section[class*="prod-"]:not([class*="hero"]),
section[class*="uptime-"],
section[class*="bsv-"]:not([class*="hero"]),
section[class*="ud-"]:not([class*="hero"]),
/* 2026-07-07 production sweep: clusters the first pass missed — measured 72
 * to 115px live on promotions (promos-*), financing (fin-*), brands index
 * (bx-list), gallery/videos/brochures (lib-*), compare (cmp-tool), parts
 * (parts-*), and the bare `.section` blocks on contact + PM. Same rhythm. */
section[class*="promos-"]:not([class*="hero"]),
section[class*="fin-"]:not([class*="hero"]),
section[class*="bx-"]:not([class*="hero"]),
section[class*="lib-"]:not([class*="hero"]),
section[class*="cmp-"]:not([class*="hero"]),
section[class*="parts-"]:not([class*="hero"]),
section.section:not([class*="hero"]):not([class*="hh-"]),
section.section--dark {
	padding-top: clamp(36px, 4vw, 56px);
	padding-bottom: clamp(36px, 4vw, 56px);
}

/* 2026-07-07 TRUE-390px mobile pass: the v2 brand-wall consolidation appended
 * `.hh-brands__grid { repeat(12,1fr) }` AFTER the responsive block in
 * cl-page-home.css, so the 6-col/3-col mobile overrides lost the cascade and
 * the homepage scrolled sideways 575px at 390w (prototype bug too — it was
 * never measured under 402px). Restore the file's own responsive intent here
 * in the shim, which loads last. */
/* 2026-07-07 card upgrade (Tariq): financing is PROMINENT on every priced
 * card — its own full-width row linking /financing/ — and the new-equipment
 * card's foot stacks price → financing → a clean full-width button pair
 * (was a cramped side-by-side chip row). */
.cl-fin {
	position: relative; z-index: 2; /* above the stretched card link */
	display: flex; align-items: center; gap: 6px; width: 100%;
	margin: 10px 0 0; padding: 9px 12px;
	border: 1px solid #eadfd2; background: #fdf9f3;
	color: #2e2c28; font-size: 13px; font-weight: 600;
	text-decoration: none; line-height: 1.25;
}
.cl-fin b { color: var(--red, #d4341e); font-size: 15px; font-weight: 800; }
.cl-fin .arrow { margin-left: auto; color: var(--red, #d4341e); }
.cl-fin:hover { border-color: var(--red, #d4341e); }
.inv-card .cl-fin { margin: 10px 0 12px; }
.prod-card__foot--v2 { display: block; }
.prod-card__foot--v2 .prod-card__price--lg { font-size: 21px; font-weight: 800; }
.prod-card__actions--v2 {
	display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
	width: 100%; margin-top: 10px;
}
.prod-card__actions--v2 .btn { width: 100%; justify-content: center; }

@media (max-width: 1100px) {
	.hh-brands__grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 600px) {
	.hh-brands__grid { grid-template-columns: repeat(3, 1fr); }
	/* Hero grids: grid children default to min-width:auto, so the intrinsic
	 * minimum of the quickspec/quickstat grids (3×~144px / 2×~203px) forced
	 * the single mobile track to ~430px and product + catalog pages scrolled
	 * sideways ~60px at 390w. Let children shrink; stack the stat grids two-up. */
	.ud-hero__grid > *, .prod-hero__grid > * { min-width: 0; }
	.ud-hero__quickspecs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.prod-hero__quickstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* Gallery thumb rail: five fixed ~80px thumbs on one nowrap flex line ran
	 * ~430px wide — let it wrap to a second row on phones. */
	.ud-hero__thumbs { flex-wrap: wrap; }
	/* Catalog display H1 ("One showroom." is nbsp-joined) doesn't fit a 390w
	 * line at 48px — scale with the viewport below 600. */
	.prod-hero__h { font-size: clamp(28px, 8.6vw, 40px); }
}