/*
 * Milcom Course Sessions — date picker and booking summaries.
 *
 * Colours are taken from the Milcom palette so the picker sits inside the
 * existing side card without a second visual language. Everything degrades to
 * a readable list if the theme stylesheet is missing.
 */

.mlcs-picker {
	--mlcs-line: #dde5f0;
	--mlcs-blue: #0c4fb3;
	--mlcs-navy: #0f1b2d;
	--mlcs-muted: #64748b;
	--mlcs-soft: #f4f7fc;
	margin: 0 0 18px;
}

.mlcs-picker-title {
	margin: 0 0 12px;
	font-size: 1.02rem;
	color: var(--mlcs-navy);
}

.mlcs-lead {
	margin: 0 0 14px;
	color: #33425a;
}

.mlcs-tier {
	border: 1px solid var(--mlcs-line);
	border-radius: 10px;
	padding: 14px;
	margin: 0 0 14px;
	background: #fff;
}

.mlcs-tier-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 10px;
	font-weight: 700;
	color: var(--mlcs-navy);
}

.mlcs-tier-price {
	color: var(--mlcs-blue);
	white-space: nowrap;
}

.mlcs-dates-list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.mlcs-date {
	border: 1px solid var(--mlcs-line);
	border-radius: 8px;
	margin: 0 0 8px;
	background: #fff;
	transition: border-color .12s ease, background-color .12s ease;
}

.mlcs-date:last-child {
	margin-bottom: 0;
}

.mlcs-date > label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	cursor: pointer;
	margin: 0;
}

.mlcs-date input[type="radio"] {
	margin: 3px 0 0;
	flex: 0 0 auto;
}

.mlcs-date-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.mlcs-date-main {
	font-weight: 700;
	color: var(--mlcs-navy);
}

.mlcs-date-time,
.mlcs-date-note {
	font-size: .82rem;
	color: var(--mlcs-muted);
}

.mlcs-date-status {
	flex: 0 0 auto;
	text-align: right;
	font-size: .78rem;
}

.mlcs-seats {
	color: #1d7a4c;
}

.mlcs-flag {
	color: #9a3412;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-weight: 700;
}

.mlcs-date.is-selected {
	border-color: var(--mlcs-blue);
	background: var(--mlcs-soft);
}

.mlcs-date.is-unavailable {
	background: #fbfcfe;
	opacity: .72;
}

.mlcs-date.is-unavailable > label {
	cursor: not-allowed;
}

.mlcs-waitlist {
	display: inline-block;
	margin: 0 12px 10px;
	font-size: .8rem;
}

.mlcs-submit[disabled] {
	opacity: .55;
	cursor: not-allowed;
}

.mlcs-empty {
	color: var(--mlcs-muted, #64748b);
	font-size: .88rem;
}

/* Booked-date summaries: thank-you page, account dashboard. */

.mlcs-booked {
	margin: 0 0 28px;
}

.mlcs-booking-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mlcs-booking {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	border: 1px solid #dde5f0;
	border-left: 4px solid #0c4fb3;
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0 0 10px;
	background: #fff;
}

.mlcs-booking-course {
	font-weight: 700;
	flex: 1 1 100%;
}

.mlcs-booking-date {
	color: #0f1b2d;
}

.mlcs-booking-note {
	color: #64748b;
	font-size: .85rem;
}

.mlcs-booking-ics {
	margin-left: auto;
	font-size: .82rem;
}

/* The read-only schedule table reuses the theme's .sched-tbl styling. */

.mlcs-dates tr.is-unavailable {
	opacity: .6;
}

@media (max-width: 640px) {
	.mlcs-date > label {
		flex-wrap: wrap;
	}

	.mlcs-date-status {
		flex: 1 1 100%;
		text-align: left;
	}
}

/* A refused booking comes back to the course page with the reason, printed
   inside the picker. The Elementor page has no WooCommerce stylesheet, so the
   notice is dressed here. */

.mlcs-picker .woocommerce-notices-wrapper:empty {
	display: none;
}

.mlcs-picker .woocommerce-error,
.mlcs-picker .woocommerce-message,
.mlcs-picker .woocommerce-info {
	list-style: none;
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: .92rem;
	line-height: 1.45;
}

.mlcs-picker .woocommerce-error {
	background: #fff5f5;
	border: 1px solid #f3c2c2;
	color: #7a1f1f;
}

.mlcs-picker .woocommerce-message,
.mlcs-picker .woocommerce-info {
	background: #eaf2fc;
	border: 1px solid #cfe0f7;
	color: #0f1b2d;
}

.mlcs-picker .woocommerce-error li,
.mlcs-picker .woocommerce-message li {
	margin: 0;
	padding: 0;
}

/* ---------- picker v2: month groups, urgency, selection summary ---------- */

.mlcs-tier-sub {
	margin: -6px 0 12px;
	font-size: .82rem;
	color: var(--mlcs-muted);
}

.mlcs-month {
	list-style: none;
	margin: 10px 0 6px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #0a3f92;
}

.mlcs-month:first-child {
	margin-top: 0;
}

.mlcs-date > label {
	align-items: center;
}

.mlcs-date input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid #b9c7da;
	border-radius: 50%;
	margin: 0;
	position: relative;
	transition: border-color .12s ease;
}

.mlcs-date input[type="radio"]:checked {
	border-color: var(--mlcs-blue);
}

.mlcs-date input[type="radio"]:checked::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--mlcs-blue);
}

.mlcs-date input[type="radio"]:focus-visible {
	outline: 3px solid rgba(12, 79, 179, .25);
	outline-offset: 2px;
}

.mlcs-date:hover:not(.is-unavailable) {
	border-color: #9fb8de;
}

.mlcs-date.is-selected {
	box-shadow: 0 0 0 3px rgba(12, 79, 179, .12);
}

.mlcs-date-status {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
}

.mlcs-seats {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e7f7f3;
	color: #0c7a6b;
	font-weight: 600;
	font-size: .74rem;
	white-space: nowrap;
}

.mlcs-seats.is-urgent {
	background: #fff3d6;
	color: #7a4b00;
}

.mlcs-countdown {
	font-size: .74rem;
	color: var(--mlcs-muted);
	white-space: nowrap;
}

.mlcs-selection {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	align-items: baseline;
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #eaf2fc;
	border: 1px solid #cfe0f7;
	font-size: .88rem;
	color: #0f1b2d;
}

.mlcs-selection-label {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #0a3f92;
}

.mlcs-selection-text {
	font-weight: 600;
}

.mlcs-reassure {
	margin: 8px 0 0;
	font-size: .78rem;
	color: var(--mlcs-muted);
	text-align: center;
}

.mlcs-submit.is-busy {
	opacity: .8;
	cursor: progress;
}

/* Mobile sticky bar: price and a jump to the dates, only while the picker is
   off screen. */
.mlcs-sticky {
	display: none;
}

@media (max-width: 900px) {
	.mlcs-sticky {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 50;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid #dde5f0;
		box-shadow: 0 -6px 22px rgba(11, 31, 64, .12);
		transform: translateY(110%);
		transition: transform .2s ease;
	}

	.mlcs-sticky.is-visible {
		transform: none;
	}

	.mlcs-sticky-price {
		font-size: .9rem;
		color: #33425a;
	}

	.mlcs-sticky-price b {
		color: #0f1b2d;
		font-size: 1.05rem;
	}
}

.mlcs-selection[hidden] {
	display: none;
}
