/* CHEK Schedule - front end
   Self-contained and fully namespaced. Shares no class names with the retired
   sheet widget, so both can sit on the same page without interfering. */

.chek-sched {
	--cs-blue: #3db5e6;
	--cs-blue-dark: #2a9bc5;
	--cs-ink: #1d1d1b;
	--cs-muted: #555;
	--cs-line: #e4e6e8;
	--cs-stone: #f5f4f0;
	--cs-head: #f3f4f5;
	--cs-green: #1d7a3e;
	--cs-amber: #f6a800;
	--cs-red: #b32d2e;

	font-family: soleil, "Mulish", "Helvetica Neue", Arial, sans-serif;
	color: var(--cs-ink);
	line-height: 1.6;
	font-weight: 300;
}

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

.chek-sched__heading {
	font-weight: 700;
	margin: 0 0 18px;
}

.chek-sched__empty {
	padding: 28px 20px;
	background: var(--cs-stone);
	border-radius: 10px;
	text-align: center;
	color: var(--cs-muted);
	margin: 0;
}

/* ---------------------------------------------------------------- tabs
   One tab per list, sharing the full width. Each carries its own brand
   colour through --chek-tab-colour, set inline from the list settings. */

.chek-sched__tabs {
	display: flex;
	width: 100%;
	gap: 4px;
	margin: 0 0 26px;
	align-items: flex-end;
}

.chek-sched__tab {
	flex: 1 1 0;
	min-width: 0;
	font-family: inherit;
	font-size: clamp(13px, 1.5vw, 19px);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	background: var(--chek-tab-colour, #3db5e6);
	border: none;
	border-radius: 8px 8px 0 0;
	padding: 20px 12px;
	cursor: pointer;
	opacity: .78;
	transition: opacity .18s ease, padding .18s ease;
}

.chek-sched__tab:hover {
	opacity: .92;
}

.chek-sched__tab.is-active {
	opacity: 1;
	padding-top: 28px;
}

.chek-sched__tab:focus-visible {
	outline: 3px solid var(--cs-ink);
	outline-offset: 2px;
}

/* ------------------------------------------------------------- pills */

.chek-sched__pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 30px;
}

.chek-sched__pill {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--cs-ink);
	background: #eef0f2;
	border: none;
	border-radius: 40px;
	padding: 9px 12px 9px 20px;
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}

.chek-sched__pill[hidden] {
	display: none;
}

.chek-sched__pill:hover {
	background: #e2e5e8;
}

.chek-sched__pill.is-active {
	background: var(--cs-blue);
	color: #fff;
}

.chek-sched__pill:focus-visible {
	outline: 3px solid var(--cs-blue-dark);
	outline-offset: 2px;
}

.chek-sched__pill-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	border-radius: 20px;
	background: #fff;
	color: var(--cs-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.chek-sched__pill.is-active .chek-sched__pill-count {
	background: #fff;
	color: var(--cs-blue-dark);
}

/* ------------------------------------------------------- course groups */

.chek-sched__panel[hidden] {
	display: none;
}

.chek-sched__group {
	margin-bottom: 34px;
}

.chek-sched__group[hidden] {
	display: none;
}

.chek-sched__group-head {
	font-size: clamp(19px, 2.2vw, 24px);
	font-weight: 700;
	margin: 0 0 14px;
}

/* The table sits in a defined card, which is what gives the rows their
   edges. Without it the rows read as floating text. */
.chek-sched__card-wrap {
	background: #fff;
	border: 1px solid var(--cs-line);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.chek-sched__table {
	width: 100%;
	border-collapse: collapse;
}

.chek-sched__table th {
	font-size: 13px;
	font-weight: 700;
	text-align: left;
	color: var(--cs-ink);
	background: var(--cs-head);
	padding: 15px 20px;
	border-bottom: 1px solid var(--cs-line);
	white-space: nowrap;
}

.chek-sched__table td {
	padding: 18px 20px;
	vertical-align: middle;
	font-size: 15px;
	border-bottom: 1px solid var(--cs-line);
}

/* A class followed by its availability bar should read as one block, so the
   line between them is suppressed. */
.chek-sched__row.has-bar > td {
	border-bottom: 0;
	padding-bottom: 10px;
}

.chek-sched__table tr:last-child > td {
	border-bottom: 0;
}

.chek-sched__row[hidden],
.chek-sched__availrow[hidden] {
	display: none;
}

.chek-sched__row.is-soldout {
	color: var(--cs-muted);
}

.chek-sched__loc {
	font-weight: 600;
}

.chek-sched__dates {
	font-weight: 600;
	white-space: nowrap;
}

/* Prices are free text and can carry two currencies at once, so they are
   never reformatted. */
.chek-sched__price {
	font-weight: 600;
}

.chek-sched__price2 {
	color: var(--cs-muted);
	font-size: 14px;
}

.chek-sched__cta-head,
.chek-sched__cta {
	text-align: right;
	width: 1%;
	white-space: nowrap;
}

/* ----------------------------------------------------------- buttons */

.chek-sched__btn {
	display: inline-block;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	padding: 13px 26px;
	border-radius: 6px;
	border: 2px solid var(--cs-blue);
	background: var(--cs-blue);
	color: #fff;
	transition: background .18s, border-color .18s;
	white-space: nowrap;
}

.chek-sched__btn:hover,
.chek-sched__btn:focus {
	background: var(--cs-blue-dark);
	border-color: var(--cs-blue-dark);
	color: #fff;
}

.chek-sched__soldout {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 9px 18px;
	border-radius: 6px;
	background: var(--cs-red);
	color: #fff;
	white-space: nowrap;
}

/* ------------------------------------------------------ availability */

.chek-sched__availrow > td {
	padding-top: 0;
	padding-bottom: 20px;
}

.chek-sched__avail-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--cs-muted);
	margin-bottom: 6px;
}

.chek-sched__track {
	height: 9px;
	border-radius: 20px;
	background: #e9ecee;
	overflow: hidden;
}

.chek-sched__fill {
	height: 100%;
	border-radius: 20px;
	background: var(--cs-green);
	transition: width .8s cubic-bezier(.4, 0, .2, 1);
}

.chek-sched__fill.is-amber { background: var(--cs-amber); }
.chek-sched__fill.is-red   { background: var(--cs-red); }

.chek-sched__avail-label {
	font-size: 12.5px;
	color: var(--cs-muted);
	margin-top: 6px;
}

/* ------------------------------------------------- information panels */

.chek-sched__notes {
	margin: 34px 0 0;
}

.chek-sched__notes-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.chek-sched__notes-tab {
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--cs-muted);
	background: #eef0f2;
	border: none;
	border-radius: 8px 8px 0 0;
	padding: 13px 22px;
	cursor: pointer;
	transition: background .18s, color .18s;
}

.chek-sched__notes-tab:hover {
	color: var(--cs-ink);
}

.chek-sched__notes-tab.is-active {
	background: var(--cs-stone);
	color: var(--cs-ink);
}

.chek-sched__notes-panel {
	background: var(--cs-stone);
	border-radius: 0 10px 10px 10px;
	padding: 24px 26px;
}

.chek-sched__notes-panel[hidden] {
	display: none;
}

.chek-sched__notes-panel p {
	margin: 0;
	font-size: 14px;
	line-height: 1.75;
	color: var(--cs-muted);
}

.chek-sched__notes-panel strong {
	color: var(--cs-ink);
	font-weight: 700;
}

/* ------------------------------------------------------ mobile cards */

.chek-sched__cards {
	display: none;
}

.chek-sched__mcard {
	padding: 20px;
	border-bottom: 1px solid var(--cs-line);
}

.chek-sched__mcard:last-child {
	border-bottom: 0;
}

.chek-sched__mcard[hidden] {
	display: none;
}

.chek-sched__mcard.is-soldout {
	color: var(--cs-muted);
}

.chek-sched__mcard-head {
	padding-bottom: 12px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--cs-line);
}

.chek-sched__mcard-head strong {
	display: block;
	font-size: 17px;
	font-weight: 700;
}

.chek-sched__mcard-date {
	display: block;
	font-size: 13.5px;
	color: var(--cs-muted);
	margin-top: 2px;
}

.chek-sched__mcard-row {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 5px 0;
	font-size: 14px;
}

.chek-sched__mcard-row span {
	color: var(--cs-muted);
}

.chek-sched__mcard .chek-sched__btn {
	display: block;
	width: 100%;
	margin-top: 14px;
}

.chek-sched__mcard .chek-sched__avail {
	margin-top: 14px;
}

@media (max-width: 900px) {
	.chek-sched__table {
		display: none;
	}

	.chek-sched__cards {
		display: block;
	}
}

@media (max-width: 600px) {
	.chek-sched__tabs {
		gap: 2px;
	}

	.chek-sched__tab {
		padding: 14px 6px;
		letter-spacing: 0;
	}

	.chek-sched__tab.is-active {
		padding-top: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chek-sched *,
	.chek-sched *::before,
	.chek-sched *::after {
		transition: none !important;
		animation: none !important;
	}
}

/* ----------------------------------------------------- view switch */

.chek-sched__viewswitch {
	display: inline-flex;
	gap: 3px;
	margin: 0 0 22px;
	padding: 3px;
	background: #eef0f2;
	border-radius: 8px;
}

.chek-sched__viewbtn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--cs-muted);
	background: transparent;
	border: none;
	border-radius: 6px;
	padding: 9px 22px;
	cursor: pointer;
	transition: background .18s, color .18s;
}

.chek-sched__viewbtn:hover {
	color: var(--cs-ink);
}

.chek-sched__viewbtn.is-active {
	background: #fff;
	color: var(--cs-ink);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.chek-sched__viewpane.is-hidden {
	display: none;
}

/* -------------------------------------------------------- calendar */

.chek-sched__cal {
	margin: 0 0 10px;
}

.chek-sched__cal-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-bottom: 16px;
}

.chek-sched__cal-heading {
	font-size: clamp(18px, 2.2vw, 22px);
	font-weight: 700;
	min-width: 12ch;
	text-align: center;
}

.chek-sched__cal-nav {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid var(--cs-line);
	background: #fff;
	color: var(--cs-ink);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: border-color .18s, background .18s, color .18s;
}

.chek-sched__cal-nav:hover:not(:disabled) {
	border-color: var(--cs-blue);
	background: var(--cs-blue);
	color: #fff;
}

.chek-sched__cal-nav:disabled {
	opacity: .35;
	cursor: default;
}

.chek-sched__cal-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 20px;
	margin-bottom: 18px;
}

.chek-sched__cal-key {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cs-muted);
}

.chek-sched__cal-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex: none;
}

.chek-sched__cal-month[hidden] {
	display: none;
}

.chek-sched__cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	background: var(--cs-line);
	border: 1px solid var(--cs-line);
	border-radius: 10px;
	overflow: hidden;
}

.chek-sched__cal-dow {
	background: var(--cs-head);
	padding: 10px 8px;
	text-align: center;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cs-muted);
}

.chek-sched__cal-cell {
	background: #fff;
	min-height: 96px;
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.chek-sched__cal-cell.is-empty {
	background: #fafbfc;
}

.chek-sched__cal-num {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--cs-muted);
}

/* Today's cell: a soft tint plus a marked number, so it reads at a glance. */
.chek-sched__cal-cell.is-today {
	background: #eaf7fd;
	box-shadow: inset 0 0 0 2px var(--cs-blue);
}

.chek-sched__cal-today {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--cs-blue);
	padding: 1px 6px;
	border-radius: 20px;
}

.chek-sched__cal-event {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	background: var(--chek-event-colour, #3db5e6);
	border-left: 3px solid rgba(0, 0, 0, .18);
	border-radius: 4px;
	padding: 4px 6px;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
}

a.chek-sched__cal-event:hover {
	filter: brightness(.92);
}

/* A continuation day of a multi-day class: a slim connector, no label. */
.chek-sched__cal-event.is-cont {
	min-height: 8px;
	padding: 3px 6px;
	opacity: .55;
	border-radius: 0;
}

.chek-sched__cal-event.is-soldout {
	opacity: .6;
	text-decoration: line-through;
}

@media (max-width: 780px) {
	.chek-sched__cal-cell {
		min-height: 64px;
		padding: 3px;
	}

	.chek-sched__cal-dow {
		padding: 7px 2px;
		font-size: 10px;
	}

	.chek-sched__cal-event {
		font-size: 0;
		padding: 4px;
		border-left-width: 0;
	}

	.chek-sched__cal-event.is-cont {
		padding: 3px;
	}

	.chek-sched__cal-today {
		font-size: 0;
		padding: 5px;
		border-radius: 50%;
	}
}
