/**
 * Booking form styling.
 *
 * Structural only: layout, spacing and the quote panel. Colours and type come
 * from the theme through currentColor and inherited fonts, so the redesign can
 * restyle this without editing the plugin. Every custom property has a
 * fallback, so the form looks deliberate even with no theme tokens at all.
 */

.gst-booking {
	--gst-gap: 1rem;
	--gst-radius: var(--wp--custom--radius, 6px);
	--gst-line: color-mix(in srgb, currentColor 18%, transparent);
	--gst-muted: color-mix(in srgb, currentColor 65%, transparent);
	--gst-panel: color-mix(in srgb, currentColor 5%, transparent);

	max-width: 46rem;
	font-size: 1rem;
	line-height: 1.5;
}

.gst-booking *,
.gst-booking *::before,
.gst-booking *::after {
	box-sizing: border-box;
}

/* ---------- fieldsets ---------- */

.gst-booking .gst-fieldset {
	border: 1px solid var(--gst-line);
	border-radius: var(--gst-radius);
	padding: 1.15rem 1.25rem 1.35rem;
	margin: 0 0 var(--gst-gap);
	min-width: 0;
}

.gst-booking .gst-fieldset > legend {
	font-weight: 600;
	padding: 0 0.4rem;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
}

/* ---------- layout ---------- */

.gst-booking .gst-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin: 0 0 0.85rem;
}

.gst-booking .gst-row > .gst-field {
	flex: 1 1 10rem;
	margin: 0;
}

.gst-booking .gst-row > .gst-field--wide {
	flex: 1 1 100%;
}

.gst-booking .gst-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin: 0 0 0.85rem;
	min-width: 0;
}

.gst-booking .gst-field > label,
.gst-booking .gst-field > legend {
	font-weight: 600;
	font-size: 0.875rem;
}

.gst-booking .gst-hint {
	font-size: 0.8125rem;
	color: var(--gst-muted);
}

/* ---------- controls ---------- */

.gst-booking input[type="text"],
.gst-booking input[type="email"],
.gst-booking input[type="tel"],
.gst-booking input[type="date"],
.gst-booking input[type="time"],
.gst-booking input[type="number"],
.gst-booking select,
.gst-booking textarea {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid var(--gst-line);
	border-radius: var(--gst-radius);
	padding: 0.55rem 0.65rem;
	width: 100%;
	max-width: 100%;
}

.gst-booking textarea {
	resize: vertical;
}

.gst-booking input:focus-visible,
.gst-booking select:focus-visible,
.gst-booking textarea:focus-visible,
.gst-booking button:focus-visible,
.gst-booking summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ---------- radio and checkbox groups ---------- */

.gst-booking .gst-field--radios {
	border: 0;
	padding: 0;
	margin: 0 0 0.85rem;
}

.gst-booking .gst-field--radios > legend {
	margin-bottom: 0.35rem;
	padding: 0;
}

.gst-booking .gst-field--radios label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 1.1rem 0.35rem 0;
	font-weight: 400;
	font-size: 0.9375rem;
}

.gst-booking .gst-field--radios input {
	margin: 0;
}

/* The one-line payment statement that replaced the three-way radio group.
   Muted, because it is reassurance rather than an instruction: the customer
   has no decision to make here. */
.gst-booking .gst-pay-note {
	margin: 0 0 0.85rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--gst-ink-2, #4B5162);
}

.gst-booking .gst-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.45;
}

.gst-booking .gst-consent input {
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

/* ---------- the quote panel ---------- */

.gst-booking .gst-quote {
	background: var(--gst-panel);
	border: 1px solid var(--gst-line);
	border-radius: var(--gst-radius);
	padding: 1rem 1.15rem;
	margin: 0 0 var(--gst-gap);
}

.gst-booking .gst-quote__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
}

.gst-booking .gst-quote__label {
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--gst-muted);
}

.gst-booking .gst-quote__amount {
	font-size: 1.75rem;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.gst-booking .gst-quote__note,
.gst-booking .gst-quote__empty,
.gst-booking .gst-quote__loading,
.gst-booking .gst-quote__error {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: var(--gst-muted);
}

.gst-booking .gst-quote__error {
	color: inherit;
	font-weight: 600;
}

.gst-booking .gst-quote__breakdown {
	margin-top: 0.7rem;
	font-size: 0.875rem;
}

.gst-booking .gst-quote__breakdown summary {
	cursor: pointer;
	color: var(--gst-muted);
}

.gst-booking .gst-quote__breakdown dl {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.2rem 1rem;
	margin: 0.6rem 0 0;
}

.gst-booking .gst-quote__breakdown dt {
	margin: 0;
}

/* The leg heading names the journey the lines below it belong to. */
.gst-booking .gst-quote__breakdown dt.gst-quote__leg {
	font-weight: 600;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gst-muted);
	margin-top: 0.45rem;
}

.gst-booking .gst-quote__breakdown dl > dt.gst-quote__leg:first-child {
	margin-top: 0;
}

.gst-booking .gst-quote__breakdown dd {
	margin: 0;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* ---------- submit ---------- */

.gst-booking .gst-submit {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
}

.gst-booking .gst-submit button {
	font: inherit;
	font-weight: 600;
	color: inherit;
	background: transparent;
	border: 2px solid currentColor;
	border-radius: var(--gst-radius);
	padding: 0.7rem 1.5rem;
	cursor: pointer;
	align-self: flex-start;
}

/* ---------- messages ---------- */

.gst-booking .gst-message {
	border: 1px solid var(--gst-line);
	border-left-width: 4px;
	border-radius: var(--gst-radius);
	padding: 1rem 1.15rem;
	margin: 0 0 var(--gst-gap);
	background: var(--gst-panel);
}

.gst-booking .gst-message h3 {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
}

.gst-booking .gst-message p {
	margin: 0;
}

/* The config island is data, never display. */
.gst-booking .gst-booking__config {
	display: none;
}

/* Kept off screen rather than display:none, so bots still fill it in. */
.gst-booking .gst-honeypot {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 30rem) {
	.gst-booking .gst-row > .gst-field {
		flex: 1 1 100%;
	}

	.gst-booking .gst-quote__amount {
		font-size: 1.5rem;
	}
}

/* A journey with no agreed price yet. Sized like the amount it stands in for. */
.gst-booking .gst-quote__request {
	font-size: 1.15rem;
	line-height: 1.3;
	font-weight: 600;
}
