/**
 * Schedule-board layout for the enrollment island ([class_reg_enroll view="board"]).
 *
 * Class names here MUST match those emitted by the board components in
 * enroll-island.js (crb-* prefix). Mobile-first: day columns stack on narrow
 * screens and form a week grid on wide ones; the cart is sticky so the running
 * total and checkout are always reachable.
 */

.crb {
	--crb-red: #d92222;
	--crb-red-ink: #f4f4f7;
	--crb-ink: #1a1a2e;
	--crb-muted: #5b5b74;
	--crb-line: #e3e3f5;
	--crb-line-soft: #f0f0f7;
	--crb-bg-soft: #f7f7fc;
	box-sizing: border-box;
	max-width: 1120px;
	margin: 0 auto;
	color: var(--crb-ink);
	line-height: 1.45;
}

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

/* ---- Filter bar ---------------------------------------------------------- */
.crb-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 28px;
	align-items: flex-start;
	padding: 16px;
	margin: 0 0 18px;
	background: #fff;
	border: 1px solid var(--crb-line);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.crb-filtergroup { display: flex; flex-direction: column; gap: 8px; }
.crb-filtergroup__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--crb-muted);
}
.crb-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; list-style: none; }
.crb-chip {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	padding: 8px 14px;
	min-height: 42px;
	border-radius: 40px;
	border: 1px solid var(--crb-line);
	background: #fff;
	color: var(--crb-ink);
	cursor: pointer;
}
.crb-chip:hover { border-color: var(--crb-red); }
.crb-chip.is-active { background: var(--crb-red); border-color: var(--crb-red); color: var(--crb-red-ink); }
.crb-chip:focus-visible { outline: 3px solid rgba(217, 34, 34, 0.4); outline-offset: 2px; }

/* ---- Week grid ----------------------------------------------------------- */
.crb-board { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0 0 24px; }
@media (min-width: 620px) { .crb-board { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .crb-board { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1180px) { .crb-board { grid-template-columns: repeat(7, 1fr); align-items: start; } }

.crb-day {
	background: var(--crb-bg-soft);
	border: 1px solid var(--crb-line);
	border-radius: 12px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
.crb-day__hd {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--crb-ink);
	padding: 2px 4px 8px;
	border-bottom: 1px solid var(--crb-line);
}
.crb-day__hd span { display: block; font-size: 11px; font-weight: 600; color: var(--crb-muted); }

/* ---- Session card -------------------------------------------------------- */
.crb-card {
	position: relative;
	text-align: left;
	width: 100%;
	appearance: none;
	font: inherit;
	background: #fff;
	border: 1px solid var(--crb-line);
	border-radius: 10px;
	padding: 11px 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.crb-card:hover { border-color: var(--crb-red); }
.crb-card:focus-visible { outline: 3px solid rgba(217, 34, 34, 0.4); outline-offset: 2px; }
.crb-card.is-selected { border-color: var(--crb-red); background: #fff5f5; box-shadow: inset 0 0 0 1px var(--crb-red); }
.crb-card.is-full { opacity: 0.62; cursor: default; }
.crb-card.is-full:hover { border-color: var(--crb-line); }

.crb-card__lvl { font-size: 14px; font-weight: 700; line-height: 1.25; }
.crb-card__time { font-size: 13px; color: var(--crb-ink); font-weight: 600; }
.crb-card__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1px; }
.crb-tag {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 4px 7px;
	border-radius: 20px;
	background: var(--crb-line-soft);
	color: var(--crb-muted);
	white-space: nowrap;
}
.crb-tag--full { background: #b3182c; color: #fff; }
.crb-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.crb-card__price { font-size: 15px; font-weight: 800; white-space: nowrap; }
.crb-card__pick {
	font-size: 12px;
	font-weight: 700;
	color: var(--crb-red);
}
.crb-card.is-selected .crb-card__pick { color: var(--crb-red); }
.crb-card__check {
	position: absolute;
	top: 9px;
	right: 9px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--crb-red);
	color: #fff;
	font-size: 13px;
	line-height: 20px;
	text-align: center;
	display: none;
}
.crb-card.is-selected .crb-card__check { display: block; }

/* ---- Sticky cart --------------------------------------------------------- */
.crb-cart {
	position: sticky;
	bottom: 0;
	z-index: 20;
	background: #fff;
	border: 1px solid var(--crb-line);
	border-radius: 12px 12px 0 0;
	box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.09);
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.crb-cart__sum { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
/* The summary doubles as the line-list disclosure toggle when items exist. */
.crb-cart__sum--btn { appearance: none; background: none; border: none; padding: 0; font: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.crb-cart__sum--btn:focus-visible { outline: 3px solid rgba(217, 34, 34, 0.4); outline-offset: 2px; }
.crb-cart__chev { font-size: 12px; color: var(--crb-muted); }
.crb-cart__count { font-size: 13px; color: var(--crb-muted); font-weight: 600; }
.crb-cart__total { font-size: 20px; font-weight: 800; }
.crb-cart__total small { font-size: 12px; font-weight: 600; color: var(--crb-muted); }
.crb-cart__btn {
	appearance: none;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	background: var(--crb-red);
	color: var(--crb-red-ink);
	border: none;
	border-radius: 40px;
	padding: 13px 26px;
	min-height: 48px;
	cursor: pointer;
	flex: 0 0 auto;
}
.crb-cart__btn:disabled { opacity: 0.5; cursor: not-allowed; }
.crb-cart__btn:focus-visible { outline: 3px solid rgba(217, 34, 34, 0.45); outline-offset: 2px; }

/* Cap the line list so a full cart (incl. its fixed chrome) stays under
   half the viewport on phones; the list scrolls instead. */
.crb-cart__lines { flex: 1 1 100%; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--crb-line-soft); list-style: none; display: grid; gap: 6px; max-height: 22vh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.crb-cart__line { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
/* Padding + negative margins keep the 18px glyph but give a 40px hit area
   (min-width because the glyph itself is only ~10px wide). */
.crb-cart__line .crb-cart__x { margin: -11px 0 -11px auto; background: none; border: none; color: var(--crb-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 11px; min-width: 40px; box-sizing: border-box; }
.crb-cart__adj { display: flex; justify-content: space-between; font-size: 13px; color: var(--crb-muted); }

.crb-empty { padding: 40px 16px; text-align: center; color: var(--crb-muted); font-size: 15px; }

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

/* Extended (3-hour) classes lock until the player has enough other classes. */
.crb-card.is-locked {
	opacity: 0.62;
	cursor: not-allowed;
}

.crb-card.is-locked:hover { border-color: var(--crb-line); }

.crb-tag--req {
	background: #fdf3e0;
	color: #8a6410;
}

.crb-cart__warn {
	color: #8a6410;
	flex: 1 1 100%;
}

.crb-cart__hint {
	flex: 1 1 100%;
}

/* Free-4th nudge: a subtle gold highlight (matches .crb-tag--req) so the
   promo line reads as good news, not another plain hint. */
.crb-cart__promo {
	background: #fdf3e0;
	color: #8a6410;
	font-weight: 600;
	padding: 7px 11px;
	border-radius: 8px;
}

/* Recovery actions under the submit error (sign in / reset password). */
.crb-cart__err-actions {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	gap: 8px;
}

.crb-cart__err-actions .crb-cart__err-btn {
	align-items: center;
	border: 1.5px solid var(--crb-red);
	border-radius: 999px;
	box-sizing: border-box;
	color: var(--crb-red);
	display: flex;
	flex: 1 1 45%;
	font-weight: 600;
	justify-content: center;
	min-height: 44px;
	padding: 8px 14px;
	text-align: center;
	text-decoration: none;
}

.crb-cart__err-actions .crb-cart__err-btn--primary {
	background: var(--crb-red);
	color: #fff;
}

.crb-cart__err-actions .crb-cart__err-btn:focus-visible { outline: 3px solid rgba(217, 34, 34, 0.45); outline-offset: 2px; }
