/*
 * Midway: the inner pages. The shared sections (about, events, FAQ, safety,
 * reviews, service area) and the booking platform's pages draw with core's
 * --prt-* tokens; here they take the palette's own tokens, so they follow the
 * dark look too, and they get the fairground's ink rules, gold marks and
 * Bebas caps in place of core's soft cards. Palette tokens only, no hex.
 */

/* ---- core and plugin tokens, from the palette (both looks) ---- */
:root:root {
	--prt-ink: var(--ink); --prt-muted: var(--muted); --prt-line: var(--line);
	--prt-bg: var(--mist); --prt-surface: var(--paper); --prt-surface-alt: var(--blue-lt);
	--prt-primary: var(--orange); --prt-primary-text: var(--orange); --prt-primary-ink: var(--on-primary);
	--prt-primary-ground: var(--orange); --prt-primary-hover: var(--orange-dk);
	--prt-accent: var(--blue); --prt-accent-ink: var(--on-primary);
	--prt-cta: var(--orange); --prt-cta-text: var(--orange);
	--prt-font-display: var(--disp); --prt-font-body: var(--body);
	--wdz-primary: var(--orange); --wdz-accent: var(--blue);
	--wdz-text: var(--ink); --wdz-text-muted: var(--muted); --wdz-text-on-primary: var(--on-primary);
	--wdz-surface: var(--paper); --wdz-surface-alt: var(--blue-lt); --wdz-border: var(--line); --wdz-body: var(--mist);
}

/* Core prints these from the light tokens (core/inc/bridge.php), so in the dark
   look the rental title, prices and details on the booking pages, and Toolkit's
   town-page headings, came out dark ink on the dark ground. From the palette,
   they follow the look. Buttons keep core's grounds. */
html body.prt {
	--wdz-io-accent-primary: var(--orange); --wdz-io-accent-secondary: var(--blue);
	--wdz-io-accent-tertiary: var(--orange); --wdz-io-accent-quaternary: var(--blue);
	--wdz-io-product-title: var(--ink); --wdz-io-product-price: var(--orange);
	--wdz-io-detail-bg: var(--paper); --wdz-io-detail-label: var(--muted); --wdz-io-detail-value: var(--ink);
	--wdz-io-text-on-dark: var(--ink); --wdz-io-brand-navy: var(--ink);
	--wdz-io-brand-teal: var(--orange); --wdz-io-brand-red-hover: var(--orange-dk);
}
html body.prt[class*="elementor-kit-"] {
	--e-global-color-primary: var(--orange); --e-global-color-secondary: var(--blue);
	--e-global-color-text: var(--ink); --e-global-color-accent: var(--orange);
}
/* Toolkit's town pages and town FAQ force #222 text (!important): invisible on
   the dark ground. In dark they read in the palette; light is unchanged. */
html body.prt.prt-dark :is(.wdz-entry-content, .wdz-entry-faq),
html body.prt.prt-dark :is(.wdz-entry-content, .wdz-entry-faq) :is(p, li, ul, ol, span, div) { color: var(--muted) !important; }
html body.prt.prt-dark :is(.wdz-entry-content, .wdz-entry-faq) :is(strong, h2, h3, h4), html body.prt.prt-dark .wdz-ai-faq__title { color: var(--ink) !important; }
html body.prt.prt-dark :is(.wdz-entry-content, .wdz-entry-faq) a:not([href*="book"]):not([href*="Book"]):not([href*="reserve"]) { color: var(--orange) !important; }
html body.prt.prt-dark :is(.wdz-entry-content, .wdz-entry-faq) a:not([href*="book"]):not([href*="Book"]):not([href*="reserve"]):hover { color: var(--ink) !important; }

/* BookFlow's item calendar stays a white card in the dark look (core), but core
   colours its "Prefer to talk? (phone)" line from the theme's ink, which in dark
   is near-white on the card. It takes the card's own ink. */
html body.prt.prt-dark .wdz-itemcal :is(.wdz-itemcal__pprompt, .wdz-itemcal__pcall) { color: var(--on-card-muted) !important; }
html body.prt.prt-dark .wdz-itemcal .wdz-itemcal__pcall a { color: var(--on-card-link) !important; }
/* BookFlow's rental cards on the category pages stay white too; their names took
   the dark look's light red (3.6:1 on the card). The card's own deep red. */
html body.prt.prt-dark .wdz-browse .wdz-browse__card-name > a,
html body.prt.prt-dark .wdz-browse .wdz-browse__card-name > a:hover { color: var(--on-card-link) !important; }

/* ---- page header (parts/section-page_header.php and midway_page_head()) ---- */
.gph h1 em { font-style: normal; color: var(--sun); }
.gph--sec { padding: 4.6rem 0 4rem; }
/* the eyebrow as the hero's tilted gold ticket */
.gph__pill {
	display: inline-block; width: auto; background: var(--sun); color: var(--on-sun);
	font-family: var(--disp); font-size: 1.05rem; font-weight: 400; letter-spacing: .12em; line-height: 1.3;
	padding: .25rem 1rem; transform: rotate(-1.5deg);
}
/* with a photo: the photo takes the stripes' place under the same veil */
.gph--photo { padding: 6rem 0 5rem; }
.gph__ph { position: absolute; inset: 0; z-index: 0; }
.gph__ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gph__ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--veil-a), var(--veil-b)); }
@media (max-width: 640px) {
	.gph--sec { padding: 3.2rem 0 2.8rem; }
	.gph--photo { padding: 4rem 0 3.4rem; }
	.gph .cta .btn { width: 100%; }
}

/* ---- the shared sections: Midway's ink rules and gold in place of core's soft cards ---- */
.prts :is(h1, h2, h3) { font-weight: 400; line-height: .95; }
.prts h3 { line-height: 1.05; }
.prts :is(h1, h2) em, .prts-strip__title em { font-style: normal; color: var(--orange); }

/* buttons: the solid one is the home page's red button on its hard shadow, the ghost its ink outline */
.prts .prts-btn, .prt-io-off .prt-io-off__btn {
	font-family: var(--disp); font-weight: 400; font-size: 1.2rem; letter-spacing: .05em; border-radius: var(--r-sm); border-width: 3px;
}
.prts .prts-btn:not(.prts-btn--ghost), .prt-io-off .prt-io-off__btn:not(.prt-io-off__btn--alt),
body.prt-dark .prt-io-off__btn:not(.prt-io-off__btn--alt) {
	background: var(--orange) !important; color: var(--on-primary) !important; border-color: transparent;
	box-shadow: 0 4px 0 var(--orange-dk); transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}
.prts .prts-btn:not(.prts-btn--ghost):hover, .prt-io-off .prt-io-off__btn:not(.prt-io-off__btn--alt):hover {
	background: var(--orange-dk) !important; box-shadow: 0 2px 0 var(--orange-dk); transform: translateY(2px);
}
.prts .prts-btn--ghost, .prt-io-off .prt-io-off__btn--alt { color: var(--ink); background: transparent; border: 3px solid var(--ink); }
.prts .prts-btn--ghost:hover, .prt-io-off .prt-io-off__btn--alt:hover { background: var(--ink); color: var(--mist); }

/* small solid marks (ticks, step numbers, avatars, active tabs) are gold discs on an ink rule */
:is(.prts-story__tick, .prts-values__tick, .prts-minirev__av, .prts-rwcard__av, .prts-strip__ic, .prts-weather__ic, .pe-pack__badge, .prts-check__box),
.prts-ssteps__track :is(a[aria-current], a.is-done) .prts-ssteps__n {
	background: var(--sun); color: var(--on-sun); border: 2px solid var(--ink);
}
:is(.pe-tab.is-active, .prts-fqtabs a.is-on, .prts-rwall__filters [aria-pressed="true"]) { background: var(--ink); color: var(--mist); border-color: var(--ink); }
.prts-check__list.is-live li:not(.is-checked) .prts-check__box { background: var(--paper); border-color: var(--line); }
.prts-check__list li.is-checked, .prts-check__list.is-live li.is-checked { border-color: var(--ink); background: var(--blue-lt); }
:is(.prts-ssteps__bar i, .prts-rsum__bar i) { background: var(--orange); }
.prts-story__badge { background: var(--sun); color: var(--on-sun); border: 3px solid var(--ink); box-shadow: 0 0 0 6px var(--mist); }
.prts-story__badge :is(b, span) { color: var(--on-sun); }

/* the big blocks: the deep band with gold marks, as the home page's safety band */
:is(.prts-band__list, .prts-values__guar, .prts-rfeat__box, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) {
	background: var(--deep); color: var(--on-deep); border: 3px solid var(--ink); border-radius: var(--r-lg);
}
:is(.prts-band__list, .prts-values__guar, .prts-rfeat__box, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) :is(h2, h3, b, .prts-strip__title) { color: var(--on-deep); }
:is(.prts-band__list, .prts-values__guar, .prts-rfeat__box, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) :is(p, li, .prts-info, span:not(.prts-values__seal, .prts-strip__ic, .prts-band__ic), blockquote, figcaption, cite, .prts-strip__sub) { color: var(--on-deep-dim); }
.prts-fqcard .prts-info svg, .prts-fqcard__tel svg { color: var(--sun); }
:is(.prts-band__list, .prts-values__guar, .prts-rfeat__box, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) :is(.prts-eyebrow, a:not(.prts-btn), .prts-strip__tel, h2 em, .prts-strip__title em) { color: var(--sun); }
.prts-band__list b { color: var(--sun); font-family: var(--disp); font-weight: 400; }
:is(.prts-rfeat__box, .prts-values__guar) .stars, .prts-rfeat__box [class*="star"] { color: var(--sun); }
.prts-band__ic, .prts-strip.is-bold .prts-strip__ic { background: var(--sun); color: var(--on-sun); }
/* a button on the deep band is the gold one; its outline is drawn in the band's light ink */
:is(.prts-values__guar, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) .prts-btn:not(.prts-btn--ghost),
.prts-values__guar a[href^="tel:"] {
	background: var(--sun) !important; color: var(--on-sun) !important; box-shadow: 0 4px 0 var(--sun-dk);
}
:is(.prts-values__guar, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) .prts-btn--ghost { color: var(--on-deep); border-color: var(--on-deep); }
:is(.prts-values__guar, .prts-fqcard, .prts-ctabox, .prts-strip.is-bold .prts-strip__box) .prts-btn--ghost:hover { background: var(--on-deep); color: var(--deep); }
.prts-values__guar .prts-values__seal { background: var(--sun); color: var(--on-sun); }

/* cards: the home page's ink-ruled card, lifting on hover */
:is(.prts-box, .prts-card, .prts-values__card, .prts-minirev__card, .prts-rwcard, .pe-pack, .prts-fqitem, .prts-rsum__score, .prts-rplat__b, .prts-check__list li) {
	border: 3px solid var(--ink); border-radius: var(--r-md); box-shadow: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
:is(.prts-values__card, .prts-minirev__card, .prts-rwcard, .pe-pack, .prts-rplat__b, .prts-card):hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.prts-fqitem[open], .prts-fqitem.is-open { background: var(--blue-lt); }
.pe-pack.is-featured { border-color: var(--orange); box-shadow: 0 6px 0 var(--orange); }
.prts-weather__box { border: 3px dashed var(--orange); background: var(--paper); }
:is(.prts-card, .prts-values__card, .pe-pack, .prts-rwcard) :is(h3, b) { font-weight: 400; }

/* form fields: the ink rule, dark in the dark look */
.prts-form :is(input, textarea), body.prt-dark .prts-form :is(input, textarea) {
	background: var(--mist); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-sm);
}
.prts-form :is(input, textarea):focus-visible { border-color: var(--orange); }
.prts-fqq { font-size: 1.35rem; letter-spacing: .02em; line-height: 1.15; }
.prts-fqsearch { background: var(--paper); border: 3px solid var(--ink); }
.prts-fqhero { background: var(--paper); border-bottom: 3px solid var(--ink); }
mark.prt-fq-hit { background: var(--sun); color: var(--on-sun); }

/* the call-to-action strips: a ruled paper bar; the title in the display caps, never faux-bold */
.prts-strip__box { background: var(--paper); border: 3px solid var(--ink); border-radius: var(--r-md); }
.prts-strip__title { font-weight: 400; font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: .02em; line-height: 1.1; }

/* service area map: the home page's map, without the card along its foot */
.prts-amap__map.areamap { min-height: 380px; }
.prts-amap__map .areamap__facade { padding: 0; }
.prts-amap__map iframe.areamap__frame { min-height: 380px; }
.prts-amap__list :is(a, span) { color: var(--ink); }
.prts-amap__list svg { color: var(--orange); }
/* phones: the stats band two by two, not one tall column */
@media (max-width: 419px) {
	.prts-band__list:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
	.prts-band__list b { font-size: 2.2rem; }
}

/* ---- rental category and rental pages while the booking platform is off (parts/rental-page.php) ---- */
.rpage { padding-block: 3.5rem 5rem; }
.btn-sm { padding: .5rem 1rem; font-size: 1.05rem; }
.rcard .foot .prt-atc { position: relative; z-index: 2; } /* above the link that opens the whole card */

/* the category's (or rental's) full description, on a ruled paper panel */
.rabout {
	margin: 4rem auto 0; max-width: 820px; padding: clamp(1.6rem, 4vw, 2.6rem);
	border-radius: var(--r-md); border: 3px solid var(--ink); background: var(--paper);
}
.rabout h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.rabout p { color: var(--muted); font-size: 1.04rem; }
.rabout p + p { margin-top: .9rem; }
.rabout--cols, .rabout--wide { max-width: none; }
@media (min-width: 900px) { .rabout--cols .rabout__txt { columns: 2; column-gap: 2.6rem; } }

.rdeliver { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 2rem auto 0; max-width: 820px; color: var(--muted); text-align: left; }
.rdeliver__ic { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--sun); color: var(--on-sun); border: 2px solid var(--ink); }
.rdeliver__ic svg { width: 1.1rem; height: 1.1rem; }
.rdeliver a { color: var(--ink); font-weight: 700; }
.rcopy { margin: 3rem auto 0; max-width: 72ch; color: var(--muted); }
.rcopy :is(h2, h3) { color: var(--ink); }
.rpage .prt-io-off { margin-top: 4rem; }
/* core's "booking is taking a break" card, as the theme's ink-ruled card */
.prt-io-off { border: 3px solid var(--ink); border-radius: var(--r-md); background: var(--paper); box-shadow: 0 6px 0 var(--ink); }
.prt-io-off h2 { font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.2rem); }

/* category page: the category's name over the cards, "About our …" over its
   description, the delivery note, then the page's own copy */
.rpage__h { text-align: center; font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin: 0 auto 1.8rem; }
.rabout-wrap { margin-top: 5rem; }
.rabout-wrap .rabout { margin-top: 0; }
.rabout--c { max-width: 720px; text-align: center; }
.rdeliver--box { max-width: 720px; margin-top: 2.2rem; padding: 1.1rem 1.4rem; border-radius: var(--r-md); border: 2px dashed var(--line); background: var(--paper); font-size: .97rem; }
.rcopy--panel { max-width: 820px; margin-top: 2.2rem; padding: clamp(1.5rem, 4vw, 2.4rem); border-radius: var(--r-md); border: 3px solid var(--ink); background: var(--paper); }
.rcopy--panel p + p { margin-top: .9rem; }
.rabout > p:last-child, .rcopy--panel > :last-child { margin-bottom: 0; }

/* rental page: the photo and its card on the left, availability on the right */
.ritem-wrap { padding-top: 1.5rem; }
.ritem { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.4rem, 3vw, 2.6rem); align-items: start; }
.ritem__main { display: grid; gap: 1.3rem; min-width: 0; }
.ritem__ph { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-md); border: 3px solid var(--ink); background: var(--blue-lt); }
.ritem__ph img { width: 100%; height: 100%; object-fit: contain; padding: 1.6rem; }
.ritem__ph.is-cut img { object-fit: cover; padding: 0; }
.ritem__card { padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: var(--r-md); border: 3px solid var(--ink); background: var(--paper); }
.ritem__cat { display: inline-block; margin-bottom: 1rem; text-decoration: none; }
.ritem__card h1 { font-size: clamp(2.6rem, 5vw, 3.6rem); }
.ritem__row { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.4rem; flex-wrap: wrap; margin-top: 1.1rem; }
.ritem__price { margin: 0; display: flex; align-items: baseline; gap: .5rem; padding: .6rem 1.1rem; border-radius: var(--r-sm); background: var(--mist); border: 2px dashed var(--line); }
.ritem__price b { font-family: var(--disp); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--orange); }
.ritem__price span { color: var(--muted); }
.ritem__pick { text-decoration: none; }
.ritem__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1.4rem 0 0; }
.ritem__facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ritem__facts--1 { grid-template-columns: minmax(0, 1fr); max-width: 260px; }
.ritem__facts div { padding: .75rem 1rem; border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--mist); }
.ritem__facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ritem__facts dd { margin: .2rem 0 0; font-family: var(--disp); font-size: 1.45rem; letter-spacing: .02em; white-space: nowrap; }
.ritem__side {
	position: sticky; top: calc(var(--head-h) + 1rem); padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--r-md);
	border: 3px solid var(--ink); background: var(--paper); box-shadow: 0 6px 0 var(--ink); scroll-margin-top: calc(var(--head-h) + 1rem);
}
.ritem__side h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); }
.ritem__side > p { margin-top: .6rem; color: var(--muted); }
.ritem__btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }
.ritem__btns .btn { flex: 1 1 12rem; justify-content: center; white-space: nowrap; }
.ritem__ticks { list-style: none; margin: 1.4rem 0 0; padding: 1.2rem 0 0; border-top: 2px dashed var(--line); display: grid; gap: .55rem; color: var(--muted); font-size: .95rem; }
.ritem__ticks li { display: flex; align-items: center; gap: .55rem; }
.ritem__ticks svg { flex: none; width: 1.15rem; height: 1.15rem; color: var(--orange); }
.ritem__talk { margin-top: 1.1rem; padding-top: 1rem; border-top: 2px dashed var(--line); color: var(--muted); }
.ritem__talk a { color: var(--ink); font-weight: 700; text-decoration: none; }
.ritem__talk a:hover { color: var(--orange); }
.ritem-wrap .rabout { margin-top: 3.5rem; }
.ritem-wrap .rdeliver--box { margin-top: 2.2rem; }

/* four rentals to look at next */
.rrel { margin-top: 4.5rem; }
.rrel__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.rrel__head h2 { font-size: clamp(2.2rem, 4vw, 3rem); }
.rrel__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.rrel__card::before, .rrel__card::after { top: calc(75cqw - 12.5px); } /* its photo is 4:3, so the tear line is lower */
.rrel__card .ph { aspect-ratio: 4 / 3; }
.rrel__card .body { padding: 1.1rem 1.15rem 1.25rem; gap: .35rem; }
.rrel__card h3 { font-size: 1.5rem; }
.rrel__price { font-family: var(--disp); font-size: 1.4rem; margin-top: auto; }
.rrel__card .foot__go { margin-top: .3rem; align-self: flex-start; }

/* category header: the date button */
.gph__date { margin-top: 1.6rem; }
.gph__date .btn svg { width: 1.1em; height: 1.1em; }

@media (max-width: 1000px) { .rrel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
	.ritem { grid-template-columns: minmax(0, 1fr); }
	.ritem__side { position: static; }
}
@media (max-width: 640px) {
	.rpage .cards { grid-template-columns: 1fr; }
	.rdeliver { align-items: flex-start; }
}
@media (max-width: 560px) {
	.ritem__facts--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.rrel__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) { .ritem__facts dd { font-size: 1.2rem; } }

/* Contact: the social buttons sit on the card, not the dark footer */
.nap__soc a { color: var(--ink); border-color: var(--ink); }

/* 404 search: the red button beside the field */
.search-form .search-submit {
	padding: .7rem 1.3rem; border: 3px solid transparent; border-radius: var(--r-sm); cursor: pointer;
	font-family: var(--disp); font-size: 1.2rem; letter-spacing: .05em; color: var(--on-primary);
	background: var(--orange); box-shadow: 0 4px 0 var(--orange-dk);
}
.search-form .search-submit:hover { background: var(--orange-dk); }

/* card titles balance, so a short last word is not left alone on its line */
.prts :is(h3, .prts-card h3) { text-wrap: balance; }
.pe-pick__name { text-wrap: balance !important; }
@media (max-width: 400px) { .prts .pe-pick__name, .pe-pick__name { font-size: .95rem !important; } }
