.kdc-schedule {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.kdc-schedule * {
	box-sizing: border-box;
}

.kdc-schedule [hidden] {
	display: none !important;
}

.kdc-schedule-now {
	background: rgba(var(--kdc-paper-rgb), 0.86);
	border: 1px solid var(--kdc-border);
	border-radius: 6px;
	padding: 10px;
}

.kdc-schedule-now-head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	justify-content: space-between;
	margin-bottom: 8px;
}

.kdc-schedule-now h3,
.kdc-schedule-now h4,
.kdc-schedule-now p,
.kdc-schedule-now ul {
	margin: 0;
}

.wp-block-post-content .kdc-schedule-now h3,
.kdc-schedule-now h3 {
	font-size: 1rem;
	line-height: 1.2;
}

.kdc-schedule-now-head span {
	color: var(--wp--preset--color--muted);
	font-size: 0.78rem;
	font-weight: 750;
}

.kdc-schedule-now-grid {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kdc-schedule-now-card {
	background: rgba(255, 255, 255, 0.66);
	border: 1px solid color-mix(in srgb, var(--kdc-border) 78%, transparent);
	border-radius: 6px;
	padding: 9px;
}

.wp-block-post-content .kdc-schedule-now-card h4,
.kdc-schedule-now-card h4 {
	color: var(--wp--preset--color--muted);
	font-size: 0.76rem;
	font-weight: 850;
	letter-spacing: 0.04em;
	line-height: 1.2;
	margin-bottom: 7px;
	text-transform: uppercase;
}

.kdc-schedule-now-card ul {
	display: grid;
	gap: 7px;
	list-style: none;
	padding: 0;
}

.kdc-schedule-now-card p {
	color: var(--wp--preset--color--muted);
	font-size: 0.86rem;
}

.kdc-schedule-now-item {
	display: grid;
	gap: 3px;
}

.kdc-schedule-now-item strong {
	font-size: 0.9rem;
	line-height: 1.2;
}

.kdc-schedule-now-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

.kdc-schedule-now-meta span,
.kdc-schedule-now-teacher {
	color: var(--wp--preset--color--muted);
	font-size: 0.78rem;
	line-height: 1.25;
}

.kdc-schedule-toolbar {
	background: rgba(var(--kdc-paper-rgb), 0.82);
	border: 1px solid var(--kdc-border);
	border-radius: 6px;
	padding: 8px;
}

.kdc-schedule-filters {
	display: grid;
	grid-template-columns: minmax(220px, 320px);
}

.kdc-schedule-filters label {
	display: grid;
	gap: 4px;
}

.kdc-schedule-filters span {
	color: var(--wp--preset--color--muted);
	font-size: 0.78rem;
	font-weight: 750;
}

.kdc-schedule-filters select {
	appearance: none;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid var(--kdc-border);
	border-radius: 5px;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	min-height: 36px;
	padding: 7px 10px;
	width: 100%;
}

.kdc-schedule-table-wrap {
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid var(--kdc-border);
	border-radius: 6px;
	overflow: hidden;
}

.kdc-schedule-matrix {
	border-collapse: collapse;
	font-size: 0.82rem;
	line-height: 1.18;
	table-layout: fixed;
	width: 100%;
}

.kdc-schedule-matrix abbr {
	text-decoration: none;
}

.kdc-schedule-matrix th,
.kdc-schedule-matrix td {
	border-bottom: 1px solid var(--kdc-border);
	border-right: 1px solid var(--kdc-border);
	padding: 6px 7px;
	text-align: left;
	vertical-align: top;
}

.kdc-schedule-matrix th:last-child,
.kdc-schedule-matrix td:last-child {
	border-right: 0;
}

.kdc-schedule-matrix thead th {
	background: var(--kdc-soft);
	color: var(--wp--preset--color--muted);
	font-size: 0.76rem;
	font-weight: 800;
	padding-bottom: 7px;
	padding-top: 7px;
	text-align: center;
	text-transform: uppercase;
}

.kdc-schedule-matrix tbody tr:last-child th,
.kdc-schedule-matrix tbody tr:last-child td {
	border-bottom: 0;
}

.kdc-schedule-matrix tbody tr:hover th,
.kdc-schedule-matrix tbody tr:hover td {
	background: rgba(215, 180, 106, 0.1);
}

.kdc-schedule-studio-col,
.kdc-schedule-studio-cell {
	width: 18%;
}

.kdc-schedule-studio-cell {
	background: rgba(var(--kdc-paper-rgb), 0.58);
}

.kdc-schedule-studio-name {
	display: block;
	font-size: 0.82rem;
	font-weight: 800;
	line-height: 1.18;
	overflow-wrap: anywhere;
}

.kdc-schedule-lesson {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 0 4px;
	min-width: 0;
}

.kdc-schedule-lesson + .kdc-schedule-lesson {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	margin-top: 3px;
	padding-top: 3px;
}

.kdc-schedule-time {
	font-size: 0.78rem;
	font-weight: 850;
	white-space: nowrap;
}

.kdc-schedule-group-name,
.kdc-schedule-room {
	overflow-wrap: anywhere;
}

.kdc-schedule-room::before {
	content: " · ";
}

.kdc-schedule-room,
.kdc-schedule-cell-empty {
	color: var(--wp--preset--color--muted);
	font-size: 0.76rem;
}

.kdc-schedule-empty,
.kdc-schedule-no-results {
	background: rgba(var(--kdc-paper-rgb), 0.9);
	border: 1px dashed var(--kdc-border);
	border-radius: 6px;
	padding: 12px;
}

.kdc-schedule-empty p,
.kdc-schedule-no-results {
	color: var(--wp--preset--color--muted);
	margin: 0;
}

html[data-kdc-theme="dark"] .kdc-schedule-toolbar,
html[data-kdc-theme="dark"] .kdc-schedule-now,
html[data-kdc-theme="dark"] .kdc-schedule-table-wrap,
html[data-kdc-theme="dark"] .kdc-schedule-studio-cell,
html[data-kdc-theme="dark"] .kdc-schedule-empty,
html[data-kdc-theme="dark"] .kdc-schedule-no-results {
	background: rgba(35, 31, 32, 0.9);
}

html[data-kdc-theme="dark"] .kdc-schedule-now-card {
	background: rgba(18, 22, 24, 0.72);
	border-color: rgba(255, 244, 226, 0.16);
}

html[data-kdc-theme="dark"] .kdc-schedule-filters select {
	background: rgba(18, 18, 18, 0.72);
	border-color: rgba(255, 244, 226, 0.28);
	color: #f3ede3;
}

html[data-kdc-theme="dark"] .kdc-schedule-filters select option {
	background: #231f20;
	color: #f3ede3;
}

html[data-kdc-theme="dark"] .kdc-schedule-matrix thead th {
	background: rgba(215, 180, 106, 0.13);
	color: #d9cbb5;
}

html[data-kdc-theme="dark"] .kdc-schedule-filters span,
html[data-kdc-theme="dark"] .kdc-schedule-now-head span,
html[data-kdc-theme="dark"] .kdc-schedule-now-card h4,
html[data-kdc-theme="dark"] .kdc-schedule-now-card p,
html[data-kdc-theme="dark"] .kdc-schedule-now-meta span,
html[data-kdc-theme="dark"] .kdc-schedule-now-teacher,
html[data-kdc-theme="dark"] .kdc-schedule-room,
html[data-kdc-theme="dark"] .kdc-schedule-cell-empty,
html[data-kdc-theme="dark"] .kdc-schedule-matrix td::before {
	color: #d9cbb5;
}

html[data-kdc-theme="dark"] .kdc-schedule-now h3,
html[data-kdc-theme="dark"] .kdc-schedule-now-item strong,
html[data-kdc-theme="dark"] .kdc-schedule-time,
html[data-kdc-theme="dark"] .kdc-schedule-group-name,
html[data-kdc-theme="dark"] .kdc-schedule-studio-name {
	color: #f6efe5;
}

html[data-kdc-theme="dark"] .kdc-schedule-matrix th,
html[data-kdc-theme="dark"] .kdc-schedule-matrix td {
	border-color: rgba(255, 244, 226, 0.18);
}

html[data-kdc-theme="dark"] .kdc-schedule-lesson + .kdc-schedule-lesson {
	border-top-color: rgba(255, 244, 226, 0.16);
}

html[data-kdc-theme="dark"] .kdc-schedule-matrix tbody tr:hover th,
html[data-kdc-theme="dark"] .kdc-schedule-matrix tbody tr:hover td {
	background: rgba(215, 180, 106, 0.12);
}

html[data-kdc-accessibility="on"] .kdc-schedule-toolbar,
html[data-kdc-accessibility="on"] .kdc-schedule-now,
html[data-kdc-accessibility="on"] .kdc-schedule-table-wrap,
html[data-kdc-accessibility="on"] .kdc-schedule-studio-cell,
html[data-kdc-accessibility="on"] .kdc-schedule-empty,
html[data-kdc-accessibility="on"] .kdc-schedule-no-results {
	background: #fff;
	border-color: #000;
	box-shadow: none;
}

html[data-kdc-accessibility="on"] .kdc-schedule-filters select,
html[data-kdc-accessibility="on"] .kdc-schedule-matrix th,
html[data-kdc-accessibility="on"] .kdc-schedule-matrix td {
	border-color: #000;
	color: #000;
}

@media (max-width: 760px) {
	.kdc-schedule {
		gap: 8px;
	}

	.kdc-schedule-now-grid {
		grid-template-columns: 1fr;
	}

	.kdc-schedule-toolbar {
		padding: 8px;
	}

	.kdc-schedule-filters {
		grid-template-columns: 1fr;
	}

	.kdc-schedule-table-wrap {
		background: transparent;
		border: 0;
		border-radius: 0;
		overflow: visible;
	}

	.kdc-schedule-matrix,
	.kdc-schedule-matrix tbody,
	.kdc-schedule-matrix tr,
	.kdc-schedule-matrix th,
	.kdc-schedule-matrix td {
		display: block;
		width: 100%;
	}

	.kdc-schedule-matrix {
		background: transparent;
		font-size: 0.9rem;
	}

	.kdc-schedule-matrix thead {
		display: none;
	}

	.kdc-schedule-matrix tbody tr {
		background: rgba(255, 255, 255, 0.84);
		border: 1px solid var(--kdc-border);
		border-radius: 6px;
		margin-bottom: 8px;
		overflow: hidden;
	}

	.kdc-schedule-studio-cell {
		background: var(--kdc-soft);
		border-bottom: 1px solid var(--kdc-border);
		padding: 9px 10px;
	}

	.kdc-schedule-studio-name {
		font-size: 0.94rem;
	}

	.kdc-schedule-matrix td {
		border: 0;
		border-bottom: 1px solid var(--kdc-border);
		display: grid;
		gap: 8px;
		grid-template-columns: 34px minmax(0, 1fr);
		padding: 7px 10px;
	}

	.kdc-schedule-matrix td::before {
		color: var(--wp--preset--color--muted);
		content: attr(data-day-short);
		font-size: 0.76rem;
		font-weight: 850;
		text-transform: uppercase;
	}

	.kdc-schedule-matrix td.is-empty {
		display: none;
	}

	.kdc-schedule-matrix tbody tr td:last-child {
		border-bottom: 0;
	}

	.kdc-schedule-time,
	.kdc-schedule-room {
		font-size: 0.82rem;
	}

	html[data-kdc-theme="dark"] .kdc-schedule-matrix tbody tr {
		background: rgba(35, 31, 32, 0.9);
		border-color: rgba(255, 244, 226, 0.18);
	}

	html[data-kdc-theme="dark"] .kdc-schedule-studio-cell {
		background: rgba(215, 180, 106, 0.13);
	}
}

html[data-kdc-accessibility="on"] .kdc-schedule-toolbar,
html[data-kdc-accessibility="on"] .kdc-schedule-now,
html[data-kdc-accessibility="on"] .kdc-schedule-table-wrap,
html[data-kdc-accessibility="on"] .kdc-schedule-studio-cell,
html[data-kdc-accessibility="on"] .kdc-schedule-empty,
html[data-kdc-accessibility="on"] .kdc-schedule-no-results,
html[data-kdc-accessibility="on"] .kdc-schedule-matrix tbody tr,
html[data-kdc-accessibility="on"] .kdc-schedule-matrix th,
html[data-kdc-accessibility="on"] .kdc-schedule-matrix td {
	background: var(--kdc-accessibility-bg, #fff) !important;
	border-color: var(--kdc-accessibility-border, #000) !important;
	box-shadow: none !important;
	color: var(--kdc-accessibility-fg, #000) !important;
}

html[data-kdc-accessibility="on"] .kdc-schedule-filters select {
	background: var(--kdc-accessibility-button-bg, #fff) !important;
	border: 3px solid var(--kdc-accessibility-border, #000) !important;
	border-radius: 0 !important;
	color: var(--kdc-accessibility-button-fg, #000) !important;
	font-weight: 800 !important;
}

html[data-kdc-accessibility="on"] .kdc-schedule-now h3,
html[data-kdc-accessibility="on"] .kdc-schedule-now-item strong,
html[data-kdc-accessibility="on"] .kdc-schedule-time,
html[data-kdc-accessibility="on"] .kdc-schedule-room,
html[data-kdc-accessibility="on"] .kdc-schedule-group-name,
html[data-kdc-accessibility="on"] .kdc-schedule-studio-name,
html[data-kdc-accessibility="on"] .kdc-schedule-cell-empty,
html[data-kdc-accessibility="on"] .kdc-schedule-matrix td::before {
	color: var(--kdc-accessibility-fg, #000) !important;
}

html[data-kdc-accessibility="on"] .kdc-schedule-lesson + .kdc-schedule-lesson {
	border-top-color: var(--kdc-accessibility-border, #000) !important;
}
