/* Lotsman calendar — reference-style grid (admin / site / print) */

.com-lotsman-schedule {
	--lotsman-cal-ink: #2a3340;
	--lotsman-cal-muted: #7a8694;
	--lotsman-cal-line: #e6ebf0;
	--lotsman-cal-soft: #f7f9fb;
	--lotsman-cal-head: #ffffff;
	--lotsman-cal-today: #3d7ea6;
	--lotsman-cal-add: #c5ced6;
}

.com-lotsman-schedule .lotsman-schedule-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.85rem;
}

.com-lotsman-schedule .lotsman-cal-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.75rem 1.25rem;
	margin-bottom: 0.75rem;
}

.com-lotsman-schedule .lotsman-cal-bar__title {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
	/* Keep week/month titles from shifting the nav cluster */
	min-width: 22rem;
	color: var(--lotsman-cal-ink);
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.com-lotsman-schedule .lotsman-cal-bar__title .icon-calendar {
	color: var(--lotsman-cal-muted);
	font-size: 1.1rem;
}

.com-lotsman-schedule .lotsman-cal-bar__nav {
	display: inline-flex !important;
	flex-wrap: nowrap !important;
	align-items: center;
	gap: 0.3rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	width: auto;
	max-width: 100%;
}

.com-lotsman-schedule .lotsman-cal-bar__nav .btn {
	flex: 0 0 auto;
	padding: 0.2rem 0.55rem;
	border-radius: 0.4rem;
	line-height: 1.35;
	white-space: nowrap;
}

.com-lotsman-schedule .lotsman-cal-bar__nav .form-select,
.com-lotsman-schedule .lotsman-cal-bar__nav select.form-select {
	display: inline-block;
	width: auto !important;
	min-width: 4.75rem;
	max-width: none;
	flex: 0 0 auto;
	padding: 0.25rem 2.1rem 0.25rem 0.55rem !important;
	font-size: 0.8125rem;
	line-height: 1.35;
	border-radius: 0.4rem;
	background-color: #fff !important;
	background-position: right 0.45rem center !important;
	background-size: 0.65rem 0.4rem !important;
	background-repeat: no-repeat !important;
}

.com-lotsman-schedule .lotsman-cal-bar__nav .lotsman-cal-day {
	min-width: 3.5rem;
}

.com-lotsman-schedule .lotsman-cal-bar__nav .lotsman-cal-month {
	min-width: 5rem;
}

.com-lotsman-schedule .lotsman-cal-bar__nav .lotsman-cal-year {
	min-width: 5.25rem;
}

/* Fixed legend on the right — shrink-wrap, never full page width */
.com-lotsman-schedule .lotsman-cal-legend-block {
	display: block;
	flex: 0 1 auto;
	width: max-content;
	max-width: 100%;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
}

.com-lotsman-schedule .lotsman-cal-legend-grid {
	display: grid;
	grid-template-columns: auto repeat(var(--lotsman-legend-cols, 4), max-content);
	column-gap: 0.85rem;
	row-gap: 0.3rem;
	align-items: center;
}

.com-lotsman-schedule .lotsman-cal-legend-show-label {
	color: var(--lotsman-cal-ink);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0;
	white-space: nowrap;
	width: 5.75rem;
	line-height: 1.5;
}

.com-lotsman-schedule .lotsman-cal-legend-corner {
	display: block;
	width: 5.75rem;
}

.com-lotsman-schedule .lotsman-cal-legend-col {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 1.25rem;
	color: var(--lotsman-cal-ink);
	font-size: 0.8125rem;
	font-weight: 500;
	white-space: nowrap;
}

.com-lotsman-schedule .lotsman-cal-legend-col--check {
	justify-content: center;
	margin: 0;
	cursor: pointer;
}

.com-lotsman-schedule .lotsman-cal-legend__label {
	line-height: 1.2;
}

.com-lotsman-schedule .lotsman-cal-legend__swatch {
	display: inline-block;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 0.25rem;
	flex: 0 0 auto;
	border: 2px solid #8b97a4;
	box-sizing: border-box;
	background: #eef1f4;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

/* Same pastel fills as calendar; darker accent outline for readability */
.com-lotsman-schedule .lotsman-cal-legend__swatch--c0 { background: #e8f1fb !important; border-color: #5b8def !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--c1 { background: #e8f6ee !important; border-color: #3daa6d !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--c2 { background: #fdf0e6 !important; border-color: #e89a4a !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--c3 { background: #f1eef8 !important; border-color: #8b6bb5 !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--c4 { background: #e9f5f6 !important; border-color: #4a9ba8 !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--c5 { background: #f7eef2 !important; border-color: #c46b8a !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--other { background: #eef1f4 !important; border-color: #8b97a4 !important; }
.com-lotsman-schedule .lotsman-cal-legend__swatch--sdo { background: #f6f0d6 !important; border-color: #9a7b0c !important; }

.com-lotsman-schedule .lotsman-schedule-filters {
	display: block;
	width: auto;
	max-width: 100%;
	margin: 0 0 0.85rem;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.com-lotsman-schedule .lotsman-schedule-filters__row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.65rem 0.85rem;
	min-height: 2rem;
}

.com-lotsman-schedule .lotsman-schedule-filters__label {
	display: inline-flex;
	align-items: center;
	height: 2rem;
	margin: 0;
	padding: 0;
	min-width: 7.5rem;
	color: var(--lotsman-cal-ink);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

.com-lotsman-schedule .lotsman-schedule-filters__regular {
	display: inline-flex;
	align-items: center;
	height: 2rem;
	margin: 0;
	padding: 0 !important;
	gap: 0.45rem;
	cursor: pointer;
	color: var(--lotsman-cal-ink);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

.com-lotsman-schedule .lotsman-schedule-filters__regular .form-check-input {
	width: 2em;
	height: 1em;
	margin: 0 !important;
	padding: 0;
	float: none !important;
	position: static !important;
	flex: 0 0 auto;
	cursor: pointer;
}

/* Directions dropdown: single white field, no outer well */
.com-lotsman-schedule details.lotsman-dir-dd {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	vertical-align: middle;
}

.com-lotsman-schedule .lotsman-dir-dd__summary {
	list-style: none;
	cursor: pointer;
	user-select: none;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	height: 2rem;
	min-width: 12rem;
	max-width: 14rem;
	margin: 0;
	padding: 0 1.7rem 0 0.6rem;
	border: 1px solid var(--lotsman-cal-line);
	border-radius: 0.375rem;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M4.5 6.5L8 10l3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.45rem center;
	background-size: 0.7rem;
	font-size: 0.875rem;
	line-height: 1;
	color: var(--lotsman-cal-ink);
	box-shadow: none;
}

.com-lotsman-schedule .lotsman-dir-dd__summary::-webkit-details-marker {
	display: none;
}

.com-lotsman-schedule .lotsman-dir-dd__text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.com-lotsman-schedule .lotsman-dir-dd__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 0.25rem);
	left: 0;
	min-width: 16rem;
	max-width: min(22rem, 90vw);
	max-height: 16rem;
	overflow: auto;
	padding: 0.5rem 0.55rem;
	border: 1px solid var(--lotsman-cal-line);
	border-radius: 0.45rem;
	background: #fff;
	box-shadow: 0 0.35rem 1rem rgba(42, 51, 64, 0.12);
}

.com-lotsman-schedule .lotsman-dir-dd__item {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	line-height: 1.3;
	cursor: pointer;
}

.com-lotsman-schedule .lotsman-dir-dd__item .form-check-input {
	margin-top: 0.12rem;
	flex: 0 0 auto;
}

.com-lotsman-schedule .lotsman-dir-dd__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.4rem;
	margin-top: 0.45rem;
}

.com-lotsman-schedule .lotsman-dir-dd__actions .btn {
	width: 100%;
}

.lotsman-cal {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	border: 1px solid var(--lotsman-cal-line);
	border-radius: 0.65rem;
	overflow: hidden;
	background: #fff;
	color: var(--lotsman-cal-ink);
}

.lotsman-cal.table {
	--bs-table-bg: transparent;
	--bs-table-striped-bg: transparent;
	margin-bottom: 0;
}

.lotsman-cal th,
.lotsman-cal td {
	border-right: 1px solid var(--lotsman-cal-line) !important;
	border-bottom: 1px solid var(--lotsman-cal-line) !important;
	border-top: 0 !important;
	border-left: 0 !important;
}

.lotsman-cal th:last-child,
.lotsman-cal td:last-child {
	border-right: 0 !important;
}

.lotsman-cal tr:last-child td {
	border-bottom: 0 !important;
}

.lotsman-cal__head {
	background: var(--lotsman-cal-head) !important;
	color: var(--lotsman-cal-ink);
	text-align: center;
	vertical-align: middle;
	padding: 0.65rem 0.35rem !important;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	width: 14.28%;
}

.lotsman-cal__head-date {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.7rem;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--lotsman-cal-muted);
}

.lotsman-cal__cell {
	position: relative;
	vertical-align: top !important;
	padding: 1.55rem 0.35rem 0.4rem !important;
	min-height: 7.25rem;
	background: #fff !important;
}

.lotsman-cal--week .lotsman-cal__cell {
	min-height: 11.5rem;
}

.lotsman-cal__cell--muted {
	background: #fafbfc !important;
}

.lotsman-cal__cell--muted .lotsman-cal__daynum {
	color: #b0bac3;
	font-weight: 500;
}

.lotsman-cal__cell--today {
	background: #f3f9fc !important;
}

.lotsman-cal__daynum {
	position: absolute;
	top: 0.35rem;
	left: 0.4rem;
	z-index: 1;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1;
	color: var(--lotsman-cal-ink);
}

.lotsman-cal__cell--today .lotsman-cal__daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	height: 1.4rem;
	padding: 0 0.2rem;
	border-radius: 999px;
	background: var(--lotsman-cal-today);
	color: #fff;
}

.lotsman-cal-add {
	position: absolute;
	top: 0.28rem;
	right: 0.3rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.05rem;
	height: 1.05rem;
	padding: 0;
	border: 0;
	border-radius: 0.2rem;
	background: transparent;
	color: var(--lotsman-cal-add) !important;
	text-decoration: none;
	line-height: 1;
	font-size: 0.7rem;
	opacity: 0.85;
}

.lotsman-cal-add:hover,
.lotsman-cal-add:focus {
	background: #eef2f5;
	color: #6a7682 !important;
	opacity: 1;
}

.lotsman-cal-add .icon-plus,
.lotsman-cal-add .icon-plus::before {
	color: inherit !important;
}

.lotsman-cal__events {
	display: flex;
	flex-direction: column;
	gap: 0.22rem;
}

.lotsman-cal__event-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 0;
	min-width: 0;
}

.lotsman-cal__event-wrap--dnd {
	cursor: grab;
}

.lotsman-cal__event-wrap--dnd.is-dragging,
.lotsman-timetable__event--dnd.is-dragging {
	opacity: 0.45;
	cursor: grabbing;
}

.lotsman-cal__cell--drop-target {
	outline: 2px solid #0d6efd;
	outline-offset: -2px;
	background: rgba(13, 110, 253, 0.08);
}

.lotsman-timetable__event--dnd {
	cursor: pointer;
}

.lotsman-timetable__event--dnd .lotsman-week-pill__title {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.lotsman-timetable__event--dnd .lotsman-week-pill__title:hover,
.lotsman-timetable__event--dnd .lotsman-week-pill__title:focus {
	color: inherit;
	text-decoration: underline;
}

.lotsman-timetable__event--dnd.is-resizing {
	cursor: ns-resize;
	z-index: 5;
	opacity: 0.95;
}

.lotsman-timetable__resize {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 0.55rem;
	cursor: ns-resize;
	z-index: 2;
	border-radius: 0 0 0.3rem 0.3rem;
}

.lotsman-timetable__resize::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0.12rem;
	width: 1.1rem;
	height: 0.18rem;
	margin-left: -0.55rem;
	border-radius: 999px;
	background: rgba(13, 110, 253, 0.55);
	opacity: 0;
	transition: opacity 0.12s ease;
}

.lotsman-timetable__event--dnd:hover .lotsman-timetable__resize::after,
.lotsman-timetable__event--dnd.is-resizing .lotsman-timetable__resize::after {
	opacity: 1;
}

body.lotsman-cal-resizing {
	cursor: ns-resize !important;
	user-select: none;
}

.lotsman-timetable__col--drop-target {
	background: rgba(13, 110, 253, 0.08);
	box-shadow: inset 0 0 0 2px #0d6efd;
}

.lotsman-timetable__create-ghost {
	position: absolute;
	left: 2px;
	right: 2px;
	z-index: 3;
	pointer-events: none;
	border-radius: 0.35rem;
	background: rgba(13, 110, 253, 0.22);
	border: 1px dashed #0d6efd;
}

.lotsman-timetable__move-ghost {
	position: absolute;
	left: 2px;
	right: 2px;
	z-index: 4;
	pointer-events: none;
	border-radius: 0.35rem;
	background: rgba(13, 110, 253, 0.28);
	border: 2px solid #0d6efd;
	box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.lotsman-timetable__move-ghost-time {
	display: block;
	padding: 0.15rem 0.35rem;
	color: #0b5ed7;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.2;
}

body.lotsman-cal-creating {
	cursor: row-resize;
	user-select: none;
}

.lotsman-cal__event-wrap .lotsman-cal__event {
	flex: 1 1 auto;
	min-width: 0;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.lotsman-cal__actions {
	position: relative;
	flex: 0 0 auto;
	margin: 0;
}

.lotsman-cal__actions-toggle {
	list-style: none;
	cursor: pointer;
	user-select: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.15rem;
	height: 100%;
	min-height: 1.4rem;
	padding: 0;
	border: 1px solid var(--lotsman-cal-line);
	border-left: 0;
	border-radius: 0 0.4rem 0.4rem 0;
	background: #fff;
	color: var(--lotsman-cal-muted);
	font-size: 0.85rem;
	line-height: 1;
}

.lotsman-cal__actions-toggle::-webkit-details-marker {
	display: none;
}

.lotsman-cal__actions-toggle:hover {
	color: var(--lotsman-cal-ink);
	background: var(--lotsman-cal-soft);
}

.lotsman-cal__actions-menu {
	position: absolute;
	z-index: 40;
	top: calc(100% + 0.15rem);
	right: 0;
	min-width: 8.5rem;
	padding: 0.25rem;
	border: 1px solid var(--lotsman-cal-line);
	border-radius: 0.4rem;
	background: #fff;
	box-shadow: 0 0.3rem 0.85rem rgba(42, 51, 64, 0.14);
}

/* Escapes table overflow:hidden / .table-responsive clipping */
.lotsman-cal__actions-menu.is-fixed {
	position: fixed;
	top: auto;
	right: auto;
	left: 0;
	bottom: auto;
	z-index: 1055;
}

.lotsman-cal__actions-item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.3rem 0.5rem;
	border: 0;
	border-radius: 0.25rem;
	background: transparent;
	color: var(--lotsman-cal-ink);
	font-size: 0.75rem;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.lotsman-cal__actions-item:hover,
.lotsman-cal__actions-item:focus {
	background: var(--lotsman-cal-soft);
	color: var(--lotsman-cal-ink);
	text-decoration: none;
}

.lotsman-cal__actions-item--danger {
	color: #a33b3b;
}

.lotsman-cal-move {
	border: 1px solid var(--lotsman-cal-line);
	border-radius: 0.55rem;
	padding: 0;
	max-width: 22rem;
	width: calc(100% - 2rem);
	box-shadow: 0 0.5rem 1.5rem rgba(42, 51, 64, 0.18);
}

.lotsman-cal-move::backdrop {
	background: rgba(42, 51, 64, 0.28);
}

.lotsman-cal-move__form {
	padding: 0.9rem 1rem 1rem;
}

.lotsman-cal-move__title {
	margin: 0 0 0.25rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--lotsman-cal-ink);
}

.lotsman-cal-move__event {
	margin: 0 0 0.75rem;
	color: var(--lotsman-cal-muted);
	font-size: 0.875rem;
}

.lotsman-cal-move__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem 0.65rem;
	margin-bottom: 0.75rem;
}

.lotsman-cal-move__grid label {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	font-size: 0.75rem;
	color: var(--lotsman-cal-muted);
}

.lotsman-cal-move__grid label:last-child {
	grid-column: 1 / -1;
}

.lotsman-cal-move__scope {
	margin: 0 0 0.85rem;
	padding: 0.55rem 0.6rem;
	border: 1px solid var(--lotsman-cal-line);
	border-radius: 0.4rem;
}

.lotsman-cal-move__scope legend {
	float: none;
	width: auto;
	padding: 0 0.2rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--lotsman-cal-muted);
}

.lotsman-cal-move__radio {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	margin: 0.25rem 0 0;
	font-size: 0.8125rem;
	color: var(--lotsman-cal-ink);
	cursor: pointer;
}

.lotsman-cal-move__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.4rem;
}

.lotsman-cal__event {
	display: block;
	padding: 0.22rem 0.4rem;
	border: 1px solid transparent;
	border-radius: 0.4rem;
	text-decoration: none;
	font-size: 0.72rem;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: filter 0.12s ease;
	cursor: pointer;
}

.lotsman-cal__event:hover,
.lotsman-cal__event:focus {
	filter: brightness(0.97);
	text-decoration: none;
}

.lotsman-cal__event-time {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	margin-right: 0.3rem;
}

.lotsman-cal__event-title {
	font-weight: 500;
	color: inherit;
	text-decoration: none;
}

.lotsman-cal__event-title:hover,
.lotsman-cal__event-title:focus {
	color: inherit;
	text-decoration: underline;
}

.lotsman-cal__event-meta {
	display: none;
}

.lotsman-cal--detail .lotsman-cal__event {
	white-space: normal;
	padding: 0.35rem 0.45rem;
	line-height: 1.3;
}

.lotsman-cal--detail .lotsman-cal__event-title {
	display: block;
	margin-top: 0.05rem;
}

.lotsman-cal--detail .lotsman-cal__event-meta {
	display: block;
	margin-top: 0.12rem;
	font-size: 0.65rem;
	opacity: 0.85;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lotsman-cal--detail .lotsman-cal__event-meta--instructor {
	font-weight: 600;
	opacity: 0.95;
}

.lotsman-cal--detail .lotsman-cal__event-meta--count {
	opacity: 0.95;
}

.lotsman-cal--month.lotsman-cal--detail .lotsman-cal__cell {
	min-height: 7.5rem;
	vertical-align: top;
}

.lotsman-cal--week.lotsman-cal--detail .lotsman-cal__cell {
	min-height: 8rem;
	vertical-align: top;
}

.lotsman-cal__event--c0 { background: #e8f1fb; border-color: #c5d8f5; color: #1e3a5f; }
.lotsman-cal__event--c1 { background: #e8f6ee; border-color: #bfe3cd; color: #1e4d32; }
.lotsman-cal__event--c2 { background: #fdf0e6; border-color: #f3d2b0; color: #6b3f12; }
.lotsman-cal__event--c3 { background: #f1eef8; border-color: #d5c8e8; color: #3d2a55; }
.lotsman-cal__event--c4 { background: #e9f5f6; border-color: #b9dce1; color: #1d454b; }
.lotsman-cal__event--c5 { background: #f7eef2; border-color: #e5c4d1; color: #5a2a3c; }
.lotsman-cal__event--other { background: #eef1f4; border-color: #d0d6dd; color: #3a4550; }
.lotsman-cal__event--sdo { background: #f6f0d6; border-color: #e2d48a; color: #3f3408; }
.lotsman-cal__event--none { background: #f2f4f6; border-color: #dde2e7; color: #3a4550; }

/* One-off: no fill, thicker double outline in place accent colour */
.lotsman-cal__event--oneoff {
	background: #fff !important;
	border-style: double;
	border-width: 5px;
}

.lotsman-cal__event--c0.lotsman-cal__event--oneoff { border-color: #5b8def; color: #1e3a5f; }
.lotsman-cal__event--c1.lotsman-cal__event--oneoff { border-color: #3daa6d; color: #1e4d32; }
.lotsman-cal__event--c2.lotsman-cal__event--oneoff { border-color: #e89a4a; color: #6b3f12; }
.lotsman-cal__event--c3.lotsman-cal__event--oneoff { border-color: #8b6bb5; color: #3d2a55; }
.lotsman-cal__event--c4.lotsman-cal__event--oneoff { border-color: #4a9ba8; color: #1d454b; }
.lotsman-cal__event--c5.lotsman-cal__event--oneoff { border-color: #c46b8a; color: #5a2a3c; }
.lotsman-cal__event--other.lotsman-cal__event--oneoff { border-color: #8b97a4; color: #3a4550; }
.lotsman-cal__event--sdo.lotsman-cal__event--oneoff { border-color: #9a7b0c; color: #3f3408; }

.lotsman-cal__event--cancelled {
	opacity: 0.55;
	text-decoration: line-through;
	filter: grayscale(0.35);
}

/* Draft: dimmed + hatched overlay (admins / instructors) */
.lotsman-cal__event--draft,
.lotsman-week-pill--draft {
	opacity: 0.7;
	filter: saturate(0.55);
	background-image: repeating-linear-gradient(
		-45deg,
		rgba(40, 48, 56, 0.12) 0,
		rgba(40, 48, 56, 0.12) 3px,
		transparent 3px,
		transparent 7px
	) !important;
}

.lotsman-cal__event--draft.lotsman-cal__event--oneoff {
	background-color: #f7f8fa !important;
}

.lotsman-timetable__event.lotsman-week-pill--draft {
	opacity: 0.7;
	filter: saturate(0.55);
	background-image: repeating-linear-gradient(
		-45deg,
		rgba(40, 48, 56, 0.14) 0,
		rgba(40, 48, 56, 0.14) 3px,
		transparent 3px,
		transparent 7px
	) !important;
}

.lotsman-week-pill--cancelled {
	opacity: 0.55;
	text-decoration: line-through;
	filter: grayscale(0.35);
}

@media (max-width: 992px) {
	.com-lotsman-schedule .lotsman-cal-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.com-lotsman-schedule .lotsman-cal-legend-block {
		margin-left: 0;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Keep place columns aligned with checkboxes; scroll if the row is wide */
	.com-lotsman-schedule .lotsman-cal-legend-grid {
		grid-template-columns: auto repeat(var(--lotsman-legend-cols, 4), max-content);
		width: max-content;
	}
}

@media print {
	.com-lotsman-schedule .lotsman-schedule-modes,
	.com-lotsman-schedule .lotsman-schedule-filters,
	.com-lotsman-schedule .lotsman-cal-bar__nav,
	.com-lotsman-schedule .lotsman-cal-add {
		display: none !important;
	}

	.com-lotsman-schedule .lotsman-cal-bar {
		margin-bottom: 0.4rem;
	}

	.com-lotsman-schedule .lotsman-cal-bar__title {
		font-size: 14pt;
	}

	.lotsman-cal,
	.lotsman-cal th,
	.lotsman-cal td {
		border-color: #bbb !important;
	}

	.lotsman-cal__event {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		break-inside: avoid;
	}

	.lotsman-cal__cell--today .lotsman-cal__daynum {
		background: #333 !important;
		color: #fff !important;
	}
}

/* Mine: darker fill in same place colour */
.lotsman-cal__event--c0.lotsman-cal__event--mine { background: #b7cef0; border-color: #5b8def; }
.lotsman-cal__event--c1.lotsman-cal__event--mine { background: #b5dfc4; border-color: #3daa6d; }
.lotsman-cal__event--c2.lotsman-cal__event--mine { background: #f0c9a0; border-color: #e89a4a; }
.lotsman-cal__event--c3.lotsman-cal__event--mine { background: #d5c0e8; border-color: #8b6bb5; }
.lotsman-cal__event--c4.lotsman-cal__event--mine { background: #a8d4db; border-color: #4a9ba8; }
.lotsman-cal__event--c5.lotsman-cal__event--mine { background: #e0b4c6; border-color: #c46b8a; }
.lotsman-cal__event--other.lotsman-cal__event--mine { background: #cfd6dd; border-color: #8b97a4; }
.lotsman-cal__event--sdo.lotsman-cal__event--mine { background: #e2d48a; border-color: #9a7b0c; }
.lotsman-cal__event--mine.lotsman-cal__event--oneoff {
	background: #fff !important;
	box-shadow: inset 0 0 0 3px currentColor;
}
.lotsman-cal__event--mine,
.lotsman-timetable__event.lotsman-week-pill--mine {
	position: relative;
	overflow: visible;
	padding-right: 3.4rem;
}

.lotsman-cal__mine-stamp {
	position: absolute;
	top: 0.12rem;
	right: 0.1rem;
	z-index: 2;
	display: inline-block;
	padding: 0.08rem 0.28rem;
	border: 1.5px solid #e67a22;
	border-radius: 2px;
	color: #d35400;
	background: rgba(255, 247, 237, 0.95);
	font-size: 0.56rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	line-height: 1.15;
	text-transform: uppercase;
	white-space: nowrap;
	transform: rotate(-9deg);
	pointer-events: none;
	box-shadow: 0 0 0 1px rgba(230, 122, 34, 0.12);
}

.lotsman-cal__mine-stamp--legend {
	position: static;
	transform: rotate(-7deg);
	margin-right: 0.15rem;
	vertical-align: middle;
}

.lotsman-cal__mine-stamp--teach {
	border-color: #1f7a5c;
	color: #146047;
	background: rgba(232, 248, 241, 0.95);
	box-shadow: 0 0 0 1px rgba(31, 122, 92, 0.12);
}
.lotsman-cal__event-wrap.is-series-hover,
.lotsman-timetable__event.is-series-hover {
	outline: 2px solid rgba(61, 126, 166, 0.85);
	outline-offset: 1px;
	z-index: 2;
	position: relative;
}
