/**
 * TB POS — the guest pages, wearing the host site's clothes.
 *
 * These four surfaces (the application form, the applicant's portal, the
 * agreement portal, the VIP guest pages) now render inside the active theme,
 * so two separate jobs land here.
 *
 * **1. Speak the site's visual language.** The product's own palette is a
 * warm resort one — teal, champagne gold, stone — which is right for the
 * till and the VIP pages seen on their own, and wrong sitting underneath
 * somebody's real site header. Rather than restyle every component, the
 * tokens those components already consume are re-pointed: one block of
 * variables, and the whole surface follows. The values are the host site's:
 * Poppins, the #dd9933 gold its buttons use, near-black text on white, 4px
 * radii.
 *
 * **2. Survive the theme.** A front end is a far more hostile place to put a
 * form than wp-admin. Eventchamp alone loads Bootstrap, FontAwesome, the
 * theme's own forms CSS and a page builder's, and sets a 13px base font on
 * `body` — and WooCommerce, Tickera, Contact Form 7 and a membership plugin
 * add theirs on top. Every one of those can reach our fields.
 *
 * Specificity is the defence, not load order, and that is deliberate: our
 * stylesheets are enqueued before `wp_head()` runs, so the theme's print
 * AFTER ours and win every tie. `.tb-pos-root.tb-pos-in-theme X` carries
 * three classes, which beats `.form-control` (one), `input[type="text"]`
 * (one class-equivalent plus an element) and even `.gt-form input[type=text]`
 * (two). It does not depend on who printed last, which is the only property
 * worth having here.
 *
 * `!important` appears exactly once, on box-sizing, where a theme setting
 * `content-box` on `*` would otherwise make every padded field overflow its
 * row. There is a test that counts them.
 */

/* ===================================================================
   The site's tokens
   ===================================================================
   On `.tb-pos-public-shell` rather than `.tb-pos-in-theme`, so the
   standalone fallback page looks the same minus the chrome. A guest who
   lands there because the theme failed should not also get a different
   brand. */

.tb-pos-root.tb-pos-public-shell {
	/* --tb-teal is this product's accent token, and the components use it two
	   ways: as a FILL behind white text (buttons) and as TEXT on a pale wash
	   (an active tab, a completed step, a focus ring). The site's gold is
	   #dd9933, which is fine as a fill and unreadable as text — 2.42:1 on
	   white. Pointing the token straight at it turned four readable things
	   into unreadable ones, which the contrast audit caught and which is the
	   whole reason that audit gates the release.
	
	   So the token carries the DEEP gold, which works as text (5.80:1 on
	   white, 5.32:1 on the wash) and behind white (5.80:1), and the primary
	   button is painted with the site's actual gold further down, with ink on
	   it at 7.39:1. The button a guest presses is the site's colour; the small
	   print is a colour they can read. */
	--tb-teal: #8a5c12;
	--tb-teal-deep: #6e4a0e;
	--tb-teal-wash: #fdf4e6;
	--tb-text-on-teal: #ffffff;

	--tb-shell-gold: #dd9933;
	--tb-shell-gold-deep: #8a5c12;
	/* The pressed state of the site's gold. A token rather than a literal in
	   the button rule, so a site with a different gold changes one line. */
	--tb-shell-gold-hover: #c4852a;
	--tb-shell-cream: #f6efe4;
	/* Ink, not the white the site uses on its own gold buttons. White on
	   #dd9933 is 2.42:1 — that is the one detail of the look not worth
	   copying. */
	--tb-text-on-gold: #12181e;
	/* The ink the !important CTA rule in components.css reads. Without it that
	   rule paints white on this gold — 2.42:1, the contrast failure the site's
	   own buttons have — and no specificity can beat an !important. */
	--tb-btn-primary-ink: #12181e;
	--tb-text-on-gold-deep: #ffffff;

	/* The soft coral the site accents its section titles with. Decoration
	   only: at 1.92:1 on white it is never text. */
	--tb-coral: #faa4a5;
	--tb-coral-deep: #c97b6c;
	--tb-text-on-coral: #12181e;

	--tb-bg: #ffffff;
	--tb-bg-glow: none;
	--tb-surface: #ffffff;
	--tb-surface-solid: #ffffff;
	--tb-surface-alt: #f7f7f8;
	--tb-header-bg: #ffffff;
	--tb-field-bg: #ffffff;
	--tb-field-bg-solid: #ffffff;

	--tb-text-primary: #222222;
	--tb-text-secondary: #6b6b73;
	--tb-text-inverse: #ffffff;
	--tb-ink: #121219;
	--tb-inverse-surface: #121219;
	--tb-text-on-inverse: #ffffff;

	--tb-border: rgba(18, 18, 25, 0.12);
	/* 0.32 of black on white is 2.09:1, and this token is the one the audit
	   calls "a load-bearing border on a card" — the line that tells somebody
	   where a field begins. 0.55 clears the 3:1 a non-text boundary needs. */
	--tb-border-strong: rgba(18, 18, 25, 0.55);
	--tb-border-gold: rgba(221, 153, 51, 0.45);

	/* The site rounds everything at 4px. Ours rounds at 8–16, which reads
	   as a different product sitting in the page. */
	--tb-radius-sm: 3px;
	--tb-radius-md: 4px;
	--tb-radius-lg: 6px;
	--tb-radius-xl: 8px;

	--tb-shadow-sm: 0 1px 2px rgba(18, 18, 25, 0.04);
	--tb-shadow-md: 0 2px 10px rgba(18, 18, 25, 0.06);

	--tb-font: "Poppins", "Helvetica Neue", Arial, sans-serif;
	--tb-font-display: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

/* Inside a real theme the fonts come from the theme, whatever they are: a
   site that is not this one gets its own face rather than ours, which is the
   whole point of rendering in the theme. `inherit` resolves against the
   theme's body, so this is one declaration rather than a list to maintain. */
.tb-pos-root.tb-pos-in-theme {
	--tb-font: inherit;
	--tb-font-display: inherit;
	--tb-bg: transparent;
	background: transparent;
}

/* The standalone fallback owns its own page background; inside the theme the
   wrapper is transparent and the theme's shows through. Painted on the root
   rather than on `body`, because the tokens are declared on the root — a
   colour set on `body` could only be a literal, and a literal cannot follow
   the theme. */
.tb-pos-root.tb-pos-public-shell:not(.tb-pos-in-theme) {
	min-height: 100vh;
	background: var(--tb-surface-solid);
}

/* ===================================================================
   Surviving the theme
   ===================================================================
   The control rules below apply in BOTH modes — the fallback page should not
   be visibly poorer than the one inside the theme — but they are written for
   the hostile case, which is the front end. */

.tb-pos-root.tb-pos-in-theme,
.tb-pos-root.tb-pos-in-theme * {
	box-sizing: border-box !important;
}

.tb-pos-root.tb-pos-in-theme {
	/* Eventchamp's base is 13px. Our type scale is built on 15–16px, so
	   inheriting it shrinks every label, hint and field in the form to the
	   size of a footnote. */
	font-size: 16px;
	line-height: 1.6;
	color: var(--tb-text-primary);
	text-align: left;
}

.tb-pos-root.tb-pos-in-theme p,
.tb-pos-root.tb-pos-in-theme li,
.tb-pos-root.tb-pos-in-theme label {
	line-height: 1.6;
}

/* Themes and form plugins style controls by element and by their own
   classes. These put ours back where the components expect them. */
.tb-pos-root.tb-pos-public-shell .tb-input,
.tb-pos-root.tb-pos-public-shell .tb-select,
.tb-pos-root.tb-pos-public-shell .tb-textarea {
	max-width: 100%;
	height: auto;
	margin: 0;
	box-shadow: none;
	background-image: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: var(--tb-font);
	font-size: var(--tb-text-control);
	line-height: 1.5;
	color: var(--tb-text-primary);
	background-color: var(--tb-field-bg-solid);
	border: 1px solid var(--tb-border-strong);
	border-radius: var(--tb-radius-md);
}

.tb-pos-root.tb-pos-public-shell .tb-textarea {
	min-height: 96px;
	padding: 12px 14px;
}

.tb-pos-root.tb-pos-public-shell .tb-input:focus,
.tb-pos-root.tb-pos-public-shell .tb-select:focus,
.tb-pos-root.tb-pos-public-shell .tb-textarea:focus {
	border-color: var(--tb-teal);
	box-shadow: 0 0 0 3px rgba(221, 153, 51, 0.18);
	outline: none;
}

.tb-pos-root.tb-pos-public-shell .tb-btn {
	font-family: var(--tb-font);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	box-shadow: none;
}

.tb-pos-root.tb-pos-public-shell .tb-btn:hover,
.tb-pos-root.tb-pos-public-shell .tb-btn:focus {
	text-decoration: none;
	transform: none;
}

/* The site's own gold, on the button a guest actually presses. Painted here
   rather than through --tb-teal because that token is also used as text. */
.tb-pos-root.tb-pos-public-shell .tb-btn--primary,
.tb-pos-public .tb-btn--primary {
	background: var(--tb-shell-gold);
	color: var(--tb-text-on-gold);
	border-color: var(--tb-shell-gold);
}

.tb-pos-root.tb-pos-public-shell .tb-btn--primary:hover,
.tb-pos-root.tb-pos-public-shell .tb-btn--primary:focus {
	background: var(--tb-shell-gold-hover);
	border-color: var(--tb-shell-gold-hover);
	color: var(--tb-text-on-gold);
}

/* A theme's `ul` styling turns the checkbox groups into bulleted lists
   indented off the card. */
.tb-pos-root.tb-pos-public-shell ul,
.tb-pos-root.tb-pos-public-shell ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tb-pos-root.tb-pos-public-shell a {
	color: var(--tb-shell-gold-deep);
}

.tb-pos-root.tb-pos-public-shell h1,
.tb-pos-root.tb-pos-public-shell h2,
.tb-pos-root.tb-pos-public-shell h3 {
	font-family: var(--tb-font-display);
	color: var(--tb-text-primary);
	text-transform: none;
	margin: 0;
}

/* ===================================================================
   The page itself
   ===================================================================
   Width, rhythm and the card the sections sit in. Shared by all four
   surfaces so the funnel reads as one thing from application to signature. */

/* `.tb-customer` is the VIP guest page's own layout: a full-height column
   with a cream wash and its own padding, which is right for a page that owns
   the browser window and wrong for one sitting between a site's header and
   its footer. The wash and the height go; the centring stays, because the VIP
   pages are built on it.

   `width: 100%` is not decoration: the centring is `align-items: center` on a
   flex column, so a child with only a max-width shrinks to fit its content
   and the form comes out half the width of the page. */
.tb-pos-root.tb-pos-public-shell.tb-customer {
	min-height: 0;
	background: none;
	padding: 0;
}

.tb-pos-public-shell .tb-public {
	width: 100%;
	max-width: 940px;
	margin: 0 auto;
	padding: 48px 20px 72px;
}

.tb-pos-public-shell .tb-public-refuse {
	max-width: 620px;
	padding-top: 72px;
}

.tb-public-hero {
	margin: 0 0 28px;
}

.tb-public-eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tb-shell-gold-deep);
}

.tb-public-title {
	margin: 0;
	font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--tb-text-primary);
}

.tb-public-lede {
	margin: 12px 0 0;
	max-width: 62ch;
	font-size: 1.0625rem;
	color: var(--tb-text-secondary);
}

.tb-public-card {
	margin: 0 0 20px;
	padding: 26px 26px 8px;
	background: var(--tb-surface-solid);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-lg);
	box-shadow: var(--tb-shadow-sm);
}

/* The cards are the form's structure, so the last one must not end flush
   against the button that submits it. */
.tb-public-card + .tb-public-foot {
	margin-top: 28px;
}

.tb-public-card--center {
	padding: 32px 26px;
	text-align: center;
}

.tb-public-card--quiet {
	background: var(--tb-surface-alt);
	box-shadow: none;
}

.tb-public-card__head {
	margin: 0 0 20px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--tb-border);
}

.tb-public-card__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--tb-text-primary);
}

.tb-public-card__note {
	margin: 8px 0 0;
	max-width: 68ch;
	font-size: 0.9375rem;
	color: var(--tb-text-secondary);
}

/* A number, so somebody part-way down a long form can see where they are. */
.tb-public-card__step {
	display: inline-block;
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tb-shell-gold-deep);
}

.tb-public-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 22px;
}

.tb-public-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
	.tb-public-grid,
	.tb-public-grid--3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.tb-pos-public-shell .tb-public {
		padding: 28px 16px 56px;
	}

	.tb-public-card {
		padding: 20px 18px 4px;
	}
}

.tb-public-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 22px 26px;
	background: var(--tb-surface-alt);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-lg);
}

.tb-public-foot .tb-btn {
	min-width: 220px;
}

.tb-public-foot__note {
	flex: 1 1 260px;
	margin: 0;
	font-size: 0.875rem;
	color: var(--tb-text-secondary);
}

/* The consent lines are not just two more fields: they are what the
   applicant is asserting. Boxed, so they read as a statement. */
.tb-public-consent {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 14px;
	padding: 14px 16px;
	background: var(--tb-surface-alt);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-md);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.tb-public-consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--tb-teal);
}

/* ---------------------------------------------------------------------------
   Our own footer.
   
   Decision of 19 October 2026: these pages keep the theme's header — the logo
   and navigation are what make them look like the site — and close with a
   footer we own. Eventchamp's footer is a WPBakery page that only resolves
   when WPBakery has mapped its shortcodes off the main query, which on these
   routes it never does, so it arrived on the live site as literal
   `[vc_row][vc_raw_html]JTNDZGl2…` text.

   Deliberately quiet. It is the end of a quotation, an agreement or a
   booking page, not a second navigation: a name, a way back, a way to reach
   somebody, and the year.
--------------------------------------------------------------------------- */
.tb-public-sitefoot {
	margin: 56px 0 0;
	padding: 28px 0 32px;
	border-top: 1px solid var(--tb-border);
	background: var(--tb-surface-alt);
}

.tb-public-sitefoot__inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px;
	text-align: center;
}

.tb-public-sitefoot__brand {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tb-shell-gold-deep);
}

.tb-public-sitefoot__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: center;
	margin: 12px 0 0;
	font-size: 0.9375rem;
}

.tb-public-sitefoot__links a {
	color: var(--tb-text-primary);
	text-decoration: underline;
	/* 2px, because 1px underlines on a 0.9375rem line disappear against the
	   alt surface at the contrast this palette runs at. */
	text-underline-offset: 2px;
}

.tb-public-sitefoot__links a:hover,
.tb-public-sitefoot__links a:focus-visible {
	color: var(--tb-shell-gold-deep);
}

.tb-public-sitefoot__legal {
	margin: 14px 0 0;
	font-size: 0.8125rem;
	color: var(--tb-text-secondary);
}

/* ---------------------------------------------------------------------------
   The enquiry form's choosing.

   The package choice is the point of the rebuilt chain: the system does not
   guess a price, it prices what the customer picked. So the choice has to be
   readable at a glance — a name, a figure, and what is included — which a
   `<select>` cannot show. Cards with radios inside them, and the whole label
   is the hit area.

   `is-covered` is the honest part. Complete Event already contains six of the
   add-ons, and a customer who ticks one of those is not charged for it twice.
   A form that said nothing would look as though ticking it costs money.
--------------------------------------------------------------------------- */
.tb-req {
	color: var(--tb-danger);
	font-weight: 600;
}

.tb-field__error {
	margin: 5px 0 0;
	color: var(--tb-danger-text);
	font-weight: 600;
}

.tb-enq-packages {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 12px;
}

.tb-enq-package {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 16px 14px;
	background: var(--tb-surface-solid);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-md);
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.tb-enq-package:hover {
	border-color: var(--tb-shell-gold);
}

/* Two signals, not one: the border alone is a colour-only distinction, so the
   chosen card also gets the ring. */
.tb-enq-package.is-chosen {
	border-color: var(--tb-shell-gold-deep);
	box-shadow: inset 0 0 0 1px var(--tb-shell-gold-deep);
}

.tb-enq-package:focus-within {
	outline: 2px solid var(--tb-focus-ring);
	outline-offset: 2px;
}

.tb-enq-package input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--tb-shell-gold-deep);
}

.tb-enq-package__head {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	align-items: baseline;
	justify-content: space-between;
}

.tb-enq-package__name {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--tb-text-primary);
}

.tb-enq-package__price {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--tb-shell-gold-deep);
}

.tb-enq-package__includes {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--tb-text-secondary);
}

.tb-enq-addons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 8px;
}

.tb-enq-addon {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	background: var(--tb-surface-solid);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-md);
	cursor: pointer;
}

.tb-enq-addon:hover {
	border-color: var(--tb-shell-gold);
}

.tb-enq-addon:focus-within {
	outline: 2px solid var(--tb-focus-ring);
	outline-offset: 2px;
}

.tb-enq-addon input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--tb-shell-gold-deep);
}

.tb-enq-addon__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tb-enq-addon__name {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--tb-text-primary);
}

.tb-enq-addon__price {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--tb-shell-gold-deep);
}

.tb-enq-addon__note {
	font-size: 0.8125rem;
	color: var(--tb-text-secondary);
}

/* Already in the chosen package. The price is struck through rather than
   hidden, because the figure is still true of the add-on — it is just not
   something this customer will be charged. Not colour alone: the strike and
   the note below it carry the same meaning without it. */
.tb-enq-addon.is-covered {
	background: var(--tb-surface-alt);
}

.tb-enq-addon.is-covered .tb-enq-addon__price {
	text-decoration: line-through;
	color: var(--tb-text-secondary);
	font-weight: 400;
}

.tb-enq-extras {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 10px;
}

.tb-enq-extra {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: var(--tb-surface-alt);
	border: 1px solid var(--tb-border);
	border-radius: var(--tb-radius-md);
}

/* `min-width: 0` is load-bearing, and the browser is what established it.
   A flex column will not shrink below its content's min-content width without
   it, so "Extra kitchen display · $29.00 each" held the row open and pushed
   the number box 33–47px past the fieldset at every width, phone included.
   Caught by bin/verify-form-layout.js, which measures pixels; nothing that
   reads the CSS or the PHP would ever have seen it. */
.tb-enq-extra__label {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
	font-size: 0.9375rem;
	color: var(--tb-text-primary);
}

.tb-enq-extra__price {
	font-size: 0.8125rem;
	color: var(--tb-text-secondary);
}

/* Wide enough for two digits and the stepper the browser draws, and allowed
   to shrink rather than overflow when the row runs out of room. */
.tb-enq-extra__qty {
	flex: 0 1 76px;
	width: 76px;
	min-width: 0;
	max-width: 100%;
	padding: 0 8px;
	text-align: center;
}

@media (max-width: 640px) {
	.tb-enq-packages,
	.tb-enq-addons,
	.tb-enq-extras {
		grid-template-columns: 1fr;
	}
}
