/*
 * Equipment browser, cards, prices and item page parts. Colours come from the brand palette and
 * currentColor, so the same styles work on dark (Dobson) and light brands.
 */
.eq-browser,
.eq-related,
.eq-breadcrumb,
.eq-rates {
	--eq-line: color-mix(in srgb, currentColor 18%, transparent);
	--eq-tint: color-mix(in srgb, currentColor 6%, transparent);
	--eq-muted: var(--wp--preset--color--muted, color-mix(in srgb, currentColor 65%, transparent));
	--eq-radius: 4px;
}

.eq-browser {
	font-size: var(--wp--preset--font-size--medium);
}

.eq-browser :where(input, select, button) {
	font: inherit;
	color: inherit;
}

/* ---- Editor shortcuts (logged-in editors only) */
.eq-browser .eq-admin {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--small);
}
.eq-admin a {
	color: inherit;
	padding: 6px 12px;
	border: 1px dashed var(--eq-line);
	border-radius: var(--eq-radius);
	text-decoration: none;
}
.eq-admin a:hover { border-style: solid; }

/* ---- Toolbar */
.eq-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--eq-line);
}
.eq-field { display: flex; flex-direction: column; gap: 4px; }
.eq-field--search { flex: 1 1 320px; }
.eq-field__label {
	font-size: var(--wp--preset--font-size--small);
	color: var(--eq-muted);
}
.eq-toolbar input[type="search"],
.eq-toolbar select {
	min-height: 44px;
	padding: 8px 12px;
	background: var(--eq-tint);
	border: 1px solid var(--eq-line);
	border-radius: var(--eq-radius);
	width: 100%;
}
.eq-toolbar input[type="search"] {
	padding-left: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23888' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 12px center;
}
/* Own arrow, inset from the border (the browser's sits against it). Stroke colour is set per scheme below. */
.eq-toolbar select {
	min-width: 190px;
	-webkit-appearance: none;
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23999' stroke-width='1.6' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	cursor: pointer;
}
.eq-toolbar select option { color: #111; background: #fff; }
.eq-toolbar :is(input, select):focus-visible,
.eq-browser button:focus-visible,
.eq-browser a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.eq-view {
	display: inline-flex;
	border: 1px solid var(--eq-line);
	border-radius: var(--eq-radius);
	overflow: hidden;
}
.eq-view[hidden] { display: none; }
.eq-view button {
	min-height: 42px;
	padding: 0 14px;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: var(--eq-muted);
}
.eq-view button[aria-pressed="true"] {
	background: var(--wp--preset--color--base, currentColor);
	color: var(--wp--preset--color--surface, #000);
}

/* ---- Layout: categories beside results */
.eq-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--40);
}
@media (min-width: 900px) {
	.eq-layout { grid-template-columns: 250px minmax(0, 1fr); }
	.eq-filters .eq-cats {
		position: sticky;
		top: var(--wp--preset--spacing--40);
		max-height: calc(100vh - 2 * var(--wp--preset--spacing--40));
		overflow: auto;
		scrollbar-width: thin;
		scrollbar-color: var(--eq-line) transparent;
		padding-right: 6px;
	}
}

.eq-filters__toggle {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	text-align: left;
	background: var(--eq-tint);
	border: 1px solid var(--eq-line);
	border-radius: var(--eq-radius);
	cursor: pointer;
}
.eq-filters__toggle::after { content: " ▾"; float: right; }
.eq-filters__toggle[aria-expanded="true"]::after { content: " ▴"; }
.is-ready .eq-filters:not(.is-open) .eq-cats { display: none; }
.eq-filters__toggle:not([hidden]) + .eq-cats { margin-top: var(--wp--preset--spacing--20); }

.eq-cats,
.eq-cats ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.eq-cats ul { padding-left: 14px; border-left: 1px solid var(--eq-line); margin-left: 10px; }
.eq-cat {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 10px;
	border-radius: var(--eq-radius);
	color: var(--eq-muted);
	text-decoration: none;
	line-height: 1.3;
}
.eq-cat:hover { color: inherit; background: var(--eq-tint); }
.eq-cat[aria-current="true"] {
	color: inherit;
	background: var(--eq-tint);
	font-weight: 700;
	box-shadow: inset 2px 0 0 currentColor;
}
.eq-cat--child { font-size: var(--wp--preset--font-size--small); }
.eq-cat__count {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	opacity: .7;
	font-variant-numeric: tabular-nums;
}

/* ---- Results */
.eq-status {
	display: flex;
	align-items: baseline;
	gap: var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--30);
}
.eq-browser .eq-status__count {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	color: var(--eq-muted);
}
.eq-clear {
	background: none;
	border: 0;
	padding: 0;
	text-decoration: underline;
	cursor: pointer;
}
.eq-clear[hidden],
.eq-more[hidden],
.eq-empty[hidden] { display: none; }

.eq-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: var(--wp--preset--spacing--30);
}
.eq-browser .eq-empty {
	padding: var(--wp--preset--spacing--50) 0;
	color: var(--eq-muted);
}
.eq-browser .eq-more-wrap { text-align: center; margin-top: var(--wp--preset--spacing--40); }

/* ---- Card */
.eq-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--eq-tint);
	border: 1px solid var(--eq-line);
	border-radius: var(--eq-radius);
	overflow: hidden;
	transition: border-color .15s ease, transform .15s ease;
}
.eq-card[hidden] { display: none; }
.eq-card:hover,
.eq-card:focus-within { border-color: currentColor; }
@media (prefers-reduced-motion: no-preference) {
	.eq-card:hover { transform: translateY(-2px); }
}
.eq-card__media {
	aspect-ratio: 4 / 3;
	background: color-mix(in srgb, currentColor 10%, transparent);
	display: grid;
	place-items: center;
	overflow: hidden;
}
/* No picture yet: a short band with the manufacturer, so text-only cards stay compact. */
.eq-card__media:has(.eq-card__placeholder) { aspect-ratio: 3 / 1; }
.eq-card__img { width: 100%; height: 100%; object-fit: cover; }
.eq-card__placeholder {
	padding: 1rem;
	text-align: center;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	letter-spacing: .02em;
	opacity: .35;
	text-transform: lowercase;
}
.eq-card__body {
	flex: 1;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.eq-card .eq-card__body > * { margin: 0; }
.eq-card .eq-card__cat {
	font-size: var(--wp--preset--font-size--small);
	color: var(--eq-muted);
}
.eq-card .eq-card__title {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}
.eq-card__title a { color: inherit; text-decoration: none; }
.eq-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.eq-card .eq-card__maker { font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.eq-card .eq-card__desc {
	color: var(--eq-muted);
	font-size: var(--wp--preset--font-size--small);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: pre-line;
}
.eq-card__edit {
	position: absolute;
	z-index: 1;
	top: 8px;
	right: 8px;
	padding: 2px 10px;
	font-size: var(--wp--preset--font-size--small);
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--surface, #000);
	border-radius: 999px;
	text-decoration: none;
	opacity: .85;
}
.eq-card__edit:hover { opacity: 1; }

/* ---- Prices */
.eq-rates {
	display: flex;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	font-variant-numeric: tabular-nums;
}
.eq-rates > div { display: flex; flex-direction: column; }
.eq-rates > div > dt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--eq-muted);
}
.eq-rates dd { margin: 0; font-weight: 700; }
.eq-card__rates {
	padding: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--eq-line);
}
.eq-rates--large {
	padding: var(--wp--preset--spacing--30) 0;
	border-top: 1px solid var(--eq-line);
	border-bottom: 1px solid var(--eq-line);
	gap: var(--wp--preset--spacing--50);
}
.eq-rates--large dd { font-size: var(--wp--preset--font-size--x-large); }
p.eq-note {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

/* ---- List view: one row per item, like a rate card */
@media (min-width: 700px) {
	.eq-browser.is-list .eq-results .eq-grid { grid-template-columns: 1fr; gap: 0; }
	.eq-browser.is-list .eq-results .eq-card {
		flex-direction: row;
		align-items: center;
		border-width: 0 0 1px;
		border-radius: 0;
		background: none;
		padding: 8px 0;
	}
	.eq-browser.is-list .eq-results .eq-card:hover { transform: none; background: var(--eq-tint); }
	.eq-browser.is-list .eq-results .eq-card__media { flex: 0 0 64px; height: 48px; aspect-ratio: auto; border-radius: var(--eq-radius); }
	.eq-browser.is-list .eq-results .eq-card__placeholder { font-size: 10px; padding: 2px; }
	.eq-browser.is-list .eq-results .eq-card__body {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: baseline;
		column-gap: 12px;
		padding: 0 var(--wp--preset--spacing--30);
	}
	.eq-browser.is-list .eq-results .eq-card__title { font-size: var(--wp--preset--font-size--medium); order: 1; }
	.eq-browser.is-list .eq-results .eq-card__maker { order: 2; font-weight: 400; color: var(--eq-muted); }
	.eq-browser.is-list .eq-results .eq-card__cat { order: 3; flex-basis: 100%; }
	.eq-browser.is-list .eq-results .eq-card__desc { display: none; }
	.eq-browser.is-list .eq-results .eq-card__rates {
		flex: 0 0 auto;
		border: 0;
		margin: 0;
		padding: 0 12px 0 0;
	}
	.eq-browser.is-list .eq-results .eq-rates > div { width: 80px; text-align: right; }
	.eq-browser.is-list .eq-results .eq-card__edit { position: relative; top: auto; right: auto; order: 9; margin-right: 8px; }
}

/* ---- Item page */
.eq-breadcrumb ol {
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: var(--wp--preset--font-size--small);
}
.eq-breadcrumb li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.eq-breadcrumb a { color: var(--wp--preset--color--muted); text-decoration: none; }
.eq-breadcrumb a:hover { color: inherit; text-decoration: underline; }

.eq-related { margin-top: var(--wp--preset--spacing--60); }
.eq-related__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--wp--preset--spacing--20);
	margin-bottom: var(--wp--preset--spacing--30);
}
.eq-related__head h2 { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.eq-related__head a { color: inherit; }

/* Every item's picture sits in the same 4:3 white panel, whole (not cropped), whatever its shape.
   Product shots are on white, so they blend into it. */
.eq-item-image img {
	border-radius: 4px;
	object-fit: contain;
	padding: var(--wp--preset--spacing--30);
	box-sizing: border-box;
	background: #fff;
}

/* ---- Item page sections (Overview, Specifications, More images, Downloads), as written by the importer.
   On wide screens they line up with the picture and details above: Overview under the picture, the rest
   under the details. Overview on its own uses the full width. */
.wp-block-post-content.eq-item-content {
	display: grid; /* over the post content block's own display: flow-root */
	gap: var(--wp--preset--spacing--60);
	align-items: start;
}
.eq-item-content > * { margin: 0 !important; min-width: 0; }
@media (min-width: 782px) {
	.eq-item-content:has(> .eq-section--overview) {
		grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
		column-gap: var(--wp--preset--spacing--60);
	}
	.eq-item-content > .eq-section--overview { grid-column: 1; grid-row: 1 / span 3; }
	.eq-item-content > .eq-section:not(.eq-section--overview) { grid-column: 2; }
	.eq-item-content > .eq-section--overview:only-child { grid-column: 1 / -1; max-width: 75ch; }
}
.eq-section > * + * { margin-top: var(--wp--preset--spacing--30); }
.eq-section--overview > p + p { margin-top: 1em; }
.single-equipment .eq-section .eq-section-title {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--20);
	border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
	font-size: var(--wp--preset--font-size--x-large); /* same as "More …" above the related items */
}
.single-equipment .eq-section h3 {
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}
.eq-section--downloads .wp-block-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: var(--wp--preset--spacing--20) 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	font-size: var(--wp--preset--font-size--medium);
}
.eq-section--downloads .wp-block-file__button { font-size: var(--wp--preset--font-size--small); padding: .5em 1.1em; }
.single-equipment main .eq-related { margin-top: var(--wp--preset--spacing--70); }
.wp-block-table.eq-specs { margin: 0; }
.wp-block-table.eq-specs table { width: 100%; border-collapse: collapse; font-size: var(--wp--preset--font-size--medium); }
.wp-block-table.eq-specs :is(th, td) {
	padding: .8em 0;
	border: none;
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
	text-align: left;
	vertical-align: top;
}
.wp-block-table.eq-specs th { width: 35%; padding-right: 1.5em; font-weight: 400; color: var(--wp--preset--color--muted); }
.wp-block-table.eq-specs td { font-weight: 700; }
.wp-block-gallery.eq-gallery { margin: 0; }
.wp-block-gallery.eq-gallery img { border-radius: 4px; background: #fff; }
.eq-extra-image img {
	width: 100%;
	max-height: 420px;
	object-fit: contain;
	border-radius: 4px;
	background: #fff;
}
@media (max-width: 599px) {
	.wp-block-table.eq-specs :is(th, td) { display: block; width: auto; padding: 0; border: none; }
	.wp-block-table.eq-specs th { padding-top: .7em; }
	.wp-block-table.eq-specs td { padding-bottom: .7em; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
}
.eq-item-image--empty {
	aspect-ratio: 4 / 3;
	display: grid;
	place-items: center;
	border-radius: 4px;
	background: color-mix(in srgb, currentColor 10%, transparent);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 700;
	opacity: .5;
	text-transform: lowercase;
}

/* ---- Small screens: search full width, the two dropdowns side by side; list view is desktop only */
@media (max-width: 699px) {
	.eq-toolbar { gap: var(--wp--preset--spacing--20); }
	.eq-toolbar .eq-field:not(.eq-field--search) { flex: 1 1 calc(50% - 10px); min-width: 0; }
	.eq-toolbar select { min-width: 0; }
	.eq-view { display: none !important; }
}

/* ---- Hire list (hire-list.php, hire-list.js) */
.hire-add {
	position: relative;
	z-index: 2; /* above the card's stretched title link */
	display: inline-flex;
	align-items: center;
	gap: .45em;
	padding: .55em .9em;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: inherit;
	background: transparent;
	border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.hire-add[hidden] { display: none; }
.hire-add::before { content: "+"; font-size: 1.15em; line-height: 1; }
.hire-add:hover { border-color: currentColor; }
.hire-add.is-added {
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}
.hire-add.is-added::before { content: "✓"; }
.eq-card__add { align-self: flex-start; margin: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30) var(--wp--preset--spacing--30); }
.eq-item-add { font-size: var(--wp--preset--font-size--medium); }
/* Add to hire list, Enquire and Spec sheet in one row, all the same size. */
.eq-item-actions { align-items: stretch; gap: var(--wp--preset--spacing--20); }
.eq-item-actions :is(.eq-item-add, .wp-block-button__link) {
	padding: .75em 1.2em;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
	white-space: nowrap;
}
/* Two-column item page: the details column is narrow, so smaller buttons let all three fit in one row. */
@media (min-width: 782px) {
	.eq-item-actions :is(.eq-item-add, .wp-block-button__link) { padding: .7em 1em; font-size: var(--wp--preset--font-size--small); }
}

.hire-toggle {
	position: fixed;
	right: 16px;
	bottom: calc(16px + var(--action-bar-height, 0px));
	z-index: 90;
	display: inline-flex;
	align-items: center;
	gap: .6em;
	padding: .75em 1.1em;
	font: inherit;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--primary);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgb(0 0 0 / .35);
	cursor: pointer;
}
.hire-toggle[hidden] { display: none; }
.hire-toggle__count {
	min-width: 1.6em;
	padding: .1em .45em;
	text-align: center;
	color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--contrast);
	border-radius: 999px;
}
@media (prefers-reduced-motion: no-preference) {
	.hire-toggle.is-bumped { animation: hire-bump .45s ease; }
	@keyframes hire-bump { 40% { transform: scale(1.12); } }
}

.hire-panel {
	position: fixed;
	right: 16px;
	bottom: calc(76px + var(--action-bar-height, 0px));
	z-index: 91;
	width: min(400px, calc(100vw - 32px));
	max-height: min(70vh, 560px);
	display: flex;
	flex-direction: column;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--surface);
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 10px;
	box-shadow: 0 18px 50px rgb(0 0 0 / .45);
	font-size: var(--wp--preset--font-size--medium);
}
.hire-panel[hidden] { display: none; }
.hire-panel :where(button) { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.hire-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
}
.hire-panel .hire-panel__title { margin: 0; font-size: var(--wp--preset--font-size--large); }
.hire-panel__close { font-size: 1.8em !important; line-height: 1; padding: 0 .2em !important; }
.hire-panel__items { list-style: none; margin: 0; padding: 0 var(--wp--preset--spacing--30); overflow-y: auto; }
.hire-panel__items li {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px var(--wp--preset--spacing--20);
	align-items: center;
	padding: .7em 0;
	border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.hire-panel__name { color: inherit; font-weight: 700; text-decoration: none; line-height: 1.3; }
.hire-panel__name:hover { text-decoration: underline; }
.hire-qty { display: inline-flex; align-items: center; gap: .2em; grid-row: span 2; }
.hire-qty button {
	width: 32px;
	height: 32px;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent) !important;
	border-radius: 50%;
	line-height: 1;
}
.hire-qty span { min-width: 1.6em; text-align: center; font-weight: 700; }
.hire-panel__remove { justify-self: start; padding: 0 !important; font-size: var(--wp--preset--font-size--small) !important; opacity: .7; text-decoration: underline; }
.hire-panel .hire-panel__empty { font-size: var(--wp--preset--font-size--medium) !important; margin: 0; padding: 0 var(--wp--preset--spacing--30) var(--wp--preset--spacing--30); opacity: .8; }
.hire-panel:not(.is-empty) .hire-panel__empty,
.hire-panel.is-empty .hire-panel__foot { display: none; }
.hire-panel__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--30);
	border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.hire-panel .hire-panel__note { flex-basis: 100%; margin: 0; font-size: var(--wp--preset--font-size--small) !important; line-height: 1.5; opacity: .8; }
.hire-panel__send.wp-element-button {
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--primary);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--medium);
	padding: .7em 1.4em;
}
.hire-panel__clear { font-size: var(--wp--preset--font-size--small) !important; text-decoration: underline; opacity: .75; }
