/**
 * Tradebase components.
 *
 * All colours, fonts, sizes and spacing come from theme.json presets, so
 * rebranding (Site Editor → Styles) never requires editing this file.
 */

/* --------------------------------------------------------------------------
 * Base
 * ----------------------------------------------------------------------- */

:root {
	--tb-radius-s: var(--wp--custom--radius--small, 6px);
	--tb-radius-m: var(--wp--custom--radius--medium, 12px);
	--tb-radius-l: var(--wp--custom--radius--large, 20px);
	--tb-field-border: var(--wp--custom--color--field-border, #6b7280);
	--tb-error: var(--wp--custom--color--error, #b42318);
	--tb-success: var(--wp--custom--color--success, #17663a);
	--tb-mobile-bar-height: 4.25rem;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

:where(img) {
	height: auto;
	max-width: 100%;
}

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

/* Focus: a two-tone ring that is visible on light and dark backgrounds. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.wp-element-button:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px var(--wp--preset--color--white), 0 0 0 6px var(--wp--preset--color--contrast);
	border-radius: 2px;
}

.has-contrast-background-color :where(a, button, summary, input, select, textarea):focus-visible,
.has-contrast-2-background-color :where(a, button, summary):focus-visible,
.has-contrast-background-color .wp-element-button:focus-visible {
	box-shadow: 0 0 0 3px var(--wp--preset--color--contrast), 0 0 0 6px var(--wp--preset--color--accent);
}

@media (forced-colors: active) {
	:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
		outline: 3px solid CanvasText;
	}
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	font-weight: 700;
	z-index: 100000;
}

/* Buttons: consistent minimum touch target. */
.wp-element-button,
.wp-block-button__link {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	text-align: center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: currentColor;
	background: transparent;
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-on-dark > .wp-block-button__link {
	background: transparent;
	border-color: rgb(255 255 255 / 55%);
	color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-on-dark > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

/* On dark sections, the default (accent) button keeps contrast text on hover. */
.has-contrast-background-color .wp-block-button:not(.is-style-outline):not(.is-style-on-dark) > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

/* --------------------------------------------------------------------------
 * Block style variations
 * ----------------------------------------------------------------------- */

.is-style-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.65em;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.is-style-eyebrow::before {
	content: "";
	flex: 0 0 auto;
	width: 1.75rem;
	height: 3px;
	border-radius: 2px;
	background: var(--wp--preset--color--accent);
}

.has-text-align-center.is-style-eyebrow {
	justify-content: center;
}

.is-style-lead {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.is-style-step {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1;
}

.is-style-step::before {
	content: "";
	display: block;
	width: 2.25rem;
	height: 4px;
	margin-bottom: 0.9rem;
	border-radius: 2px;
	background: var(--wp--preset--color--accent);
}

ul.is-style-checklist,
ul.is-style-plain {
	list-style: none;
	padding-left: 0;
}

ul.is-style-checklist > li {
	position: relative;
	padding-left: 2rem;
}

ul.is-style-checklist > li + li {
	margin-top: 0.6em;
}

ul.is-style-checklist > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

ul.is-style-checklist > li::after {
	content: "";
	position: absolute;
	left: 0.45rem;
	top: 0.38em;
	width: 0.32rem;
	height: 0.62rem;
	border: solid var(--wp--preset--color--contrast);
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
}

.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--tb-radius-m);
	padding: var(--wp--preset--spacing--50);
}

.wp-block-group.is-style-card-dark {
	background: var(--wp--preset--color--contrast-2);
	color: var(--wp--preset--color--white);
	border-radius: var(--tb-radius-m);
	padding: var(--wp--preset--spacing--50);
}

.wp-block-image.is-style-photo img {
	border-radius: var(--tb-radius-l);
	box-shadow: var(--wp--preset--shadow--raised);
}

/* Highlighted placeholder text that must be replaced before launch. */
mark.tb-placeholder {
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--contrast);
	outline: 1px dashed var(--wp--preset--color--muted);
	outline-offset: 1px;
	padding: 0 0.15em;
	border-radius: 2px;
}

.tb-editor-notice,
.tb-placeholder-label {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 0.75rem 1rem;
	border: 1px dashed var(--wp--preset--color--muted);
	border-radius: var(--tb-radius-s);
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
}

/* --------------------------------------------------------------------------
 * Header
 * ----------------------------------------------------------------------- */

.tb-topbar {
	font-size: var(--wp--preset--font-size--small);
}

.tb-topbar p {
	margin: 0;
}

.tb-topbar a {
	color: inherit;
	text-decoration: none;
	font-weight: 600;
}

.tb-topbar a:hover {
	text-decoration: underline;
}

.tb-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Logos come in every shape. Size by height so wide wordmarks stay legible and
   square marks don't tower; cap the width so a very wide logo can't push the menu. */
.tb-header__brand .wp-block-site-logo {
	flex-shrink: 0;
	line-height: 0;
}

.tb-header__brand .wp-block-site-logo img {
	display: block;
	width: auto;
	height: auto;
	max-height: 2.75rem;
	max-width: min(11rem, 40vw);
	object-fit: contain;
}

.tb-header .wp-block-site-title {
	font-size: var(--wp--preset--font-size--medium);
}

.tb-header .wp-block-navigation-item__content,
.tb-header .wp-block-button__link {
	white-space: nowrap;
}

@media (min-width: 600px) {
	.tb-header .wp-block-site-title {
		white-space: nowrap;
	}
}

@media (max-width: 600px) {
	.tb-header__brand .wp-block-site-logo img {
		max-height: 2.5rem;
		max-width: 36vw;
	}
}

/* The full menu, phone and quote buttons need about 1200px. Below that, use the
   menu button (core only switches at 600px), so nothing wraps onto a second row. */
@media (min-width: 600px) and (max-width: 1279px) {
	.tb-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.tb-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.tb-header__phone .wp-block-button__link {
	white-space: nowrap;
}

.tb-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40);
}

.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	font-size: var(--wp--preset--font-size--x-large);
	font-family: var(--wp--preset--font-family--heading);
	gap: 1rem;
}

.tb-header .wp-block-navigation__responsive-container-open,
.tb-header .wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
	align-items: center;
}

.tb-header .wp-block-navigation-item.current-menu-item > a,
.tb-header .wp-block-navigation-item a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.45em;
}

@media (max-width: 781px) {
	.tb-hide-mobile {
		display: none !important;
	}
}

@media (min-width: 782px) {
	.tb-show-mobile {
		display: none !important;
	}
}

/* Mobile call bar: a calm, persistent way to call or ask for a quote. */
.tb-mobile-bar {
	position: fixed;
	z-index: 50;
	left: 0;
	right: 0;
	bottom: 0;
	gap: 0.5rem;
	padding: 0.5rem max(0.75rem, env(safe-area-inset-right)) calc(0.5rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
	box-shadow: 0 -6px 20px rgb(0 0 0 / 15%);
}

.tb-mobile-bar .wp-block-button {
	flex: 1 1 0;
}

.tb-mobile-bar .wp-block-button__link {
	width: 100%;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	font-size: var(--wp--preset--font-size--medium);
}

@media (max-width: 781px) {
	.wp-site-blocks {
		padding-bottom: var(--tb-mobile-bar-height);
	}
}

@media (min-width: 782px) {
	.tb-mobile-bar {
		display: none !important;
	}
}

.editor-styles-wrapper .tb-mobile-bar {
	position: static;
}

/* --------------------------------------------------------------------------
 * Sections
 * ----------------------------------------------------------------------- */

/* Header, main and footer, and full-width page sections, sit flush: sections set their own padding. */
.wp-site-blocks > * + *,
.tb-landing > * + * {
	margin-block-start: 0;
}

@media (max-width: 781px) {
	.tb-hero__image img {
		aspect-ratio: 4 / 3 !important;
	}
}

.tb-hero__image img,
.tb-media img {
	width: 100%;
}

.tb-trust-strip p {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

.tb-trust-strip .wp-block-column,
.tb-trust-strip .wp-block-group > p {
	position: relative;
}

.tb-trust-strip strong {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tb-section-head {
	max-width: 46rem;
}

.tb-areas-panel .tb-areas {
	margin-top: var(--wp--preset--spacing--30);
}

/* CTA panel: a contained card so it never merges with the dark footer. */
.tb-cta-panel {
	border-radius: var(--tb-radius-l);
}

@media (max-width: 781px) {
	.tb-cta-panel .wp-block-buttons {
		justify-content: flex-start;
	}
}

.tb-footer h2 + * {
	margin-top: 0.75rem;
}

/* Breadcrumbs */
.wp-block-breadcrumbs a {
	color: inherit;
}

/* FAQs (core/details): large tap target and a clear +/− marker. */
.wp-block-details summary {
	position: relative;
	list-style: none;
	padding-right: 2.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-soft);
	font-size: 1.25rem;
	line-height: 1.75rem;
	text-align: center;
}

.wp-block-details[open] summary::after {
	content: "−";
}

.wp-block-details > :not(summary) {
	margin-top: 0.75rem;
	max-width: 46rem;
}

/* --------------------------------------------------------------------------
 * Business blocks (markup from the Tradebase Business Details plugin)
 * ----------------------------------------------------------------------- */

/* Service cards */
.tb-services--cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: var(--wp--preset--spacing--40);
	margin-inline: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1000px) {
	.tb-services--cards.tb-cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}

	.tb-services--cards.tb-cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.tb-services--cards.tb-cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

.tb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--tb-radius-m);
	color: var(--wp--preset--color--contrast);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-card--linked:hover,
.tb-card--linked:focus-within {
	border-color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--card);
}

.tb-card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--wp--preset--color--base-2);
}

.tb-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tb-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--wp--preset--spacing--40);
}

.tb-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
}

.tb-card__title a {
	color: inherit;
	text-decoration: none;
}

/* The whole card is clickable via the title link, which stays the only focus stop. */
.tb-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tb-card__title a:focus-visible {
	box-shadow: none;
}

.tb-card:focus-within {
	box-shadow: 0 0 0 3px var(--wp--preset--color--white), 0 0 0 6px var(--wp--preset--color--contrast);
}

.tb-card__text {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

.tb-card__more,
.tb-arrow-link {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
}

.tb-card__more {
	margin: auto 0 0;
	padding-top: 0.5rem;
}

.tb-card__more::after,
.tb-arrow-link::after {
	content: " →";
}

/* Detailed services (Services page) */
.tb-services--detailed {
	display: grid;
	gap: var(--wp--preset--spacing--60);
}

.tb-service {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	align-items: center;
	scroll-margin-top: 2rem;
}

@media (min-width: 782px) {
	.tb-service {
		grid-template-columns: 1fr 1fr;
	}

	.tb-service:nth-child(even) .tb-service__media {
		order: 2;
	}

	.tb-service:not(:has(.tb-service__media)) {
		grid-template-columns: 1fr;
	}
}

.tb-service__media img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: var(--tb-radius-m);
	display: block;
}

.tb-service__title {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--x-large);
}

.tb-service__body p {
	margin: 0 0 1em;
}

/* Service links (footer, related services) */
.tb-services--links {
	margin-inline: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.tb-services--links li + li {
	margin-top: 0.5rem;
}

/* Areas */
.tb-areas__list {
	margin-inline: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.tb-areas--columns .tb-areas__list {
	columns: 2 10rem;
	column-gap: var(--wp--preset--spacing--40);
}

.tb-areas--columns li {
	break-inside: avoid;
	padding: 0.35rem 0 0.35rem 1.1rem;
	position: relative;
}

.tb-areas--columns li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.95em;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
}

.tb-areas--inline .tb-areas__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tb-areas--inline li {
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.tb-areas--list li + li {
	margin-top: 0.35rem;
}

.tb-areas__note {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-size: var(--wp--preset--font-size--small);
}

/* Contact details */
.tb-contact {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	margin-inline: 0;
	margin-bottom: 0;
}

.tb-contact dt {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.8;
}

.tb-contact dd {
	margin: 0.1rem 0 0;
	font-weight: 600;
}

.tb-contact__item--phone dd {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
}

.tb-contact__item--phone a,
.tb-contact__item--email a,
.tb-contact__item--whatsapp a {
	color: inherit;
}

/* Hours */
.tb-hours__table {
	width: 100%;
	border-collapse: collapse;
}

.tb-hours__table th,
.tb-hours__table td {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: left;
}

.tb-hours__table td {
	text-align: right;
}

.tb-hours__table .is-closed td {
	color: var(--wp--preset--color--muted);
}

.has-contrast-background-color .tb-hours__table th,
.has-contrast-background-color .tb-hours__table td {
	border-color: rgb(255 255 255 / 18%);
	color: inherit;
}

.tb-hours__note {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

/* Profiles */
.tb-profiles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-inline: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

/* Reviews */
.tb-reviews__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	gap: var(--wp--preset--spacing--40);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tb-review figure {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--tb-radius-m);
	color: var(--wp--preset--color--contrast);
}

.tb-review__quote {
	flex: 1;
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	font-size: var(--wp--preset--font-size--medium);
}

.tb-review__quote::before {
	content: "“";
	display: block;
	height: 2.25rem;
	color: var(--wp--preset--color--accent);
	font-family: Georgia, serif;
	font-size: 4rem;
	line-height: 1;
}

.tb-review__quote p {
	margin: 0;
}

.tb-review figcaption {
	font-size: var(--wp--preset--font-size--small);
}

.tb-review__name {
	display: block;
	font-weight: 700;
}

.tb-review__meta {
	color: var(--wp--preset--color--muted);
}

.tb-reviews.is-placeholder .tb-review figure {
	border-style: dashed;
	background: transparent;
}

/* Accreditations */
.tb-accreditations {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
	margin-inline: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.tb-accreditation,
.tb-accreditation a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.tb-accreditation__logo {
	max-height: 4rem;
	width: auto;
	border-radius: 0;
}

.tb-accreditation__name {
	font-weight: 700;
}

.tb-accreditation__number {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* --------------------------------------------------------------------------
 * Enquiry form
 * ----------------------------------------------------------------------- */

.tb-form__form {
	display: grid;
	gap: var(--wp--preset--spacing--30);
}

@media (min-width: 640px) {
	.tb-form__form {
		grid-template-columns: 1fr 1fr;
		column-gap: var(--wp--preset--spacing--40);
	}

	.tb-form__form > :not(.tb-field--name, .tb-field--phone, .tb-field--email, .tb-field--postcode) {
		grid-column: 1 / -1;
	}
}

.tb-form__required-note {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.tb-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.tb-field label {
	font-weight: 700;
}

.tb-required {
	color: var(--tb-error);
}

.tb-optional {
	font-weight: 400;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.tb-field__help {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.tb-field input:not([type="checkbox"]),
.tb-field select,
.tb-field textarea {
	width: 100%;
	min-height: 48px;
	padding: 0.65rem 0.85rem;
	border: 1.5px solid var(--tb-field-border);
	border-radius: var(--tb-radius-s);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: max(16px, 1rem);
}

.tb-field textarea {
	min-height: 8rem;
	resize: vertical;
}

.tb-field input[type="file"] {
	padding: 0.5rem;
}

.tb-field input:focus-visible,
.tb-field select:focus-visible,
.tb-field textarea:focus-visible {
	border-color: var(--wp--preset--color--contrast);
}

.tb-field.has-error input,
.tb-field.has-error select,
.tb-field.has-error textarea {
	border-color: var(--tb-error);
	border-width: 2px;
}

.tb-field__error {
	margin: 0;
	color: var(--tb-error);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.tb-field--check {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.6rem;
}

.tb-field--check input {
	width: 1.35rem;
	height: 1.35rem;
	margin-top: 0.15rem;
	accent-color: var(--wp--preset--color--contrast);
}

.tb-field--check label {
	flex: 1;
	font-weight: 400;
}

.tb-form__actions .wp-block-button__link {
	width: 100%;
	cursor: pointer;
}

@media (min-width: 640px) {
	.tb-form__actions .wp-block-button__link {
		width: auto;
		min-width: 14rem;
	}
}

.tb-form__actions [aria-disabled="true"] {
	opacity: 0.7;
	cursor: progress;
}

.tb-form__privacy {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.tb-form__errors,
.tb-form__success {
	grid-column: 1 / -1;
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--tb-radius-s);
	border-left: 5px solid;
	background: var(--wp--preset--color--white);
}

.tb-form__errors {
	border-color: var(--tb-error);
}

.tb-form__errors p,
.tb-form__success p {
	margin: 0;
}

.tb-form__errors ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.tb-form__errors a {
	color: var(--tb-error);
	font-weight: 600;
}

.tb-form__success {
	border-color: var(--tb-success);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--large);
}

.tb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
 * Footer
 * ----------------------------------------------------------------------- */

.tb-footer a:not(.wp-element-button) {
	color: inherit;
}

.tb-footer h2 {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.tb-footer .tb-services--links a,
.tb-footer .tb-profiles a {
	text-decoration: none;
}

.tb-footer .tb-services--links a:hover,
.tb-footer .tb-profiles a:hover {
	text-decoration: underline;
}

.tb-footer .tb-areas--columns li::before {
	background: var(--wp--preset--color--accent);
}

.tb-footer .tb-contact__item--phone dd {
	font-size: var(--wp--preset--font-size--large);
}

.tb-footer-bottom {
	border-top: 1px solid rgb(255 255 255 / 15%);
}

.tb-footer-bottom p {
	margin: 0;
}

/* --------------------------------------------------------------------------
 * Print
 * ----------------------------------------------------------------------- */

@media print {
	.tb-mobile-bar,
	.tb-topbar,
	.wp-block-navigation,
	.tb-form {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
 * 1.3: header sub-menus
 * ----------------------------------------------------------------------- */

.tb-header .wp-block-navigation .wp-block-navigation__submenu-container {
	min-width: 15rem;
	padding: 0.5rem 0;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--tb-radius-m);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--raised);
}

.tb-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.6rem 1.1rem;
	color: var(--wp--preset--color--contrast);
}

.tb-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--base-2);
	text-decoration: none;
}

/* Full-screen phone menu: left-aligned, with sub-menu items listed under their parent. */
.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
}

.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--x-large);
}

.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	min-width: 0;
	margin-top: 0.5rem;
	padding: 0 0 0 1rem !important;
	border: 0;
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	gap: 0.6rem !important;
}

.tb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0;
	font-size: var(--wp--preset--font-size--large);
}

/* --------------------------------------------------------------------------
 * 1.3: primary call to action = call
 * (Business Details → Contact → "Main call to action". The phone button becomes the
 * filled button and comes first; the quote button becomes the outline one.)
 * ----------------------------------------------------------------------- */

.tb-cta-call .wp-block-buttons:has(a[href^="tel:"]) > .wp-block-button:has(> a[href^="tel:"]) {
	order: -1;
}

.tb-cta-call .wp-block-button.is-style-outline > a.wp-block-button__link[href^="tel:"] {
	border-color: var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.tb-cta-call .wp-block-button.is-style-on-dark > a.wp-block-button__link[href^="tel:"] {
	border-color: var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.tb-cta-call .wp-block-buttons:has(a[href^="tel:"]) > .wp-block-button:not(.is-style-outline):not(.is-style-on-dark) > a.wp-block-button__link:not([href^="tel:"]) {
	border-color: currentColor;
	background-color: transparent;
	color: inherit;
}

.tb-cta-call .wp-block-button > a.wp-block-button__link[href^="tel:"]:hover {
	border-color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}

.tb-cta-call .has-contrast-background-color .wp-block-button > a.wp-block-button__link[href^="tel:"]:hover,
.tb-scheme-dark.tb-cta-call .tb-header .wp-block-button > a.wp-block-button__link[href^="tel:"]:hover,
.tb-scheme-dark.tb-cta-call .tb-hero .wp-block-button > a.wp-block-button__link[href^="tel:"]:hover,
.tb-scheme-dark.tb-cta-call .tb-page-header .wp-block-button > a.wp-block-button__link[href^="tel:"]:hover {
	border-color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

/* --------------------------------------------------------------------------
 * 1.3: feature band
 * ----------------------------------------------------------------------- */

.tb-feature-band .wp-block-image.is-style-photo img {
	box-shadow: none;
}

@media (min-width: 782px) {
	.tb-feature-band .wp-block-columns:not(:has(.wp-block-image)) > .wp-block-column {
		max-width: 48rem;
	}
}

/* --------------------------------------------------------------------------
 * 1.3: portfolio (Our work)
 * ----------------------------------------------------------------------- */

.tb-project + .tb-project {
	padding-top: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--wp--preset--color--line);
}

.tb-project__location {
	color: var(--wp--preset--color--muted);
	font-weight: 600;
}

.tb-project__photos,
.tb-portfolio-grid {
	align-items: start;
}

.tb-project__photos .wp-block-image,
.tb-portfolio-grid .wp-block-image {
	margin: 0;
}

.tb-project__photos img,
.tb-portfolio-grid img {
	width: 100%;
	border-radius: var(--tb-radius-m);
}

.tb-project__photos figcaption,
.tb-portfolio-grid figcaption {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Project photo layouts by count, so a project never leaves a ragged gap:
   1 = wide, 2 = halves, 3 = one large beside two stacked, 5+ = one large (2×2) leading
   a four-column grid. Four or more than five fill the plain grid. */
@media (min-width: 782px) {
	.tb-project__photos.is-layout-grid:has(> :only-child),
	.tb-project__photos.is-layout-grid:has(> :nth-child(2)):not(:has(> :nth-child(3))) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tb-project__photos > :only-child {
		grid-column: 1 / -1;
		max-width: 56rem;
	}

	.tb-project__photos.is-layout-grid:has(> :nth-child(3)):not(:has(> :nth-child(4))) {
		grid-template-columns: 2fr 1fr;
	}

	.tb-project__photos.is-layout-grid:has(> :nth-child(5)) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.tb-project__photos:has(> :nth-child(3)):not(:has(> :nth-child(4))) > :first-child {
		grid-row: span 2;
	}

	.tb-project__photos:has(> :nth-child(5)) > :first-child {
		grid-column: span 2;
		grid-row: span 2;
	}

	.tb-project__photos:has(> :nth-child(3)):not(:has(> :nth-child(4))) > :first-child,
	.tb-project__photos:has(> :nth-child(5)) > :first-child {
		align-self: stretch;
	}

	.tb-project__photos:has(> :nth-child(3)):not(:has(> :nth-child(4))) > :first-child img,
	.tb-project__photos:has(> :nth-child(5)) > :first-child img {
		height: 100%;
		aspect-ratio: auto !important;
		object-fit: cover;
	}
}

/* Two photos across on phones keeps a long portfolio scannable. */
@media (max-width: 599px) {
	.tb-portfolio-grid.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* --------------------------------------------------------------------------
 * 1.3: dark scheme (style variations with settings.custom.tradebase.scheme "dark",
 * e.g. Charcoal & Oak). Header, homepage hero, service heroes and page headers go
 * dark; content sections stay light for readability.
 * ----------------------------------------------------------------------- */

.tb-scheme-dark .tb-topbar.has-contrast-background-color {
	background-color: #11151a !important;
}

.tb-scheme-dark .tb-header.has-base-background-color,
.tb-scheme-dark .tb-hero.has-base-background-color,
.tb-scheme-dark .tb-hero.has-base-2-background-color,
.tb-scheme-dark .tb-page-header.has-base-2-background-color {
	background-color: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--white);
}

.tb-scheme-dark .tb-header {
	border-bottom-color: rgb(255 255 255 / 10%);
}

.tb-scheme-dark .tb-hero,
.tb-scheme-dark .tb-page-header {
	border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.tb-scheme-dark .tb-header a:where(:not(.wp-element-button)),
.tb-scheme-dark .tb-header .wp-block-navigation__responsive-container-open,
.tb-scheme-dark .tb-hero .wp-block-breadcrumbs a,
.tb-scheme-dark .tb-page-header .wp-block-breadcrumbs a {
	color: var(--wp--preset--color--white);
}

.tb-scheme-dark .tb-header .wp-block-navigation__responsive-container.is-menu-open a {
	color: var(--wp--preset--color--contrast);
}

.tb-scheme-dark .tb-hero .wp-block-breadcrumbs,
.tb-scheme-dark .tb-page-header .wp-block-breadcrumbs {
	color: rgb(255 255 255 / 75%);
}

.tb-scheme-dark .tb-header .wp-block-button.is-style-outline > .wp-block-button__link,
.tb-scheme-dark .tb-hero .wp-block-button.is-style-outline > .wp-block-button__link,
.tb-scheme-dark .tb-page-header .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: rgb(255 255 255 / 55%);
	color: var(--wp--preset--color--white);
}

.tb-scheme-dark .tb-header .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.tb-scheme-dark .tb-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.tb-scheme-dark .tb-page-header .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.tb-scheme-dark .tb-hero .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.tb-scheme-dark .tb-page-header .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.tb-scheme-dark .tb-header .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

.tb-scheme-dark.tb-cta-call .tb-header .wp-block-buttons:has(a[href^="tel:"]) > .wp-block-button:not(.is-style-outline) > a.wp-block-button__link:not([href^="tel:"]),
.tb-scheme-dark.tb-cta-call .tb-hero .wp-block-buttons:has(a[href^="tel:"]) > .wp-block-button:not(.is-style-outline) > a.wp-block-button__link:not([href^="tel:"]),
.tb-scheme-dark.tb-cta-call .tb-page-header .wp-block-buttons:has(a[href^="tel:"]) > .wp-block-button:not(.is-style-outline) > a.wp-block-button__link:not([href^="tel:"]) {
	border-color: rgb(255 255 255 / 55%);
	color: var(--wp--preset--color--white);
}

/* Directly under a dark hero, the trust strip steps down a shade so the two read apart. */
.tb-scheme-dark .tb-hero + .tb-trust-strip.has-contrast-background-color {
	background-color: var(--wp--preset--color--contrast-2) !important;
}

.tb-scheme-dark .tb-hero .wp-block-image.is-style-photo img {
	box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 35%);
}

/* No logo: the business name is the wordmark. */
.tb-scheme-dark .tb-header__brand:not(:has(.wp-block-site-logo img)) .wp-block-site-title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.tb-scheme-dark .tb-header__brand:not(:has(.wp-block-site-logo img)) .wp-block-site-title a {
	text-decoration: none;
	padding-left: 0.75rem;
	border-left: 4px solid var(--wp--preset--color--accent);
}

/* --------------------------------------------------------------------------
 * 1.3.1: text-only service cards (a service with no suitable photo). A deliberate
 * dark panel with an accent rule, the same height as its photo neighbours.
 * ----------------------------------------------------------------------- */

.tb-card.tb-card--text {
	min-height: 15rem;
	border-color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}

.tb-card--text .tb-card__body {
	padding-top: var(--wp--preset--spacing--50);
}

.tb-card--text .tb-card__body::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 3px;
	margin-bottom: 0.5rem;
	border-radius: 2px;
	background: var(--wp--preset--color--accent);
}

.tb-card--text .tb-card__title {
	font-size: var(--wp--preset--font-size--x-large);
}

.tb-card--text .tb-card__text {
	color: rgb(255 255 255 / 82%);
}

.tb-card--text.tb-card--linked:hover,
.tb-card--text.tb-card--linked:focus-within {
	border-color: var(--wp--preset--color--accent);
}

/* Photo cards keep one crop, so a row of cards lines up whatever the photos' shapes. */
.tb-card__media {
	flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
 * 1.3.1: portfolio captions (category label + optional caption)
 * ----------------------------------------------------------------------- */

.tb-portfolio-grid figcaption strong,
.tb-project__photos figcaption strong {
	display: block;
	margin-bottom: 0.1rem;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.75rem;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.tb-portfolio-grid figcaption,
.tb-project__photos figcaption {
	text-align: left;
	line-height: 1.4;
}

/* --------------------------------------------------------------------------
 * 1.3.1: footer and contact details wrap cleanly on small screens
 * ----------------------------------------------------------------------- */

.tb-footer a,
.tb-contact dd,
.tb-contact a {
	overflow-wrap: anywhere;
}

.tb-footer .tb-services__all a {
	font-weight: 700;
}

.tb-footer .tb-services__all a::after {
	content: " →";
}

/* Footer areas in two columns on phones, so the list doesn't run on. */
@media (max-width: 781px) {
	.tb-footer .tb-areas__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 1rem;
	}
}

/* ==========================================================================
 * 1.4: Work Collections
 * ======================================================================= */

.tb-collections .screen-reader-text,
.tb-collection .screen-reader-text,
.tb-lightbox .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Our Work: collection cards ---------------------------------------- */

.tb-collections {
	padding: var(--wp--preset--spacing--60) var(--wp--style--root--padding-right, 1.25rem) var(--wp--preset--spacing--60) var(--wp--style--root--padding-left, 1.25rem);
}

.tb-collections__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: var(--wp--preset--spacing--40);
	max-width: var(--wp--style--global--wide-size, 76rem);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.tb-collection-card {
	margin: 0;
}

.tb-collection-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--tb-radius-m);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-collection-card__link:hover,
.tb-collection-card__link:focus-visible {
	border-color: var(--wp--preset--color--contrast);
	box-shadow: var(--wp--preset--shadow--card);
	text-decoration: none;
}

.tb-collection-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--wp--preset--color--base-2);
}

.tb-collection-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.tb-collection-card__link:hover .tb-collection-card__img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
	.tb-collection-card__img,
	.tb-collection-card__link:hover .tb-collection-card__img {
		transition: none;
		transform: none;
	}
}

.tb-collection-card__body {
	display: flex;
	flex: 1;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

.tb-collection-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}

.tb-collection-card__meta {
	flex: none;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

.tb-collection-card__meta::after {
	content: " →";
	color: var(--wp--preset--color--contrast);
}

/* --- Collection page ------------------------------------------------------ */

.tb-collection-back {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.tb-collection-back a {
	color: inherit;
	text-decoration: none;
}

.tb-collection-back a:hover {
	text-decoration: underline;
}

.tb-collection-back--foot {
	max-width: var(--wp--style--global--wide-size, 76rem);
	margin-top: var(--wp--preset--spacing--50) !important;
	margin-right: auto !important;
	margin-left: auto !important;
}

.tb-scheme-dark .tb-collection-page .tb-page-header .tb-collection-back a {
	color: var(--wp--preset--color--white);
}

.tb-collection__count {
	margin: 0 0 var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.tb-collection__heading {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--x-large);
}

.tb-collection__pairs + .tb-collection__gallery {
	margin-top: var(--wp--preset--spacing--60);
}

/* Gallery grid: two across on phones, up to four on wide screens. */
.tb-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--20);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 600px) {
	.tb-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--30);
	}
}

@media (min-width: 1100px) {
	.tb-gallery {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.tb-gallery__item,
.tb-gallery__figure {
	margin: 0;
}

.tb-gallery__link {
	display: block;
	overflow: hidden;
	border-radius: var(--tb-radius-m);
	background: var(--wp--preset--color--base-2);
	cursor: zoom-in;
}

.tb-gallery__link img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.tb-gallery__link:hover img {
	transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
	.tb-gallery__link img,
	.tb-gallery__link:hover img {
		transition: none;
		transform: none;
	}
}

.tb-gallery__caption {
	margin-top: 0.4rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}

/* --- Lightbox --------------------------------------------------------------- */

html.tb-lightbox-open {
	overflow: hidden;
}

.tb-lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(10 12 15 / 96%);
	color: #fff;
	overscroll-behavior: contain;
}

.tb-lightbox::backdrop {
	background: rgb(10 12 15 / 96%);
}

.tb-lightbox[open] {
	display: grid;
	grid-template-rows: 1fr auto;
}

.tb-lightbox__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 3.5rem 4rem 0;
}

.tb-lightbox__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	border-radius: 2px;
}

.tb-lightbox__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1.5rem;
	padding: 0.9rem 1.25rem 1.1rem;
	font-size: var(--wp--preset--font-size--small);
}

.tb-lightbox__bar p {
	margin: 0;
}

.tb-lightbox__count {
	color: rgb(255 255 255 / 75%);
	white-space: nowrap;
}

.tb-lightbox__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 30%);
	border-radius: 50%;
	background: rgb(0 0 0 / 45%);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.tb-lightbox__btn:hover {
	border-color: #fff;
	background: rgb(0 0 0 / 75%);
}

.tb-lightbox__btn:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	box-shadow: none;
}

.tb-lightbox__close {
	top: 0.75rem;
	right: 0.75rem;
}

.tb-lightbox__prev,
.tb-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.tb-lightbox__prev {
	left: 0.75rem;
}

.tb-lightbox__next {
	right: 0.75rem;
}

@media (max-width: 599px) {
	.tb-lightbox__stage {
		padding: 3.75rem 0.5rem 0;
	}

	.tb-lightbox__prev,
	.tb-lightbox__next {
		top: auto;
		bottom: 0.5rem;
		transform: none;
	}

	.tb-lightbox__bar {
		padding-bottom: 4.25rem;
		justify-content: center;
		text-align: center;
	}
}

/* --- Before and after ------------------------------------------------------- */

.tb-ba {
	margin: 0 0 var(--wp--preset--spacing--50);
}

/* Without JavaScript: the two photos side by side, each labelled. */
.tb-ba__frame {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wp--preset--spacing--20);
}

.tb-ba__pane {
	position: relative;
	overflow: hidden;
	border-radius: var(--tb-radius-m);
	aspect-ratio: var(--tb-ba-ratio, 4 / 3);
}

.tb-ba__pane--before {
	order: -1;
}

.tb-ba__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tb-ba__label {
	position: absolute;
	top: 0.75rem;
	padding: 0.25rem 0.6rem;
	border-radius: var(--tb-radius-s, 3px);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.tb-ba__label--before {
	left: 0.75rem;
}

.tb-ba__label--after {
	right: 0.75rem;
}

.tb-ba__caption {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.tb-ba__key {
	display: none;
}

.tb-ba__hint {
	display: none;
}

/* With JavaScript: one frame, the before photo revealed from the left by the slider. */
.tb-ba.is-interactive .tb-ba__frame {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--tb-radius-m);
	aspect-ratio: var(--tb-ba-ratio, 4 / 3);
	max-height: 80vh;
	margin-inline: auto;
	touch-action: pan-y;
}

.tb-ba.is-interactive .tb-ba__pane {
	position: absolute;
	inset: 0;
	border-radius: 0;
	aspect-ratio: auto;
}

.tb-ba.is-interactive .tb-ba__pane--before {
	clip-path: inset(0 calc(100% - var(--tb-ba-pos, 50%)) 0 0);
}

.tb-ba__handle {
	display: none;
}

.tb-ba.is-interactive .tb-ba__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--tb-ba-pos, 50%);
	display: block;
	width: 3px;
	margin-left: -1.5px;
	background: var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px rgb(0 0 0 / 25%);
	pointer-events: none;
}

.tb-ba.is-interactive .tb-ba__handle::after {
	content: "‹ ›";
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
	color: var(--wp--preset--color--contrast);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	transform: translate(-50%, -50%);
}

/* The range input covers the photo: drag anywhere, or focus it and use the arrow keys. */
.tb-ba__range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
}

.tb-ba__range:focus-visible + .tb-ba__handle,
.tb-ba.is-interactive .tb-ba__frame:has(.tb-ba__range:focus-visible) {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

.tb-ba.is-interactive .tb-ba__hint {
	display: inline;
}

/* Social icons inherit the site's colours; empty profiles never render. */
.tb-profiles { display:flex; flex-wrap:wrap; align-items:center; gap:0.5rem; }
.tb-profiles .wp-social-link { margin:0; padding:0; color:inherit; background:transparent; border-radius:0; }
.tb-profiles .wp-social-link a { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:0; color:inherit; border-radius:6px; }
.tb-profiles .wp-social-link svg { display:block; width:24px; height:24px; fill:currentColor; }
.tb-profiles a:hover { opacity:0.8; }
.tb-profiles a:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.tb-profiles .wp-social-link .wp-block-social-link-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.tb-profiles__review a { display:inline-flex; align-items:center; min-height:44px; padding-inline:0.5rem; }

/* 1.4.2: give structural page blocks the wide layout, retaining readable paragraphs. */
.tb-landing > .wp-block-group.is-layout-constrained > :is(.wp-block-columns, .tb-services, .tb-portfolio-grid, .wp-block-image, .wp-block-heading) {
    width: 100%;
    max-width: var(--wp--style--global--wide-size, 76rem);
    margin-left: auto;
    margin-right: auto;
}
.tb-landing > .tb-hero .wp-block-columns,
.tb-landing > .tb-page-header .wp-block-columns { gap: clamp(1.5rem, 4vw, 4rem); }
.tb-landing .wp-block-column { min-width: 0; }
.tb-landing .tb-hero h1 { font-size: clamp(2.1rem, 3.4vw, 3.5rem); line-height: 1.08; }
.tb-landing .tb-hero .wp-block-image img { width: 100%; }

/* A call-led site needs one header action; the enquiry action remains on pages. */
.tb-cta-call .tb-header .wp-block-buttons:has(.tb-header__phone) > .wp-block-button:not(.tb-header__phone) { display: none; }
.tb-header > .wp-block-group { gap: 1.5rem; }
.tb-header__brand { min-width: 0; flex: 0 1 auto; }
.tb-header .wp-block-site-title { white-space: normal; max-width: 22rem; font-size: clamp(0.95rem, 1.15vw, 1.125rem); line-height: 1.25; }
.tb-header__brand .wp-block-site-logo img { max-width: min(8rem, 24vw); }
.tb-header > .wp-block-group > .wp-block-group:not(.tb-header__brand) { flex-shrink: 0; gap: 1.25rem; }
.tb-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container,
.tb-header .wp-block-buttons { flex-wrap: nowrap; }
.tb-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container { gap: clamp(0.8rem, 1.5vw, 1.5rem); }
@media (max-width: 781px) {
    .tb-header .wp-block-site-title { max-width: 14rem; font-size: 0.95rem; }
    .tb-header > .wp-block-group,
    .tb-header > .wp-block-group > .wp-block-group:not(.tb-header__brand) { gap: 0.75rem; }
    .tb-header .wp-block-buttons { display: none; }
    .tb-landing > .wp-block-group > .wp-block-columns { gap: 2rem; }
}
@media (max-width: 420px) {
    .tb-header .wp-block-site-title { max-width: 11rem; font-size: 0.8rem; }
    .tb-header__brand .wp-block-site-logo img { max-width: 4.5rem; }
}

/* 1.4.3: text and headings share the wide section's left edge. */
.tb-landing > .wp-block-group.is-layout-constrained > :is(p, .wp-block-buttons) {
    width: 100%;
    max-width: min(70ch, var(--wp--style--global--wide-size, 76rem));
    margin-left: max(0px, calc((100% - var(--wp--style--global--wide-size, 76rem)) / 2)) !important;
    margin-right: auto !important;
}
.tb-landing > .wp-block-group.is-layout-constrained > .wp-block-heading + p {
    margin-top: 1rem;
}
.tb-landing > .wp-block-group.is-layout-constrained > p + .wp-block-heading {
    margin-top: 2rem;
}

/* 1.4.4: interior page headers with a light base need dark outline buttons. */
.tb-scheme-dark .tb-page-header.has-base-background-color .wp-block-button.is-style-outline > a.wp-block-button__link:not([href^="tel:"]) {
    background-color: transparent;
    border-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--contrast);
}
.tb-scheme-dark .tb-page-header.has-base-background-color .wp-block-button.is-style-outline > a.wp-block-button__link:not([href^="tel:"]):hover,
.tb-scheme-dark.tb-cta-call .tb-page-header.has-base-background-color .wp-block-button > a.wp-block-button__link[href^="tel:"]:hover {
    background-color: var(--wp--preset--color--contrast);
    border-color: var(--wp--preset--color--contrast);
    color: var(--wp--preset--color--white);
}
.tb-scheme-dark .tb-page-header.has-base-background-color .wp-block-button > a.wp-block-button__link:focus-visible {
    outline: 2px solid var(--wp--preset--color--contrast);
    outline-offset: 4px;
}
