/* Cascata Booking – mobile first */
.cbk, .cbk *, .cbk *::before, .cbk *::after { box-sizing: border-box; }

.cbk {
	--cbk-ink: #032127;
	--cbk-primary: #274A56;
	--cbk-bg: #FAF7F2;
	--cbk-surface: #F3ECDF;
	--cbk-muted: #A3B2B7;
	--cbk-line: color-mix(in srgb, var(--cbk-ink) 14%, transparent);
	--cbk-soft: color-mix(in srgb, var(--cbk-ink) 62%, transparent);
	--cbk-danger: #A2391F;
	--cbk-font-display: "Belleza", Optima, serif;
	--cbk-font-body: "Figtree", system-ui, sans-serif;
	--cbk-gap: 16px;

	color: var(--cbk-ink);
	background: var(--cbk-bg);
	font-family: var(--cbk-font-body);
	font-size: 16px;
	line-height: 1.5;
	padding: 20px 16px 0;
	max-width: 1120px;
	margin: 0 auto;
	container-type: inline-size;
	container-name: cbk;
	-webkit-tap-highlight-color: transparent;
}
.cbk button, .cbk input, .cbk textarea { font: inherit; color: inherit; }
.cbk button { cursor: pointer; text-transform: none; letter-spacing: normal; box-shadow: none; }
.cbk button:disabled { cursor: default; }
.cbk :focus-visible { outline: 2px solid var(--cbk-primary); outline-offset: 2px; }

.cbk-intro { margin: 0 0 20px; color: var(--cbk-soft); }
.cbk-noscript { padding: 16px; background: var(--cbk-surface); }

/* Loading dots before JS renders */
.cbk-loading { display: flex; gap: 8px; justify-content: center; padding: 64px 0; }
.cbk-loading span { width: 8px; height: 8px; background: var(--cbk-primary); border-radius: 50%; animation: cbk-pulse 1s infinite ease-in-out; }
.cbk-loading span:nth-child(2) { animation-delay: .15s; }
.cbk-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes cbk-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Steps */
.cbk-step { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--cbk-line); scroll-margin-top: 16px; }
.cbk-step:last-child { border-bottom: 0; }
.cbk-h {
	font-family: var(--cbk-font-display);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.2;
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--cbk-ink);
	letter-spacing: 0;
	text-transform: none;
}
.cbk-n {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 28px; height: 28px;
	border: 1px solid var(--cbk-ink);
	border-radius: 50%;
	font-family: var(--cbk-font-body);
	font-size: .8125rem;
	font-weight: 500;
}
.cbk-placeholder { margin: 0; color: var(--cbk-soft); font-size: .9375rem; }

/* Calendar */
.cbk-cal { background: #fff; border: 1px solid var(--cbk-line); padding: 12px 6px 14px; }
.cbk-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cbk-cal__title { font-family: var(--cbk-font-display); font-size: 1.25rem; text-transform: capitalize; }
.cbk-cal__title span { color: var(--cbk-soft); }
.cbk-nav {
	width: 44px; height: 44px;
	display: grid; place-items: center;
	background: transparent; border: 0; border-radius: 50%;
}
.cbk-nav svg { width: 22px; height: 22px; fill: none; stroke: var(--cbk-ink); stroke-width: 1.6; }
.cbk-nav:hover:not(:disabled) { background: var(--cbk-surface); }
.cbk-nav:disabled svg { stroke: var(--cbk-muted); }

.cbk-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cbk-cal__grid.is-loading { opacity: .55; }
.cbk-dow { text-align: center; font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--cbk-soft); padding: 6px 0; }

.cbk-day {
	position: relative;
	aspect-ratio: 1 / 1;
	min-width: 0;
	width: 100%;
	display: grid; place-items: center;
	background: transparent;
	border: 1px solid transparent;
	padding: 0;
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
	transition: background-color .15s, color .15s, border-color .15s;
}
.cbk-day.is-empty { visibility: hidden; }
.cbk-day::after {
	content: "";
	position: absolute; left: 50%; bottom: 9%;
	width: 5px; height: 5px; margin-left: -2.5px;
	border-radius: 50%;
}
.cbk-day.is-free::after { background: var(--cbk-primary); }
.cbk-day.is-partial::after { border: 1px solid var(--cbk-primary); background: transparent; }
.cbk-day.is-free, .cbk-day.is-partial { color: var(--cbk-ink); }
.cbk-day.is-free:hover, .cbk-day.is-partial:hover { background: var(--cbk-surface); }
.cbk-day.is-full { color: var(--cbk-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.cbk-day.is-closed, .cbk-day.is-loading { color: color-mix(in srgb, var(--cbk-muted) 70%, transparent); }
.cbk-day.is-today span { border-bottom: 1px solid currentColor; }
.cbk-day.is-selected, .cbk-day.is-selected:hover { background: var(--cbk-ink); color: var(--cbk-bg); }
.cbk-day.is-selected::after { background: var(--cbk-bg); border-color: var(--cbk-bg); }

.cbk-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 12px 0 0; padding: 0; font-size: .8125rem; color: var(--cbk-soft); }
.cbk-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.cbk-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cbk-legend .is-free { background: var(--cbk-primary); }
.cbk-legend .is-partial { border: 1px solid var(--cbk-primary); }
.cbk-legend .is-full { background: var(--cbk-muted); border-radius: 0; height: 1px; width: 12px; }

/* Slots */
.cbk-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cbk-slot {
	display: flex; flex-direction: column; align-items: flex-start;
	min-height: 64px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid var(--cbk-line);
	text-align: left;
	transition: border-color .15s, background-color .15s;
}
.cbk-slot strong { font-family: var(--cbk-font-display); font-weight: 400; font-size: 1.375rem; line-height: 1.1; }
.cbk-slot span { font-size: .8125rem; color: var(--cbk-soft); }
.cbk-slot em { font-style: normal; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.cbk-slot:hover:not(:disabled) { border-color: var(--cbk-ink); }
.cbk-slot.is-off { background: transparent; color: var(--cbk-muted); }
.cbk-slot.is-off span { color: var(--cbk-muted); }
.cbk-slot.is-selected { background: var(--cbk-ink); border-color: var(--cbk-ink); color: var(--cbk-bg); }
.cbk-slot.is-selected span { color: color-mix(in srgb, var(--cbk-bg) 75%, transparent); }

/* Arrangements */
.cbk-arrs { display: grid; gap: 8px; }
.cbk-arr {
	display: flex; flex-direction: column; gap: 2px;
	width: 100%;
	padding: 14px 16px 14px 46px;
	position: relative;
	background: #fff;
	border: 1px solid var(--cbk-line);
	text-align: left;
	transition: border-color .15s, background-color .15s;
}
.cbk-arr::before {
	content: "";
	position: absolute; left: 16px; top: 18px;
	width: 18px; height: 18px;
	border: 1px solid var(--cbk-ink);
	border-radius: 50%;
	background: #fff;
}
.cbk-arr.is-selected { border-color: var(--cbk-ink); box-shadow: inset 0 0 0 1px var(--cbk-ink); }
.cbk-arr.is-selected::before { background: var(--cbk-ink); box-shadow: inset 0 0 0 4px #fff; }
.cbk-arr:hover { border-color: var(--cbk-ink); }
.cbk-arr__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cbk-arr__top strong { font-family: var(--cbk-font-display); font-weight: 400; font-size: 1.25rem; }
.cbk-arr__top b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cbk-arr__meta { font-size: .875rem; color: var(--cbk-soft); }
.cbk-arr__desc { font-size: .875rem; }

/* Steppers */
.cbk-people { display: grid; gap: 8px; margin-top: 16px; }
.cbk-people:empty { display: none; }
.cbk-stepper {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 10px 10px 16px;
	background: var(--cbk-surface);
}
.cbk-stepper__label { display: flex; flex-direction: column; font-weight: 500; }
.cbk-stepper__label small { font-weight: 400; font-size: .8125rem; color: var(--cbk-soft); }
.cbk-stepper__ctrl { display: flex; align-items: center; gap: 4px; }
.cbk-stepper__ctrl button {
	width: 44px; height: 44px;
	border: 1px solid var(--cbk-ink);
	background: transparent;
	font-size: 1.25rem; line-height: 1;
	border-radius: 50%;
}
.cbk-stepper__ctrl button:hover:not(:disabled) { background: var(--cbk-ink); color: var(--cbk-bg); }
.cbk-stepper__ctrl button:disabled { border-color: var(--cbk-muted); color: var(--cbk-muted); }
.cbk-stepper__ctrl output { min-width: 32px; text-align: center; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

/* Fields */
.cbk-fields { display: grid; gap: 14px; }
.cbk-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cbk-field > span { font-size: .875rem; font-weight: 500; }
.cbk-field small { font-weight: 400; color: var(--cbk-soft); }
.cbk-field input, .cbk-field textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	font-size: 16px; /* prevents iOS zoom */
	background: #fff;
	border: 1px solid var(--cbk-line);
	border-radius: 0;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.cbk-field input:focus, .cbk-field textarea:focus { border-color: var(--cbk-ink); outline: none; box-shadow: inset 0 0 0 1px var(--cbk-ink); }
.cbk-field [aria-invalid="true"] { border-color: var(--cbk-danger); }
.cbk-hint { font-size: .8125rem; color: var(--cbk-soft); }
.cbk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.cbk-check { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 0; font-size: .9375rem; cursor: pointer; }
.cbk-check input {
	flex: none;
	width: 22px; height: 22px; margin: 1px 0 0;
	accent-color: var(--cbk-ink);
}
.cbk-check a { color: var(--cbk-primary); }
.cbk-captcha:not(:empty) { margin-top: 16px; }

.cbk-err { color: var(--cbk-danger); font-size: .875rem; font-style: normal; margin: 8px 0 0; }
.cbk-err:empty { display: none; }
.cbk-field .cbk-err { margin: 0; }

/* Summary + sticky submit (mobile) */
.cbk-side { padding-bottom: 16px; }
.cbk-summary { background: var(--cbk-surface); padding: 18px 18px 14px; margin-bottom: 12px; }
.cbk-sum__title { font-family: var(--cbk-font-display); font-weight: 400; font-size: 1.25rem; margin: 0 0 10px; }
.cbk-summary dl, .cbk-done__sum { margin: 0; }
.cbk-sum__row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--cbk-line); font-size: .9375rem; }
.cbk-sum__row dt { color: var(--cbk-soft); margin: 0; font-weight: 400; }
.cbk-sum__row dd { margin: 0; text-align: right; }
.cbk-sum__row dd::first-letter { text-transform: uppercase; }
.cbk-dash { color: var(--cbk-muted); }
.cbk-sum__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.cbk-sum__total strong { font-family: var(--cbk-font-display); font-weight: 400; font-size: 1.5rem; }

.cbk-submit {
	position: sticky; bottom: 0; z-index: 5;
	display: flex; align-items: center; gap: 12px;
	margin: 0 -16px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: var(--cbk-bg);
	border-top: 1px solid var(--cbk-line);
	box-shadow: 0 -6px 18px -12px rgba(3, 33, 39, .35);
}
.cbk-submit__line { flex: 1; min-width: 0; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbk-submit__line::first-letter { text-transform: uppercase; }
.cbk .cbk-btn {
	flex: none;
	min-height: 52px;
	padding: 0 28px;
	background: var(--cbk-primary);
	color: var(--cbk-bg);
	border: 0;
	border-radius: 0;
	font-family: var(--cbk-font-display);
	font-size: 1.125rem;
	letter-spacing: .01em;
	transition: background-color .15s;
}
.cbk .cbk-btn:hover:not(:disabled) { background: var(--cbk-ink); color: var(--cbk-bg); }
.cbk .cbk-btn.is-busy { opacity: .75; }
.cbk-notice { font-size: .875rem; color: var(--cbk-soft); margin: 12px 0 0; }
.cbk-formerr { color: var(--cbk-danger); margin: 8px 0 0; font-size: .9375rem; }
.cbk-formerr:empty { display: none; }

/* Done */
.cbk-done { text-align: center; padding: 32px 4px 48px; max-width: 520px; margin: 0 auto; outline: none; }
.cbk-done__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--cbk-primary); display: grid; place-items: center; }
.cbk-done__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--cbk-bg); stroke-width: 2; }
.cbk-done__title { justify-content: center; font-size: 1.75rem; }
.cbk-done__sum { text-align: left; background: var(--cbk-surface); padding: 12px 18px; margin: 20px 0; }
.cbk-done__help a { color: var(--cbk-primary); }

/* Layout follows the width of the form itself (container queries), so it works in narrow and wide themes. */
@container cbk (max-width: 279px) {
	.cbk-slots { grid-template-columns: 1fr; }
	.cbk .cbk-btn { padding: 0 18px; }
}

@container cbk (min-width: 560px) {
	.cbk-cal { padding: 16px 18px 18px; }
	.cbk-day { aspect-ratio: auto; height: 52px; }
	.cbk-slots { grid-template-columns: repeat(4, 1fr); }
	.cbk-fields { grid-template-columns: 1fr 1fr; }
	.cbk-field--wide { grid-column: 1 / -1; }
}

/* Two columns with the summary sticky on the right */
@container cbk (min-width: 820px) {
	.cbk-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
	.cbk-side { position: sticky; top: 32px; padding-bottom: 0; }
	.cbk-submit { position: static; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
	.cbk-submit__line { display: none; }
	.cbk .cbk-btn { width: 100%; }
	.cbk-h { font-size: 1.75rem; }
}

@media (min-width: 600px) {
	.cbk { padding: 32px 24px 0; }
	.cbk-submit { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 900px) {
	.cbk { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.cbk * { transition: none !important; animation: none !important; }
}

/* Customer manage page */
.cbk-manage { max-width: 560px; margin: 0 auto; padding: 32px 16px; font-family: var(--cbk-font-body); color: var(--cbk-ink); }
.cbk-manage h1 { font-family: var(--cbk-font-display); font-weight: 400; font-size: 1.75rem; margin: 0 0 12px; }
.cbk-manage .cbk-done__sum { background: var(--cbk-surface); }
.cbk-manage .cbk-btn { width: 100%; cursor: pointer; flex: none; min-height: 52px; background: var(--cbk-primary); color: var(--cbk-bg); border: 0; font-family: var(--cbk-font-display); font-size: 1.125rem; }
.cbk-manage .cbk-btn--ghost { background: transparent; color: var(--cbk-ink); border: 1px solid var(--cbk-ink); }
.cbk-manage .cbk-msg { padding: 12px 16px; background: var(--cbk-surface); border-left: 3px solid var(--cbk-primary); }
