/**
 * Course Calendar — SPARK theme for FullCalendar + widget chrome.
 *
 * Matches Stitch frames: calendar month toolbar + agenda list cards.
 *
 * @package SPARK_Course_Catalog
 */

.sparkcc-course-calendar {
	--sparkcc-cal-primary: #0066cc;
	--sparkcc-cal-secondary: #004e9b;
	--sparkcc-cal-accent: #ff5500;
	--sparkcc-cal-cream: #fdf7e5;
	--sparkcc-cal-ink: #1a1a1a;
	--sparkcc-cal-muted: #666666;
	--sparkcc-cal-border: #e0e0e0;
	--sparkcc-cal-border-strong: #cfcfcf;
	--sparkcc-cal-surface: #ffffff;
	--sparkcc-cal-control-radius: 6px;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
	color: var(--sparkcc-cal-ink);
}

.sparkcc-course-calendar__header {
	margin-bottom: 1.5rem;
}

.sparkcc-course-calendar__title {
	font-family: Calistoga, Georgia, serif;
	font-size: clamp(1.85rem, 3vw, 2.5rem);
	font-weight: 400;
	line-height: 1.15;
	margin: 0 0 0.4rem;
	color: var(--sparkcc-cal-ink);
}

.sparkcc-course-calendar__subtitle {
	margin: 0;
	max-width: 40rem;
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--sparkcc-cal-muted);
}

/* —— Calendar mode toolbar (month nav + filters) ——
 * Hello Elementor reset uses input[type=search] / button:focus with #c36.
 * Beat those with element+attr+class specificity and !important on fought props.
 */

.sparkcc-course-calendar__filters {
	margin: 0 0 1rem;
}

.sparkcc-course-calendar__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.85rem 1.25rem;
	padding: 0.85rem 1.1rem;
	background: var(--sparkcc-cal-surface);
	border: 1px solid var(--sparkcc-cal-border);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sparkcc-course-calendar__month-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
}

.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem !important;
	height: 2.25rem !important;
	min-width: 2.25rem;
	min-height: 2.25rem;
	padding: 0 !important;
	border: 1px solid #d0d0d0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--sparkcc-cal-ink) !important;
	line-height: 1;
	font-size: inherit;
	font-weight: 400;
	cursor: pointer;
	outline: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
	transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn:hover,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:hover {
	background: rgba(0, 102, 204, 0.08) !important;
	border-color: var(--sparkcc-cal-primary) !important;
	color: var(--sparkcc-cal-primary) !important;
	box-shadow: none !important;
}

.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn:focus,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn:focus-visible,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:focus,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:focus-visible,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:focus:not(:focus-visible),
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:focus:hover,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:focus-visible:hover,
.sparkcc-course-calendar button.sparkcc-course-calendar__nav-btn[type="button"]:hover:focus {
	background: rgba(0, 102, 204, 0.1) !important;
	border-color: #0066cc !important;
	color: #0066cc !important;
	outline: none !important;
	outline-color: transparent !important;
	outline-width: 0 !important;
	box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.28) !important;
}

.sparkcc-course-calendar__nav-icon {
	display: block;
	width: 0.55rem;
	height: 0.9rem;
}

.sparkcc-course-calendar__month-title {
	margin: 0;
	min-width: 9.5rem;
	text-align: center;
	font-family: Roboto, Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sparkcc-cal-ink);
}

.sparkcc-course-calendar__filter-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
	flex: 1 1 auto;
	justify-content: flex-end;
	min-width: 0;
}

.sparkcc-course-calendar__search {
	position: relative;
	flex: 1 1 12rem;
	min-width: 10rem;
	max-width: 18rem;
}

.sparkcc-course-calendar__search-icon {
	position: absolute;
	left: 0.85rem;
	top: 50%;
	width: 1rem;
	height: 1rem;
	transform: translateY(-50%);
	color: #888888;
	pointer-events: none;
	z-index: 1;
}

.sparkcc-course-calendar input.sparkcc-course-calendar__search-input,
.sparkcc-course-calendar input.sparkcc-course-calendar__search-input[type="search"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	padding: 0.45rem 0.85rem 0.45rem 2.65rem !important;
	border: 1px solid #d0d0d0 !important;
	border-radius: 6px !important;
	background: #fff !important;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.95rem;
	color: var(--sparkcc-cal-ink);
	-webkit-appearance: none;
	appearance: none;
	outline: none !important;
	box-shadow: none !important;
}

.sparkcc-course-calendar input.sparkcc-course-calendar__search-input:focus,
.sparkcc-course-calendar input.sparkcc-course-calendar__search-input:focus-visible,
.sparkcc-course-calendar input.sparkcc-course-calendar__search-input[type="search"]:focus,
.sparkcc-course-calendar input.sparkcc-course-calendar__search-input[type="search"]:focus-visible {
	outline: none !important;
	outline-color: transparent !important;
	border-color: #0066cc !important;
	box-shadow: 0 0 0 1px #0066cc !important;
}

.sparkcc-course-calendar input.sparkcc-course-calendar__search-input::-webkit-search-decoration,
.sparkcc-course-calendar input.sparkcc-course-calendar__search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.sparkcc-course-calendar select.sparkcc-course-calendar__select {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	width: auto;
	min-width: 8.5rem;
	min-height: 42px;
	padding: 0.45rem 2.25rem 0.45rem 0.85rem !important;
	border: 1px solid #d0d0d0 !important;
	border-radius: 6px !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.95rem;
	color: var(--sparkcc-cal-ink);
	cursor: pointer;
	outline: none !important;
	box-shadow: none !important;
}

.sparkcc-course-calendar select.sparkcc-course-calendar__select:has(option[value=""]:checked:disabled) {
	color: var(--sparkcc-cal-muted);
}

.sparkcc-course-calendar select.sparkcc-course-calendar__select:focus,
.sparkcc-course-calendar select.sparkcc-course-calendar__select:focus-visible {
	outline: none !important;
	outline-color: transparent !important;
	border-color: #0066cc !important;
	box-shadow: 0 0 0 1px #0066cc !important;
}

.sparkcc-course-calendar__filter-panel {
	display: contents;
}

.sparkcc-course-calendar__filter-toggle {
	display: none;
	outline: none;
	box-shadow: none;
}

.sparkcc-course-calendar__filter-toggle-icon {
	display: block;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
}

.sparkcc-course-calendar button.sparkcc-course-calendar__filter-toggle:focus,
.sparkcc-course-calendar button.sparkcc-course-calendar__filter-toggle:focus-visible {
	outline: none !important;
	border-color: #0066cc !important;
	box-shadow: 0 0 0 1px #0066cc !important;
	background: #fff !important;
	color: var(--sparkcc-cal-ink) !important;
}

/* —— Legend —— */

.sparkcc-course-calendar__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1.35rem;
	list-style: none;
	margin: 0 0 1.15rem;
	padding: 0;
}

.sparkcc-course-calendar__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
	color: var(--sparkcc-cal-muted);
}

.sparkcc-course-calendar__legend-swatch {
	display: inline-block;
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	flex-shrink: 0;
}

.sparkcc-course-calendar__legend-label {
	font-weight: 500;
}

/* —— Body / loading —— */

.sparkcc-course-calendar__body {
	position: relative;
	min-height: 18rem;
}

.sparkcc-course-calendar--calendar .sparkcc-course-calendar__body {
	background: transparent;
	border: 0;
	padding: 0;
}

.sparkcc-course-calendar--agenda .sparkcc-course-calendar__body {
	background: transparent;
	border: 0;
	padding: 0;
}

.sparkcc-course-calendar__loading {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 5;
	align-items: center;
	justify-content: center;
	background: rgba(253, 247, 229, 0.72);
}

.sparkcc-course-calendar__loading.is-visible {
	display: flex;
}

.sparkcc-course-calendar__loading-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.sparkcc-course-calendar__spinner {
	width: 2rem;
	height: 2rem;
	border: 3px solid rgba(0, 102, 204, 0.2);
	border-top-color: var(--sparkcc-cal-primary);
	border-radius: 50%;
	animation: sparkcc-cal-spin 0.7s linear infinite;
}

@keyframes sparkcc-cal-spin {
	to {
		transform: rotate(360deg);
	}
}

.sparkcc-course-calendar__loading-label {
	font-size: 0.95rem;
	color: var(--sparkcc-cal-muted);
}

.sparkcc-course-calendar__empty {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 4;
	align-items: flex-start;
	justify-content: center;
	padding: 2.5rem 1.25rem 1.25rem;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		rgba(253, 247, 229, 0.92) 0%,
		rgba(253, 247, 229, 0.72) 40%,
		rgba(253, 247, 229, 0.35) 100%
	);
}

.sparkcc-course-calendar__empty:not([hidden]) {
	display: flex;
}

.sparkcc-course-calendar__empty-panel {
	margin: 0;
	max-width: 22rem;
	padding: 0.85rem 1.15rem;
	text-align: center;
	color: #3d3d3d;
	font-size: 1.05rem;
	line-height: 1.4;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	pointer-events: auto;
}

.sparkcc-course-calendar__error {
	/* Kept in DOM for assistive tech; visible errors use .sparkcc-cal-toast. */
	display: none;
}

#sparkcc-cal-toast-root {
	bottom: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: min(360px, calc(100vw - 48px));
	pointer-events: none;
	position: fixed;
	right: 24px;
	z-index: 100100;
}

.sparkcc-cal-toast {
	align-items: flex-start;
	animation: sparkcc-cal-toast-in 0.25s ease;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-left: 4px solid #72aee6;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	color: #1d2327;
	display: flex;
	gap: 10px;
	padding: 12px 14px;
	pointer-events: auto;
}

.sparkcc-cal-toast--error {
	border-left-color: #d63638;
}

.sparkcc-cal-toast__message {
	flex: 1;
	font-size: 14px;
	line-height: 1.45;
	margin: 0;
}

.sparkcc-cal-toast__dismiss {
	background: transparent;
	border: 0;
	color: #50575e;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1;
	margin: -2px -4px 0 0;
	padding: 0;
}

.sparkcc-cal-toast__dismiss:hover,
.sparkcc-cal-toast__dismiss:focus {
	color: #1d2327;
}

.sparkcc-cal-toast--leaving {
	animation: sparkcc-cal-toast-out 0.2s ease forwards;
}

@keyframes sparkcc-cal-toast-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes sparkcc-cal-toast-out {
	from {
		opacity: 1;
		transform: translateY(0);
	}

	to {
		opacity: 0;
		transform: translateY(8px);
	}
}

/* —— FullCalendar base —— */

.sparkcc-course-calendar .fc {
	--fc-border-color: #e0e0e0;
	--fc-today-bg-color: transparent;
	--fc-page-bg-color: transparent;
	--fc-neutral-bg-color: transparent;
	--fc-list-event-hover-bg-color: transparent;
	font-family: Roboto, Lato, "Helvetica Neue", Arial, sans-serif;
}

.sparkcc-course-calendar .fc .fc-scrollgrid,
.sparkcc-course-calendar .fc .fc-scrollgrid-section > td {
	border-color: var(--fc-border-color);
}

.sparkcc-course-calendar .fc .fc-col-header-cell {
	background: #f3f3f3;
}

.sparkcc-course-calendar .fc .fc-col-header-cell-cushion {
	padding: 0.65rem 0.25rem;
	color: var(--sparkcc-cal-muted);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85rem;
}

/* In-month days: flat white. No week striping / row hover. */
.sparkcc-course-calendar .fc .fc-daygrid-body tr,
.sparkcc-course-calendar .fc .fc-daygrid-body tr:nth-child(odd),
.sparkcc-course-calendar .fc .fc-daygrid-body tr:nth-child(even),
.sparkcc-course-calendar .fc .fc-daygrid-body tr:hover {
	background: transparent;
}

.sparkcc-course-calendar .fc .fc-daygrid-day {
	background: #fff !important;
	transition: box-shadow 0.12s ease;
	position: relative;
}

/* Kill theme/Elementor week-row hover fills; only the hovered day gets outline. */
.sparkcc-course-calendar .fc .fc-daygrid-body tr:hover > .fc-daygrid-day {
	background: #fff !important;
}

.sparkcc-course-calendar .fc .fc-daygrid-body tr:hover > .fc-daygrid-day.fc-day-other {
	background: #f0f0f0 !important;
}

.sparkcc-course-calendar .fc .fc-daygrid-day:hover {
	box-shadow: inset 0 0 0 2px var(--sparkcc-cal-primary);
	z-index: 1;
}

.sparkcc-course-calendar .fc .fc-daygrid-day.fc-day-other {
	background: #f0f0f0 !important;
}

.sparkcc-course-calendar .fc .fc-daygrid-day.fc-day-other:hover {
	box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.45);
}

.sparkcc-course-calendar .fc .fc-daygrid-day-top {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-start;
	gap: 0.15rem;
	padding: 0.35rem 0.45rem 0;
}

.sparkcc-course-calendar .fc .fc-daygrid-day-number {
	padding: 0;
	color: var(--sparkcc-cal-muted);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85rem;
	line-height: 1.2;
	float: none !important;
}

.sparkcc-course-calendar .fc .fc-day-other .fc-daygrid-day-number {
	color: #404040 !important;
}

.sparkcc-course-calendar .fc .fc-daygrid-day-frame {
	position: relative;
	min-height: 6.5rem;
}

.sparkcc-course-calendar .fc .fc-daygrid-day.fc-day-today {
	background: #e8f1fb !important;
	box-shadow: inset 0 0 0 2px var(--sparkcc-cal-secondary);
}

.sparkcc-course-calendar .fc .fc-daygrid-day.fc-day-today:hover {
	background: #e8f1fb !important;
	box-shadow: inset 0 0 0 2px var(--sparkcc-cal-secondary);
}

.sparkcc-course-calendar .fc .fc-day-today .fc-daygrid-day-number {
	color: var(--sparkcc-cal-primary);
}

.sparkcc-cal-today-label {
	display: block;
	margin: 0;
	padding: 0;
	font-family: Roboto, Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--sparkcc-cal-muted);
	pointer-events: none;
}

.sparkcc-course-calendar .fc .fc-daygrid-event {
	border-radius: 5px;
	border-width: 0;
	margin: 1px 4px;
	padding: 2px 7px;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.35;
	cursor: pointer;
	color: #fff !important;
}

.sparkcc-course-calendar .fc .fc-daygrid-event .fc-event-title {
	font-weight: 600;
}

.sparkcc-course-calendar .fc .fc-daygrid-more-link {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sparkcc-cal-primary);
}

/* —— Agenda / list views —— */

.sparkcc-course-calendar .fc .fc-list {
	border: 0;
}

.sparkcc-course-calendar .fc .fc-list-table {
	width: 100%;
	border-style: hidden;
	border-collapse: separate;
	border-spacing: 0;
}

.sparkcc-course-calendar .fc .fc-list-day > th,
.sparkcc-course-calendar .fc .fc-list-day > * {
	background: transparent !important;
	border: 0 !important;
}

.sparkcc-course-calendar .fc .fc-list-day-cushion {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 1rem;
	width: 100%;
	box-sizing: border-box;
	padding: 1.35rem 0 0.55rem;
	background: transparent !important;
	border-bottom: 3px solid var(--sparkcc-cal-accent);
	text-align: left;
}

/* FC clearfix pseudo becomes a flex item and steals gap space on the right. */
.sparkcc-course-calendar .fc .fc-list-day-cushion::after {
	content: none;
	display: none;
}

.sparkcc-cal-day-icon {
	display: none;
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	color: var(--sparkcc-cal-accent);
}

.sparkcc-course-calendar .fc .fc-list-day-text,
.sparkcc-course-calendar .fc .fc-list-day-side-text {
	flex: 0 1 auto;
	min-width: 0;
	font-family: Calistoga, Georgia, serif;
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--sparkcc-cal-ink);
	text-decoration: none;
	text-align: left !important;
}

.sparkcc-course-calendar .fc .sparkcc-cal-agenda-count {
	flex: 0 0 auto;
	margin-left: auto;
	margin-right: 0;
	padding: 0;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sparkcc-cal-accent);
	text-transform: none;
	white-space: nowrap;
	text-align: right;
}

.sparkcc-course-calendar .fc .fc-list-event {
	cursor: pointer;
}

.sparkcc-course-calendar .fc .fc-list-event > td,
.sparkcc-course-calendar .fc .fc-list-event:hover > td,
.sparkcc-course-calendar .fc .fc-list-event:nth-child(odd) > td,
.sparkcc-course-calendar .fc .fc-list-event:nth-child(even) > td {
	background: transparent !important;
	border: 0 !important;
	padding: 0;
}

.sparkcc-course-calendar .fc .fc-list-day + .fc-list-event > td {
	padding-top: 0.75rem;
}

.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-last > td {
	padding-bottom: 0.35rem;
}

.sparkcc-course-calendar .fc .fc-list-event-graphic,
.sparkcc-course-calendar .fc .fc-list-event-time {
	display: none;
}

.sparkcc-course-calendar .fc .fc-list-event-title {
	display: block;
	width: 100%;
}

.sparkcc-course-calendar .fc .fc-list-event-title a {
	color: inherit;
	text-decoration: none;
}

/* Four left-aligned columns: time | title/instructor | type | location */
.sparkcc-cal-agenda-row {
	display: grid;
	grid-template-columns: 6rem minmax(0, 1fr) 7.5rem minmax(9rem, 12rem);
	align-items: center;
	justify-items: start;
	gap: 0.85rem 1.25rem;
	padding: 0.95rem 1.15rem;
	background: #fff;
	border: 1px solid var(--sparkcc-cal-border);
	border-radius: 0;
	text-align: left;
	color: inherit;
	text-decoration: none;
	box-sizing: border-box;
	width: 100%;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.sparkcc-course-calendar .fc .fc-list-event:hover .sparkcc-cal-agenda-row,
.sparkcc-course-calendar .fc .fc-list-event:focus-within .sparkcc-cal-agenda-row {
	background-color: rgba(0, 102, 204, 0.07);
}

.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-first:hover .sparkcc-cal-agenda-row,
.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-only:hover .sparkcc-cal-agenda-row,
.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-first:focus-within .sparkcc-cal-agenda-row,
.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-only:focus-within .sparkcc-cal-agenda-row {
	box-shadow: inset 0 0 0 2px var(--sparkcc-cal-primary);
}

.sparkcc-course-calendar .fc .fc-list-event:not(.sparkcc-cal-day-first):hover .sparkcc-cal-agenda-row,
.sparkcc-course-calendar .fc .fc-list-event:not(.sparkcc-cal-day-first):focus-within .sparkcc-cal-agenda-row {
	box-shadow: inset 0 1px 0 var(--sparkcc-cal-border), inset 0 0 0 2px var(--sparkcc-cal-primary);
}

.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-first .sparkcc-cal-agenda-row {
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-last .sparkcc-cal-agenda-row {
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-only .sparkcc-cal-agenda-row {
	border-radius: 8px;
}

.sparkcc-course-calendar .fc .fc-list-event:not(.sparkcc-cal-day-first) .sparkcc-cal-agenda-row {
	border-top: 0;
	box-shadow: inset 0 1px 0 var(--sparkcc-cal-border);
}

.sparkcc-cal-agenda-row__time,
.sparkcc-cal-agenda-row__main,
.sparkcc-cal-agenda-row__type,
.sparkcc-cal-agenda-row__location {
	justify-self: start;
	text-align: left;
}

.sparkcc-cal-agenda-row__time {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: Roboto, Lato, sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--sparkcc-cal-primary);
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
}

.sparkcc-cal-agenda-row__time-range {
	display: none;
}

.sparkcc-cal-agenda-row__time-period {
	margin-left: 0.2rem;
}

.sparkcc-cal-agenda-row__clock {
	display: none;
	flex-shrink: 0;
	width: 0.875rem;
	height: 0.875rem;
	opacity: 0.8;
}

.sparkcc-cal-agenda-row__title {
	font-family: Calistoga, Georgia, serif;
	font-size: 1.05rem;
	font-weight: 400;
	color: var(--sparkcc-cal-ink);
	line-height: 1.3;
}

.sparkcc-cal-agenda-row__meta {
	margin-top: 0.25rem;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.85rem;
	color: var(--sparkcc-cal-muted);
}

.sparkcc-cal-agenda-row__type {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-width: 0;
}

.sparkcc-cal-agenda-row__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.75rem;
	padding: 0.25rem 0.9rem;
	border-radius: 999px;
	color: #fff;
	font-family: Roboto, Lato, sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.sparkcc-cal-agenda-row__location {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.4rem;
	font-family: Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.85rem;
	color: var(--sparkcc-cal-muted);
	min-width: 0;
}

.sparkcc-cal-agenda-row__pin {
	display: block;
	flex-shrink: 0;
	width: 0.75rem;
	height: 0.875rem;
	opacity: 0.75;
}

.sparkcc-cal-agenda-row__empty {
	color: var(--sparkcc-cal-muted);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.sparkcc-cal-agenda-row__actions {
	display: none;
}

.sparkcc-cal-agenda-row__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	padding: 0.85rem 1rem;
	border: 0;
	border-radius: 6px;
	background: var(--sparkcc-cal-accent);
	color: #fff !important;
	font-family: Roboto, Lato, sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
}

.sparkcc-course-calendar a.sparkcc-cal-agenda-row__cta,
.sparkcc-course-calendar a.sparkcc-cal-agenda-row__cta:visited {
	color: #fff !important;
}

.sparkcc-cal-agenda-row__cta:hover,
.sparkcc-cal-agenda-row__cta:focus,
.sparkcc-cal-agenda-row__cta:focus-visible,
.sparkcc-course-calendar a.sparkcc-cal-agenda-row__cta:hover,
.sparkcc-course-calendar a.sparkcc-cal-agenda-row__cta:focus,
.sparkcc-course-calendar a.sparkcc-cal-agenda-row__cta:focus-visible {
	color: #fff !important;
	text-decoration: none !important;
	filter: brightness(0.95);
}

.sparkcc-cal-view-more-wrap {
	display: flex;
	justify-content: center;
	padding: 1rem 0 1.5rem;
}

/* Calendar "Load Next Week" is mobile list-only; never show under month grid. */
@media (min-width: 768px) {
	.sparkcc-course-calendar--calendar .sparkcc-cal-view-more-wrap {
		display: none !important;
	}
}

.sparkcc-cal-view-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	margin: 0;
	padding: 0.7rem 1.35rem;
	border: 1.5px solid var(--sparkcc-cal-primary);
	border-radius: 999px;
	background: #fff;
	color: var(--sparkcc-cal-primary);
	font-family: Roboto, Lato, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.sparkcc-cal-view-more:hover,
.sparkcc-cal-view-more:focus,
.sparkcc-cal-view-more:focus-visible {
	background: rgba(0, 102, 204, 0.06);
	outline: none;
}

.sparkcc-cal-view-more__chevron {
	display: block;
	flex-shrink: 0;
}

.sparkcc-course-calendar .fc .fc-list-empty {
	background: transparent;
	color: var(--sparkcc-cal-muted);
}

@media (max-width: 767px) {
	.sparkcc-course-calendar__toolbar {
		flex-direction: column;
		align-items: stretch;
		padding: 0.85rem;
	}

	.sparkcc-course-calendar__month-nav {
		justify-content: center;
	}

	.sparkcc-course-calendar__filter-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.sparkcc-course-calendar__search {
		max-width: none;
		width: 100%;
	}

	.sparkcc-course-calendar .sparkcc-course-calendar__select {
		width: 100%;
	}

	.sparkcc-course-calendar .fc .fc-list-event {
		cursor: default;
	}

	.sparkcc-course-calendar .fc .fc-list-event > td,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-last > td {
		padding: 0 0 0.875rem !important;
	}

	.sparkcc-course-calendar .fc .fc-list-day + .fc-list-event > td {
		padding-top: 0.75rem !important;
	}

	/* Separate rounded cards (shared by agenda + calendar listWeek). */
	.sparkcc-course-calendar .fc .fc-list-event .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-first .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-last .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-only .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event:not(.sparkcc-cal-day-first) .sparkcc-cal-agenda-row {
		border: 1px solid var(--sparkcc-cal-border);
		border-radius: 12px;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	}

	.sparkcc-course-calendar .fc .fc-list-event:hover .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event:focus-within .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-first:hover .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-only:hover .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-first:focus-within .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event.sparkcc-cal-day-only:focus-within .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event:not(.sparkcc-cal-day-first):hover .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar .fc .fc-list-event:not(.sparkcc-cal-day-first):focus-within .sparkcc-cal-agenda-row {
		background-color: #fff;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	}

	.sparkcc-cal-agenda-row__actions {
		display: block;
		grid-area: cta;
		width: 100%;
		margin-top: 0.2rem;
	}

	.sparkcc-cal-agenda-row__cta {
		padding: 0.9rem 1rem;
		font-size: 0.75rem;
	}

	.sparkcc-cal-agenda-row__meta {
		display: none !important;
	}

	/* —— Agenda mobile cards —— */
	.sparkcc-course-calendar--agenda .fc .fc-list-day-cushion {
		flex-wrap: nowrap;
		align-items: center;
		gap: 0.5rem;
		padding: 1.15rem 0 0;
		border-bottom: 0;
	}

	.sparkcc-course-calendar--agenda .fc .fc-list-table tbody > tr.fc-list-day:first-child .fc-list-day-cushion {
		padding-top: 0.15rem;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-day-icon {
		display: block;
	}

	.sparkcc-course-calendar--agenda .fc .sparkcc-cal-agenda-count {
		display: none;
	}

	.sparkcc-course-calendar--agenda .fc .fc-list-day-text,
	.sparkcc-course-calendar--agenda .fc .fc-list-day-side-text {
		font-family: Roboto, Lato, "Helvetica Neue", Arial, sans-serif;
		font-size: 0.8125rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		line-height: 1.2;
		text-transform: uppercase;
	}

	.sparkcc-course-calendar--agenda .fc .fc-list-day + .fc-list-event > td {
		padding-top: 0.875rem !important;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row {
		grid-template-columns: auto auto minmax(0, 1fr);
		grid-template-areas:
			"main main main"
			"time type ."
			"cta cta cta";
		align-items: center;
		justify-items: start;
		gap: 0.75rem 0.55rem;
		padding: 1.15rem 1.1rem 1.1rem;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__main {
		grid-area: main;
		width: 100%;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__title {
		font-size: 1.3rem;
		line-height: 1.25;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__location {
		display: none !important;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__time {
		grid-area: time;
		align-self: center;
		font-size: 0.8125rem;
		font-weight: 500;
		color: var(--sparkcc-cal-muted);
		white-space: normal;
		overflow: visible;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__time-range {
		display: inline;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__clock {
		display: block;
		color: var(--sparkcc-cal-muted);
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__type {
		grid-area: type;
		justify-self: start;
	}

	.sparkcc-course-calendar--agenda .sparkcc-cal-agenda-row__badge {
		min-height: 1.55rem;
		padding: 0.2rem 0.7rem;
		font-size: 0.65rem;
	}

	.sparkcc-cal-view-more-wrap {
		padding: 0.35rem 0 1.25rem;
	}

	/* —— Calendar mode mobile list (listUpcoming / Stitch) —— */
	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__month-nav {
		display: none !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filters {
		margin: 0 0 1.25rem;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__toolbar {
		gap: 0.85rem;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-controls {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.85rem;
		width: 100%;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-controls .sparkcc-course-calendar__search {
		order: 0;
		max-width: none;
		width: 100%;
		flex: 0 0 auto;
	}

	.sparkcc-course-calendar--calendar input.sparkcc-course-calendar__search-input,
	.sparkcc-course-calendar--calendar input.sparkcc-course-calendar__search-input[type="search"] {
		min-height: 60px !important;
		padding: 0.95rem 1rem 0.95rem 2.95rem !important;
		border-radius: 10px !important;
		font-size: 1.1rem;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__search-icon {
		left: 1rem;
		width: 1.15rem;
		height: 1.15rem;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-toggle {
		display: inline-flex;
		order: 1;
		align-items: center;
		justify-content: center;
		gap: 0.55rem;
		width: 100%;
		min-height: 52px;
		padding: 0.65rem 1.25rem !important;
		border: 2px solid #0066cc !important;
		border-radius: 999px !important;
		background: #fff !important;
		color: #0066cc !important;
		font-family: Lato, "Helvetica Neue", Arial, sans-serif;
		font-size: 1.05rem;
		font-weight: 600;
		line-height: 1.2;
		cursor: pointer;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-controls.is-open .sparkcc-course-calendar__filter-toggle {
		background: rgba(0, 102, 204, 0.06) !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-panel {
		display: none;
		order: 2;
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
		width: 100%;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-controls.is-open .sparkcc-course-calendar__filter-panel {
		display: flex;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__filter-panel[hidden] {
		display: none !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__select {
		display: block;
		width: 100%;
		min-width: 0;
		border-radius: 10px !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__legend {
		display: none !important;
		margin: 0 !important;
		padding: 0 !important;
		height: 0 !important;
		overflow: hidden !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-course-calendar__body {
		border: 0;
		box-shadow: none;
	}

	/* Date: full-width gray underline under the label (Stitch). */
	.sparkcc-course-calendar--calendar .fc .fc-list-day-cushion {
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap;
		align-items: stretch !important;
		justify-content: flex-start;
		gap: 0 !important;
		padding: 1.35rem 0 0 !important;
		border: 0 !important;
		background: transparent !important;
	}

	.sparkcc-course-calendar--calendar .fc .fc-list-table tbody > tr.fc-list-day:first-child .fc-list-day-cushion {
		padding-top: 0.25rem !important;
	}

	.sparkcc-course-calendar--calendar .fc .fc-list-day-cushion::after {
		content: none !important;
		display: none !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-day-icon {
		display: none !important;
	}

	.sparkcc-course-calendar--calendar .fc .sparkcc-cal-agenda-count {
		display: none !important;
	}

	.sparkcc-course-calendar--calendar .fc .fc-list-day-text,
	.sparkcc-course-calendar--calendar .fc .fc-list-day-side-text {
		display: block !important;
		width: 100%;
		box-sizing: border-box;
		padding: 0 0 0.55rem !important;
		margin: 0 !important;
		border: 0 !important;
		border-bottom: 3px solid #d0d0d0 !important;
		font-family: Calistoga, Georgia, serif;
		font-size: 1.6rem;
		font-weight: 400;
		letter-spacing: 0;
		line-height: 1.2;
		text-transform: none;
		text-decoration: none !important;
		color: #a34b16;
	}

	.sparkcc-course-calendar--calendar .fc .fc-list-day + .fc-list-event > td {
		padding-top: 0.9rem !important;
	}

	.sparkcc-course-calendar--calendar .fc .fc-list-event .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar--calendar .fc .fc-list-event.sparkcc-cal-day-first .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar--calendar .fc .fc-list-event.sparkcc-cal-day-last .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar--calendar .fc .fc-list-event.sparkcc-cal-day-only .sparkcc-cal-agenda-row,
	.sparkcc-course-calendar--calendar .fc .fc-list-event:not(.sparkcc-cal-day-first) .sparkcc-cal-agenda-row {
		border: 1px solid #e0e0e0;
		border-radius: 12px;
		box-shadow: none;
		background: #fff;
	}

	/*
	 * Card: time | details with equal inset on every side.
	 * Divider sits between matching 1.25rem gutters so title/location/CTA
	 * never sit on the rule (same white margin as the card edge).
	 */
	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"time main type"
			"time loc loc"
			"time cta cta";
		align-items: start;
		justify-items: stretch;
		column-gap: 0;
		row-gap: 0.5rem;
		padding: 1.25rem;
		box-sizing: border-box;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row::before {
		content: none;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__time {
		grid-area: time;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		align-self: stretch;
		box-sizing: border-box;
		width: auto;
		min-width: 3.25rem;
		margin: 0;
		padding: 0.1rem 1.25rem 0 0;
		border-right: 1px solid #e0e0e0;
		font-family: Roboto, Lato, "Helvetica Neue", Arial, sans-serif;
		font-size: 1.05rem;
		font-weight: 700;
		line-height: 1.1;
		color: #0066cc;
		white-space: normal;
		overflow: visible;
		text-align: center;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__time-start {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0.15rem;
		white-space: nowrap;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__time-period {
		display: block;
		margin-left: 0;
		font-size: 0.7rem;
		font-weight: 500;
		letter-spacing: 0.06em;
		line-height: 1;
		color: #9a9a9a;
		text-transform: uppercase;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__time-range,
	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__clock {
		display: none !important;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__main {
		grid-area: main;
		width: 100%;
		min-width: 0;
		padding: 0 0.5rem 0 1.25rem;
		box-sizing: border-box;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__title {
		font-family: Calistoga, Georgia, serif;
		font-size: 1.2rem;
		font-weight: 400;
		line-height: 1.25;
		color: #2a2a2a;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__type {
		grid-area: type;
		justify-self: end;
		align-self: start;
		padding: 0.15rem 0 0 0.5rem;
		box-sizing: border-box;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__location {
		display: inline-flex !important;
		grid-area: loc;
		align-items: center;
		width: 100%;
		box-sizing: border-box;
		margin: 0;
		padding: 0 0 0 1.25rem;
		font-size: 0.9rem;
		color: #6b6b6b;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__badge {
		min-height: 1.45rem;
		padding: 0.22rem 0.7rem;
		font-size: 0.6rem;
		letter-spacing: 0.05em;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__actions {
		grid-area: cta;
		box-sizing: border-box;
		width: 100%;
		margin: 0.25rem 0 0;
		padding: 0 0 0 1.25rem;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-agenda-row__cta {
		min-height: 48px;
		padding: 0.85rem 1rem;
		border-radius: 8px;
		background: #ff5500;
		font-size: 0.95rem;
		font-weight: 700;
		letter-spacing: 0.01em;
		text-transform: none;
	}

	.sparkcc-course-calendar--calendar .sparkcc-cal-view-more {
		min-height: 52px;
		border-radius: 999px;
		border-width: 1.5px;
		font-size: 1.05rem;
	}
}
