/* CPBookingCal guest wizard (§7.1/§12). All colours are the CSS custom
   properties set inline on .cpbc-wizard by the shortcode — no hard-coded hex
   below this line except transparent/inherit. */

[x-cloak] {
	display: none !important;
}

.cpbc-wizard {
	/* The background lives on the rounded panel only — the outer wrapper is
	   transparent so the tint is clipped to the card in any theme layout. */
	background: transparent;
	padding: 12px 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--cpbc-text);
	min-width: 0; /* allow shrinking inside flex/column blocks */
}

/* Themes style bare <button>/<input> aggressively (min-widths, padding,
   shadows) — inside narrow column blocks that inflates the day grid until it
   overflows the card. Reset the pieces layout depends on. */
.cpbc-wizard button {
	box-sizing: border-box;
	margin: 0;
	min-width: 0;
	min-height: 0;
	font-family: inherit;
	line-height: 1.2;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

.cpbc-panel {
	background: var(--cpbc-bg);
	border: 1px solid color-mix(in srgb, var(--cpbc-accent) 25%, transparent);
	border-radius: 18px;
	padding: clamp(12px, 7%, 28px);
	max-width: 420px;
	margin: 0 auto;
	box-sizing: border-box;
	overflow: hidden; /* clip anything (incl. bg) to the rounded rectangle */
}

.cpbc-h {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 16px;
	color: var(--cpbc-text);
}

.cpbc-alert {
	background: color-mix(in srgb, var(--cpbc-full) 8%, var(--cpbc-surface));
	color: var(--cpbc-full);
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 16px;
	font-size: 15px;
}

/* --- Step 1: calendar --- */
.cpbc-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.cpbc-navbtn {
	background: var(--cpbc-surface);
	border: 1px solid var(--cpbc-border);
	border-radius: 8px;
	width: 34px;
	height: 34px;
	font-size: 18px;
	cursor: pointer;
	color: var(--cpbc-text);
}

.cpbc-navbtn:disabled {
	opacity: 0.4;
	cursor: default;
}

/* minmax(0, 1fr): a plain 1fr track cannot shrink below its content's
   intrinsic minimum, so seven of them blow out of narrow column blocks —
   minmax(0, …) lets the cells actually share whatever width exists. */
.cpbc-dow {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	text-align: center;
	font-size: 12px;
	color: var(--cpbc-muted);
	margin-bottom: 4px;
}

.cpbc-days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	margin-bottom: 12px;
}

.cpbc-daybtn {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	border-radius: 8px;
	border: 0;
	background: var(--cpbc-daycard);
	color: var(--cpbc-muted);
	font-size: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: default;
	overflow: hidden;
}

.cpbc-daybtn.is-blank {
	background: transparent;
}

.cpbc-daybtn.is-avail {
	background: var(--cpbc-available-bg);
	border: 1px solid var(--cpbc-available-border);
	color: var(--cpbc-text);
	cursor: pointer;
}

.cpbc-daybtn.is-sel {
	background: var(--cpbc-accent);
	color: var(--cpbc-accent-text);
}

.cpbc-daybtn.is-full em {
	font-style: normal;
	font-size: 9px;
	color: var(--cpbc-full);
}

/* --- Step 1: slots + summary --- */
.cpbc-slots {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}

.cpbc-slotbtn {
	background: var(--cpbc-surface);
	border: 1px solid var(--cpbc-border);
	border-radius: 8px;
	padding: 10px 12px;
	text-align: left;
	cursor: pointer;
	color: var(--cpbc-text);
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.cpbc-slotbtn.is-sel {
	border-color: var(--cpbc-accent);
	box-shadow: inset 0 0 0 1px var(--cpbc-accent);
}

.cpbc-slotbtn:disabled {
	opacity: 0.5;
	cursor: default;
}

.cpbc-slotbtn span {
	color: var(--cpbc-muted);
	font-size: 13px;
}

.cpbc-summary {
	background: var(--cpbc-summary-bg);
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 16px;
	font-size: 15px;
}

.cpbc-summary-date {
	font-weight: 600;
}

/* --- Step 2: form --- */
.cpbc-panel label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin: 12px 0 4px;
}

.cpbc-panel input,
.cpbc-panel select {
	display: block;
	width: 100%;
	box-sizing: border-box;
	background: var(--cpbc-surface);
	border: 1px solid var(--cpbc-border);
	border-radius: 8px;
	padding: 12px;
	font-size: 16px;
	font-weight: 400;
	color: var(--cpbc-text);
	margin-top: 4px;
}

.cpbc-panel input:focus,
.cpbc-panel select:focus {
	outline: 2px solid var(--cpbc-accent);
	outline-offset: 0;
	border-color: var(--cpbc-accent);
}

.cpbc-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.cpbc-help {
	display: block;
	font-size: 14px;
	font-weight: 400;
	color: var(--cpbc-muted);
	margin-top: 4px;
}

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

.cpbc-total {
	display: flex;
	justify-content: space-between;
	border-top: 1px solid var(--cpbc-border);
	margin-top: 16px;
	padding-top: 12px;
	font-size: 17px;
}

/* --- Buttons --- */
.cpbc-primary,
.cpbc-secondary {
	border-radius: 8px;
	padding: 14px 18px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	margin-top: 16px;
}

.cpbc-primary {
	background: var(--cpbc-accent);
	color: var(--cpbc-accent-text);
	border: 0;
}

.cpbc-primary:disabled {
	opacity: 0.5;
	cursor: default;
}

.cpbc-secondary {
	background: var(--cpbc-surface);
	border: 1px solid var(--cpbc-border);
	color: var(--cpbc-text);
}

.cpbc-btnrow {
	display: flex;
	gap: 8px;
}

.cpbc-btnrow .cpbc-primary,
.cpbc-btnrow .cpbc-secondary {
	width: auto;
	flex: 1;
}

/* --- /events archive + [cpbc_events] cards (§21.4) --- */
.cpbc-events-archive-page {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px 16px;
}

.cpbc-events-archive-header h1 {
	font-size: 28px;
}

.cpbc-event-row {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	padding: 24px 0;
	border-bottom: 1px solid var(--cpbc-border, #e2dcd2);
}

.cpbc-event-row-body {
	flex: 1;
	min-width: 0;
}

.cpbc-event-row-when {
	font-weight: 600;
	color: var(--cpbc-muted, #6b6358);
	margin-bottom: 4px;
}

.cpbc-event-row-title {
	margin: 0 0 6px;
	font-size: 22px;
}

.cpbc-event-row-title a {
	text-decoration: none;
	color: var(--cpbc-text, #2e2a26);
}

.cpbc-event-row-status {
	color: var(--cpbc-available-border, #5fa86b);
	font-weight: 600;
	margin-bottom: 8px;
}

.cpbc-event-row-excerpt {
	color: var(--cpbc-muted, #6b6358);
	margin: 0 0 12px;
}

.cpbc-event-row-cta {
	display: inline-block;
	width: auto;
	margin: 0;
	padding: 10px 18px;
	border-radius: 8px;
	background: var(--cpbc-accent, #c06a43);
	color: var(--cpbc-accent-text, #ffffff);
	font-weight: 600;
	text-decoration: none;
}

.cpbc-event-row-image {
	flex: 0 0 320px;
	max-width: 40%;
}

.cpbc-event-row-image img {
	width: 100%;
	height: auto;
	border-radius: 12px;
	display: block;
}

/* §22.4 list view (reference: docs/References/TEC HotPots list view):
   month badges + date tiles on the --cpbc-ev-* accent tokens, which ride
   the same defaults ← global-settings colours layer as the wizard palette
   (the future colour-settings UI lands there). */

.cpbc-events-archive-header h1 {
	font-size: 34px;
	margin: 0 0 8px;
}

.cpbc-ev-month {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 36px 0 4px;
}

.cpbc-ev-month span {
	background: var(--cpbc-ev-accent, #7b3b3b);
	color: var(--cpbc-ev-accent-text, #ffffff);
	padding: 6px 16px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.4px;
}

.cpbc-ev-month::after {
	content: '';
	flex: 1;
	border-top: 1px solid var(--cpbc-border, #e2dcd2);
}

.cpbc-ev-tile {
	flex: 0 0 64px;
	text-align: center;
}

.cpbc-ev-tile-dow {
	display: block;
	background: var(--cpbc-ev-accent, #7b3b3b);
	color: var(--cpbc-ev-accent-text, #ffffff);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	padding: 4px 0;
}

.cpbc-ev-tile-day {
	display: block;
	background: var(--cpbc-surface, #ffffff);
	color: var(--cpbc-text, #2e2a26);
	border: 1px solid var(--cpbc-border, #e2dcd2);
	border-top: none;
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
	padding: 12px 0 10px;
}

.cpbc-event-row .cpbc-event-row-when {
	color: var(--cpbc-text, #2e2a26);
	font-weight: 400;
	font-size: 15px;
}

.cpbc-event-row-title {
	font-size: 26px;
}

.cpbc-event-row-location {
	margin: 0 0 6px;
	font-size: 15px;
	color: var(--cpbc-muted, #6b6358);
}

.cpbc-event-row-location strong {
	color: var(--cpbc-text, #2e2a26);
}

@media (max-width: 640px) {
	.cpbc-event-row {
		flex-direction: column-reverse;
	}
	.cpbc-event-row-image {
		flex-basis: auto;
		max-width: 100%;
	}
	.cpbc-ev-tile {
		display: none; /* the when-line carries the date on small screens */
	}
}

/* §22.4 month view (reference: docs/References/TEC HotPots month view):
   the toolbar (month nav + view switcher) and the grid — accent DOW row,
   day-number strips, thumbnail entries. The grid keeps a working minimum
   width and scrolls inside its own wrapper on small screens. */

.cpbc-ev-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}

.cpbc-ev-toolbar .cpbc-ev-viewtitle {
	margin: 0 0 0 6px;
	font-size: 34px;
}

.cpbc-ev-navbtn,
.cpbc-ev-today {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--cpbc-surface, #ffffff);
	border: 1px solid var(--cpbc-border, #e2dcd2);
	border-radius: 8px;
	color: var(--cpbc-text, #2e2a26);
	text-decoration: none;
}

.cpbc-ev-navbtn {
	width: 34px;
	height: 34px;
	font-size: 20px;
	line-height: 1;
}

.cpbc-ev-today {
	padding: 7px 14px;
	font-size: 14px;
}

.cpbc-ev-switcher {
	margin-left: auto;
	display: flex;
	gap: 4px;
}

.cpbc-ev-viewbtn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--cpbc-muted, #6b6358);
	text-decoration: none;
}

.cpbc-ev-viewbtn.is-current {
	color: var(--cpbc-ev-accent, #7b3b3b);
	font-weight: 600;
}

.cpbc-ev-monthwrap {
	overflow-x: auto;
}

.cpbc-ev-monthgrid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	min-width: 640px;
	border-left: 1px solid var(--cpbc-border, #e2dcd2);
	border-top: 1px solid var(--cpbc-border, #e2dcd2);
}

.cpbc-ev-monthgrid .cpbc-ev-dow {
	background: var(--cpbc-ev-accent, #7b3b3b);
	color: var(--cpbc-ev-accent-text, #ffffff);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-align: center;
	padding: 10px 0;
	border-bottom: 1px solid var(--cpbc-border, #e2dcd2);
}

.cpbc-ev-cell {
	background: var(--cpbc-surface, #ffffff);
	border-right: 1px solid var(--cpbc-border, #e2dcd2);
	border-bottom: 1px solid var(--cpbc-border, #e2dcd2);
	min-height: 120px;
	min-width: 0;
}

.cpbc-ev-cellnum {
	display: block;
	background: color-mix(in srgb, var(--cpbc-ev-accent, #7b3b3b) 45%, var(--cpbc-surface, #ffffff));
	color: var(--cpbc-ev-accent-text, #ffffff);
	font-size: 13px;
	font-weight: 600;
	padding: 4px 8px;
}

.cpbc-ev-cell.is-out .cpbc-ev-cellnum {
	background: color-mix(in srgb, var(--cpbc-ev-accent, #7b3b3b) 18%, var(--cpbc-surface, #ffffff));
}

.cpbc-ev-cell.is-today .cpbc-ev-cellnum {
	background: var(--cpbc-ev-accent, #7b3b3b);
}

.cpbc-ev-entry {
	padding: 8px 8px 10px;
	font-size: 13px;
}

.cpbc-ev-entry-img {
	position: relative;
	display: block;
	overflow: hidden;
	margin-bottom: 6px;
}

.cpbc-ev-entry-img img {
	width: 100%;
	height: auto;
	display: block;
}

.cpbc-ev-ribbon {
	position: absolute;
	top: 16px;
	right: -34px;
	transform: rotate(45deg);
	background: var(--cpbc-ev-accent, #7b3b3b);
	color: var(--cpbc-ev-accent-text, #ffffff);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 3px 40px;
	z-index: 1;
}

.cpbc-ev-entry-flag {
	display: inline-block;
	background: var(--cpbc-ev-accent, #7b3b3b);
	color: var(--cpbc-ev-accent-text, #ffffff);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 2px 6px;
	margin-bottom: 4px;
}

.cpbc-ev-entry-time {
	color: var(--cpbc-muted, #6b6358);
	font-size: 12px;
	margin-bottom: 2px;
}

.cpbc-ev-entry-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.cpbc-ev-entry-title a {
	color: var(--cpbc-text, #2e2a26);
	text-decoration: none;
}

.cpbc-ev-entry-location {
	font-size: 12px;
	font-weight: 400;
	color: var(--cpbc-muted, #6b6358);
}

/* Custom fields (M3-S5): checkbox/radio rows read as one line. */
.cpbc-panel .cpbc-check {
	display: flex;
	gap: 8px;
	align-items: center;
	font-weight: 400;
}

.cpbc-panel .cpbc-check input {
	width: auto;
	display: inline-block;
	margin: 0;
}
