.td-cal-page {
	padding: 40px 20px;
}
.td-cal-page-title {
	margin-bottom: 24px;
}
.td-cal-weekend-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	margin-bottom: 16px;
	cursor: pointer;
}
.td-cal-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}
.td-cal-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #333;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 20px;
	padding: 4px 12px 4px 6px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.td-cal-legend-item:hover {
	border-color: #999;
}
.td-cal-legend-item-inactive {
	opacity: 0.4;
}
.td-cal-legend-swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
	border: 1px solid rgba(0, 0, 0, 0.15);
}

.td-cal-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 20px;
	margin-bottom: 16px;
}
.td-cal-control {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.td-cal-control label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
}
.td-cal-control select,
.td-cal-control input[type="search"] {
	padding: 6px 10px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 14px;
}
#td-cal-filter-instructor {
	min-width: 180px;
	min-height: 38px;
}
.td-cal-control-search input {
	min-width: 260px;
}

#td-calendar-root {
	font-family: "Figtree", sans-serif;
}
#td-calendar-root .fc-button-primary {
	background-color: #004C97;
	border-color: #004C97;
}
#td-calendar-root .fc-button-primary:hover {
	background-color: #003c78;
	border-color: #003c78;
}
#td-calendar-root .fc-event {
	background-color: #004C97;
	border-color: #004C97;
	color: #fff;
	cursor: pointer;
}
#td-calendar-root .fc-event,
#td-calendar-root .fc-event:hover,
#td-calendar-root .fc-event:visited,
#td-calendar-root .fc-event:focus {
	/* No !important here on purpose: each event sets its own inline
	   backgroundColor/borderColor/textColor (from its Event Type) via
	   FullCalendar, and inline styles already beat this rule without
	   needing !important -- using !important here would incorrectly
	   force every event to the same color regardless of its type. This
	   rule only exists as a sane default and to override the theme's
	   site-wide red link color and underline on <a> tags. */
	color: #fff;
	text-decoration: none;
}

/* Force every event pill to reserve two lines of title height, whether
   the title needs one line or two -- keeps short and long titles the
   same visual size instead of long ones getting clipped to one line. */
#td-calendar-root .fc-daygrid-event {
	white-space: normal;
	align-items: flex-start;
}
#td-calendar-root .fc-daygrid-event .fc-event-title {
	white-space: normal !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3em;
	min-height: 2.6em;
}
#td-calendar-root .fc-daygrid-event .fc-event-time {
	white-space: nowrap;
}
#td-calendar-root .fc-daygrid-day.fc-day-today {
	background-color: #f0f4f9;
}

.td-cal-detail {
	position: fixed;
	top: 0;
	right: 0;
	width: 340px;
	max-width: 90vw;
	height: 100%;
	background: #fff;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
	padding: 24px;
	overflow-y: auto;
	z-index: 1000;
}
.td-cal-detail-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
}
.td-cal-detail dl {
	margin-top: 16px;
}
#td-cal-detail-instructors {
	font-size: 13px;
	color: #555;
	margin-top: 4px;
}
.td-cal-detail dt {
	font-size: 12px;
	text-transform: uppercase;
	color: #666;
	margin-top: 10px;
}
.td-cal-detail dd {
	margin: 2px 0 0 0;
	font-size: 15px;
}
.td-cal-detail-locked {
	margin-top: 20px;
	padding: 10px 12px;
	background: #f1f1f1;
	border-radius: 4px;
	font-size: 13px;
	color: #555;
}
.td-cal-override-badge {
	display: inline-block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 3px 10px;
	border-radius: 3px;
	background: #fff3cd;
	color: #7a5c00;
	margin-bottom: 10px;
}
.td-cal-detail-admin-actions {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px dashed #dcdcde;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}
.td-cal-admin-edit-btn {
	background: #004C97;
	color: #fff !important;
	border-color: #004C97;
	text-decoration: none;
}
.td-cal-admin-edit-btn:hover {
	background: #003c78;
}
.td-cal-admin-edit-series-link {
	font-size: 12px;
	color: #666;
}
