/**
 * Front end styles.
 *
 * Low specificity and no font declarations, so Divi's typography wins and the
 * booking pages inherit the site's look without being restyled. Everything
 * visual routes through the custom properties below — override those once in
 * Divi rather than fighting individual selectors.
 */

.demobk-sessions,
.demobk-form-wrap,
.demobk-confirmation {
	--demobk-accent: #7a5230;
	--demobk-rule: rgba(0, 0, 0, 0.12);
	--demobk-surface: rgba(0, 0, 0, 0.03);
	--demobk-muted: rgba(0, 0, 0, 0.6);
	--demobk-warn: #b32d2e;
	--demobk-radius: 4px;
}

/* --------------------------------------------------------------------------
   Date badge (archive cards)

   Deliberately minimal — position it in Divi rather than here, since the
   card layout belongs in the builder. This just makes it legible over a
   photograph if you drop it straight in.
   -------------------------------------------------------------------------- */

.demobk-date-badge {
	display: inline-block;
	background: #4a5d3a;
	color: #fff;
	padding: 0.4em 0.9em;
	font-size: 0.85em;
	line-height: 1.3;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.demobk-empty {
	background: var(--demobk-surface);
	border-radius: var(--demobk-radius);
	padding: 1.5rem;
	text-align: center;
	color: var(--demobk-muted);
}

.demobk-empty > *:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Dates list
   -------------------------------------------------------------------------- */

.demobk-sessions__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.demobk-session {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	padding: 1rem 0;
	border-bottom: 1px solid var(--demobk-rule);
}

.demobk-session:last-child {
	border-bottom: 0;
}

.demobk-session__when {
	flex: 1 1 16rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.demobk-session__date {
	font-weight: 700;
}

.demobk-session__time,
.demobk-session__where {
	font-size: 0.9em;
	color: var(--demobk-muted);
}

.demobk-session__price {
	font-weight: 700;
	white-space: nowrap;
}

.demobk-session__action {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* Scarcity is stated plainly rather than dressed up — it's true, and at ten
   seats a session it is genuinely useful information. Three registers:
   neutral when there's room, amber when it's getting tight, red only when it
   really is nearly gone. */
.demobk-session__few {
	font-size: 0.85em;
	color: var(--demobk-muted);
}

.demobk-session__few--low {
	color: #a8620a;
	font-weight: 600;
}

.demobk-session__few--urgent {
	color: var(--demobk-warn);
	font-weight: 700;
	background: #fdecea;
	padding: 0.25em 0.6em;
	border-radius: var(--demobk-radius);
}

.demobk-session__status {
	font-size: 0.9em;
	color: var(--demobk-muted);
	font-style: italic;
}

.demobk-session--closed {
	opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.demobk-btn {
	display: inline-block;
	appearance: none;
	border: 1px solid var(--demobk-accent);
	background: var(--demobk-accent);
	color: #fff;
	border-radius: var(--demobk-radius);
	padding: 0.5em 1.2em;
	font: inherit;
	font-size: 0.95em;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.demobk-btn:hover,
.demobk-btn:focus-visible {
	opacity: 0.85;
	color: #fff;
	text-decoration: none;
}

.demobk-btn--large {
	font-size: 1.05em;
	padding: 0.7em 1.6em;
}

/* --------------------------------------------------------------------------
   Booking form
   -------------------------------------------------------------------------- */

.demobk-summary {
	background: var(--demobk-surface);
	border-radius: var(--demobk-radius);
	padding: 1.25rem;
	margin-bottom: 1.5rem;
}

.demobk-summary__title {
	margin: 0 0 0.35rem;
}

.demobk-summary__when,
.demobk-summary__price {
	margin: 0;
	color: var(--demobk-muted);
}

.demobk-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin-bottom: 1.25rem;
}

.demobk-field label {
	font-weight: 600;
}

.demobk-field input,
.demobk-field select,
.demobk-field textarea {
	width: 100%;
	max-width: 30rem;
	padding: 0.55em 0.7em;
	border: 1px solid var(--demobk-rule);
	border-radius: var(--demobk-radius);
	font: inherit;
}

.demobk-field select {
	max-width: 8rem;
}

.demobk-hint {
	font-size: 0.85em;
	color: var(--demobk-muted);
}

/* Payment method choice. Card first because it's instant, but bank transfer
   given equal visual weight rather than tucked away — a good proportion of
   this audience genuinely prefers it, and hiding it would cost bookings. */
.demobk-methods {
	border: 1px solid var(--demobk-rule);
	border-radius: var(--demobk-radius);
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}

.demobk-methods legend {
	font-weight: 600;
	padding: 0 0.4em;
}

.demobk-method {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.5rem 0;
	cursor: pointer;
	font-weight: 400;
}

.demobk-method input {
	width: auto;
	margin-top: 0.3em;
	flex: 0 0 auto;
	accent-color: var(--demobk-accent);
}

.demobk-method span {
	display: block;
}

.demobk-method .demobk-hint {
	display: block;
}

/* The detail box only makes sense once they've said there's something to
   tell us. Hidden with :has() where supported, and revealed by the script
   otherwise — either way it starts closed and never blocks submission. */
.demobk-allergy-detail {
	display: none;
	margin-top: 0.75rem;
	padding-left: 1.9rem;
}

.demobk-allergies.is-detail-open .demobk-allergy-detail {
	display: flex;
}

@supports selector(:has(*)) {
	.demobk-allergies:has(input[value="yes"]:checked) .demobk-allergy-detail {
		display: flex;
	}
}

.demobk-error {
	background: #fdecea;
	border-left: 3px solid var(--demobk-warn);
	padding: 0.9rem 1rem;
	border-radius: 0 var(--demobk-radius) var(--demobk-radius) 0;
}

/* Honeypot: hidden from people, present for bots. Not display:none, because
   some bots skip those; off-screen with no tab stop is more convincing. */
.demobk-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Confirmation
   -------------------------------------------------------------------------- */

.demobk-confirmation__what {
	background: var(--demobk-surface);
	padding: 1rem 1.25rem;
	border-radius: var(--demobk-radius);
}

.demobk-pay {
	border: 2px solid var(--demobk-accent);
	border-radius: var(--demobk-radius);
	padding: 1.25rem;
	margin: 1.5rem 0;
}

.demobk-pay h3 {
	margin-top: 0;
}

.demobk-pay__amount {
	font-size: 1.15em;
}

.demobk-bank {
	width: 100%;
	max-width: 26rem;
	border-collapse: collapse;
	margin: 1rem 0;
}

.demobk-bank th,
.demobk-bank td {
	text-align: left;
	padding: 0.45rem 0.75rem 0.45rem 0;
	border-bottom: 1px solid var(--demobk-rule);
	vertical-align: top;
}

.demobk-bank th {
	font-weight: 600;
	color: var(--demobk-muted);
	width: 45%;
}

.demobk-bank__ref td strong {
	font-size: 1.2em;
	letter-spacing: 0.05em;
}

.demobk-paid {
	background: #e8f5e9;
	border-left: 3px solid #2e7d32;
	padding: 0.9rem 1rem;
	border-radius: 0 var(--demobk-radius) var(--demobk-radius) 0;
}

/* The anti-fraud notice. Deliberately prominent: substituting bank details in
   an intercepted email is a common scam, and this audience is the target. */
.demobk-warning {
	background: #fff6e5;
	border-left: 3px solid #d68a00;
	padding: 0.9rem 1rem;
	border-radius: 0 var(--demobk-radius) var(--demobk-radius) 0;
	font-size: 0.9em;
}

@media (max-width: 600px) {
	.demobk-session {
		align-items: flex-start;
	}

	.demobk-session__action {
		margin-left: 0;
		width: 100%;
	}
}

@media print {
	.demobk-btn,
	.demobk-warning {
		display: none !important;
	}
}
