/* Healthclub Lesrooster — frontend & admin shared */

.hcl-schedule {
	--hcl-time-col-width: 120px;
	--hcl-accent: #054d65;
	--hcl-text: #054d65;
	--hcl-nav-bg: #ffffff;
	--hcl-nav-border: #b8d4de;
	--hcl-nav-text: #054d65;
	--hcl-nav-hover-bg: #e8f0f3;
	--hcl-nav-hover-border: #054d65;
	--hcl-nav-hover-text: #054d65;
	--hcl-cal-bg: #ffffff;
	--hcl-cal-border: #b8d4de;
	--hcl-cal-text: #054d65;
	--hcl-cal-hover-bg: #e8f0f3;
	--hcl-cal-hover-border: #054d65;
	--hcl-cal-hover-text: #054d65;
	--hcl-today-bg: #ffffff;
	--hcl-today-border: #b8d4de;
	--hcl-today-text: #054d65;
	--hcl-today-hover-bg: #e8f0f3;
	--hcl-today-hover-border: #054d65;
	--hcl-today-hover-text: #054d65;
	--hcl-panel-bg: rgba(255, 255, 255, 0.92);
	--hcl-border: rgba(5, 77, 101, 0.25);
	font-family: "Jost", "GopherText-Light", sans-serif;
	color: var(--hcl-text);
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
}

.hcl-schedule__panel {
	background: var(--hcl-panel-bg);
	border-radius: 16px;
	border: 1px solid var(--hcl-border);
	overflow: visible;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.hcl-schedule__header {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--hcl-border);
	gap: 1rem;
}

.hcl-schedule__hours {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: "GopherText-Light", "Jost", sans-serif;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hcl-schedule__hours-icon {
	font-size: 1.1rem;
}

.hcl-schedule__title-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

.hcl-schedule__title {
	margin: 0;
	font-family: "GopherDisplay", "Jost", sans-serif;
	font-size: clamp(1.1rem, 2.5vw, 1.5rem);
	font-weight: 400;
	color: var(--hcl-accent);
	white-space: nowrap;
}

.hcl-schedule .hcl-schedule__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--hcl-nav-border);
	background: var(--hcl-nav-bg);
	color: var(--hcl-nav-text) !important;
	line-height: 1;
	cursor: pointer;
	text-decoration: none !important;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hcl-schedule .hcl-schedule__nav:hover {
	background: var(--hcl-nav-hover-bg);
	border-color: var(--hcl-nav-hover-border);
	color: var(--hcl-nav-hover-text) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hcl-schedule .hcl-schedule__nav:focus,
.hcl-schedule .hcl-schedule__nav:focus-visible,
.hcl-schedule .hcl-schedule__nav:active {
	background: var(--hcl-nav-hover-bg);
	border-color: var(--hcl-nav-hover-border);
	color: var(--hcl-nav-hover-text) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	outline: none;
}

.hcl-schedule__nav .hcl-icon {
	width: 22px;
	height: 22px;
	display: block;
}

.hcl-schedule__nav--image {
	width: auto;
	height: auto;
	min-width: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.hcl-schedule .hcl-schedule__nav--image,
.hcl-schedule .hcl-schedule__nav--image:hover,
.hcl-schedule .hcl-schedule__nav--image:focus,
.hcl-schedule .hcl-schedule__nav--image:focus-visible,
.hcl-schedule .hcl-schedule__nav--image:active {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: inherit !important;
	outline: none;
}

.hcl-schedule .hcl-schedule__nav--image:focus-visible {
	opacity: 0.85;
	outline: 2px solid var(--hcl-nav-border);
	outline-offset: 3px;
}

.hcl-schedule__nav--image .hcl-icon--img {
	width: auto;
	height: 30px;
	max-width: 47px;
	display: block;
}

.hcl-schedule__calendar-wrap {
	position: relative;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.hcl-schedule__calendar-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.hcl-schedule__calendar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--hcl-cal-border);
	background: var(--hcl-cal-bg);
	color: var(--hcl-cal-text);
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hcl-schedule__calendar-btn:hover,
.hcl-schedule__calendar-btn:focus-visible,
.hcl-schedule__calendar-btn[aria-expanded="true"] {
	background: var(--hcl-cal-hover-bg);
	border-color: var(--hcl-cal-hover-border);
	color: var(--hcl-cal-hover-text);
	box-shadow: 0 2px 8px rgba(5, 77, 101, 0.12);
}

.hcl-schedule__calendar-icon {
	display: block;
}

.hcl-datepicker {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 100;
	width: 280px;
	padding: 1rem;
	background: #fff;
	border: 1px solid var(--hcl-border);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.hcl-datepicker[hidden] {
	display: none;
}

.hcl-datepicker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.hcl-datepicker__month-label {
	font-family: "GopherDisplay", "Jost", sans-serif;
	font-size: 1rem;
	color: var(--hcl-accent);
	font-weight: 500;
}

.hcl-datepicker__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--hcl-cal-border);
	border-radius: 50%;
	background: var(--hcl-cal-bg);
	color: var(--hcl-cal-text);
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hcl-datepicker__nav:hover,
.hcl-datepicker__nav:focus-visible {
	background: var(--hcl-cal-hover-bg);
	border-color: var(--hcl-cal-hover-border);
	color: var(--hcl-cal-hover-text);
}

.hcl-datepicker__weekdays,
.hcl-datepicker__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	text-align: center;
}

.hcl-datepicker__weekdays {
	margin-bottom: 0.35rem;
	font-size: 0.7rem;
	text-transform: uppercase;
	color: var(--hcl-accent);
	opacity: 0.7;
}

.hcl-datepicker__day {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--hcl-accent);
	font-size: 0.85rem;
	cursor: pointer;
	padding: 0;
}

.hcl-datepicker__day:hover:not(.hcl-datepicker__day--empty) {
	background: rgba(5, 77, 101, 0.1);
}

.hcl-datepicker__day--today {
	font-weight: 700;
	border: 1px solid var(--hcl-border);
}

.hcl-datepicker__day--selected {
	background: var(--hcl-accent);
	color: #fff;
}

.hcl-datepicker__day--selected:hover {
	background: var(--hcl-accent);
}

.hcl-datepicker__day--empty {
	pointer-events: none;
}

.hcl-schedule__today-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 0.85rem;
	border: 1px solid var(--hcl-today-border);
	border-radius: 20px;
	background: var(--hcl-today-bg);
	color: var(--hcl-today-text);
	font-family: "GopherText-Light", "Jost", sans-serif;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hcl-schedule__today-btn:hover,
.hcl-schedule__today-btn:focus-visible {
	background: var(--hcl-today-hover-bg);
	border-color: var(--hcl-today-hover-border);
	color: var(--hcl-today-hover-text);
	box-shadow: 0 2px 8px rgba(5, 77, 101, 0.12);
}

.hcl-schedule__body {
	min-height: 120px;
}

/* Day change transitions */
@keyframes hcl-fly-in-right {
	from {
		opacity: 0;
		transform: translateX(40px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes hcl-fly-out-left {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(-40px);
	}
}

@keyframes hcl-fly-in-left {
	from {
		opacity: 0;
		transform: translateX(-40px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes hcl-fly-out-right {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(40px);
	}
}

.hcl-schedule--transitioning .hcl-schedule__body {
	overflow: hidden;
}

.hcl-schedule__body.hcl-day-transition--hidden,
.hcl-schedule__title.hcl-day-transition--hidden {
	opacity: 0 !important;
	visibility: hidden;
	pointer-events: none;
}

.hcl-schedule__body.hcl-day-transition--exit-next,
.hcl-schedule__title.hcl-day-transition--exit-next {
	animation: hcl-fly-out-left 0.22s ease-in forwards;
}

.hcl-schedule__body.hcl-day-transition--exit-prev,
.hcl-schedule__title.hcl-day-transition--exit-prev {
	animation: hcl-fly-out-right 0.22s ease-in forwards;
}

.hcl-schedule__body.hcl-day-transition--enter-next,
.hcl-schedule__title.hcl-day-transition--enter-next {
	animation: hcl-fly-in-right 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hcl-schedule__body.hcl-day-transition--enter-prev,
.hcl-schedule__title.hcl-day-transition--enter-prev {
	animation: hcl-fly-in-left 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hcl-schedule--transitioning.hcl-schedule--loading .hcl-schedule__body,
.hcl-schedule--transitioning.hcl-schedule--loading .hcl-schedule__title {
	opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
	.hcl-schedule__body.hcl-day-transition--exit-next,
	.hcl-schedule__body.hcl-day-transition--exit-prev,
	.hcl-schedule__title.hcl-day-transition--exit-next,
	.hcl-schedule__title.hcl-day-transition--exit-prev,
	.hcl-schedule__body.hcl-day-transition--enter-next,
	.hcl-schedule__body.hcl-day-transition--enter-prev,
	.hcl-schedule__title.hcl-day-transition--enter-next,
	.hcl-schedule__title.hcl-day-transition--enter-prev {
		animation: none !important;
	}

	.hcl-schedule__body.hcl-day-transition--hidden,
	.hcl-schedule__title.hcl-day-transition--hidden {
		opacity: 1 !important;
		visibility: visible;
	}
}

.hcl-schedule__row {
	display: grid;
	grid-template-columns: var(--hcl-time-col-width) 1fr;
	border-bottom: 1px solid var(--hcl-border);
	min-height: 72px;
}

.hcl-schedule__row:last-child {
	border-bottom: none;
}

.hcl-schedule__time-col {
	display: flex;
	align-items: center;
	padding: 1rem 1rem 1rem 1.5rem;
	border-right: 1px solid var(--hcl-border);
}

.hcl-schedule__time-label {
	font-family: "GopherText-Light", sans-serif;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hcl-accent);
}

.hcl-schedule__slots-col {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	overflow-x: auto;
}

.hcl-schedule .hcl-card {
	--hcl-card-accent: #e0e0e0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	max-width: 280px;
	width: 100%;
	padding: 0.65rem 1rem;
	border: none;
	border-left: 5px solid var(--hcl-card-accent);
	border-radius: 10px;
	background-color: color-mix(in srgb, var(--hcl-card-accent) 22%, white);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	cursor: pointer;
	text-align: center !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hcl-schedule button.hcl-card {
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	color: inherit;
}

.hcl-schedule--public .hcl-card:not(.hcl-card--linked) {
	cursor: default;
}

.hcl-schedule a.hcl-card {
	text-decoration: none;
	color: inherit;
}

.hcl-schedule--public a.hcl-card--linked {
	cursor: pointer;
}

.hcl-schedule .hcl-card:hover,
.hcl-schedule a.hcl-card:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hcl-schedule a.hcl-card:focus-visible {
	outline: 2px solid var(--hcl-accent);
	outline-offset: 2px;
}

.hcl-schedule .hcl-card__title,
.hcl-schedule .hcl-card__time {
	display: block;
	width: 100%;
	text-align: center !important;
}

.hcl-schedule .hcl-card__title {
	font-family: "GopherText-Light", sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--hcl-accent);
	line-height: 1.3;
}

.hcl-schedule .hcl-card__time {
	font-size: 0.7rem;
	color: var(--hcl-accent);
	opacity: 0.85;
	margin-top: 0.15rem;
}

.hcl-slot--add {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	min-height: 52px;
	border: 1px dashed var(--hcl-border);
	border-radius: 10px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease, background 0.15s ease;
}

.hcl-schedule--admin .hcl-schedule__slots-col:hover .hcl-slot--add,
.hcl-slot--add:focus {
	opacity: 1;
}

.hcl-schedule--admin .hcl-schedule__row:hover .hcl-slot--add {
	opacity: 1;
}

.hcl-slot__add-label {
	font-size: 0.8rem;
	color: var(--hcl-accent);
}

.hcl-slot--add:hover {
	background: rgba(5, 77, 101, 0.05);
}

.hcl-schedule__legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 1rem 1.5rem;
	padding: 1.25rem 1rem 0;
	font-size: 0.85rem;
	text-align: left;
}

.hcl-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.hcl-legend__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.hcl-schedule__loading,
.hcl-schedule__empty {
	padding: 2rem;
	text-align: center;
	color: var(--hcl-accent);
	opacity: 0.7;
}

.hcl-schedule--loading .hcl-schedule__body {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.hcl-schedule__add-row {
	padding: 1rem 1.5rem;
	border-top: 1px solid var(--hcl-border);
}

/* Admin modal */
.hcl-modal {
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hcl-modal[hidden] {
	display: none;
}

.hcl-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.hcl-modal__content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 1.5rem 2rem;
	max-width: 420px;
	width: 90%;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	z-index: 1;
}

.hcl-modal__content h2 {
	margin-top: 0;
}

.hcl-form-row {
	display: flex;
	gap: 1rem;
}

.hcl-form-row span {
	flex: 1;
}

.hcl-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

/* Tablet */
@media (max-width: 900px) {
	.hcl-schedule {
		--hcl-time-col-width: 100px;
	}

	.hcl-schedule__header {
		padding: 1rem 1.25rem;
		gap: 0.75rem;
	}

	.hcl-schedule__title-wrap {
		gap: 0.5rem;
	}

	.hcl-schedule .hcl-card {
		min-width: 0;
		flex: 1 1 calc(50% - 0.375rem);
		max-width: none;
	}
}

/* Mobile */
@media (max-width: 640px) {
	.hcl-schedule {
		--hcl-time-col-width: 100%;
	}

	.hcl-schedule__panel {
		border-radius: 12px;
		overflow: hidden;
	}

	.hcl-schedule__header {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"hours calendar"
			"title title";
		padding: 1rem;
		gap: 0.65rem;
	}

	.hcl-schedule__hours {
		grid-area: hours;
		justify-content: flex-start;
		font-size: 0.75rem;
		min-width: 0;
	}

	.hcl-schedule__hours-text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.hcl-schedule__calendar-wrap {
		grid-area: calendar;
	}

	.hcl-schedule__title-wrap {
		grid-area: title;
		justify-content: center;
		flex-wrap: wrap;
		gap: 0.35rem 0.5rem;
		width: 100%;
	}

	.hcl-schedule__title {
		white-space: normal;
		text-align: center;
		font-size: clamp(1rem, 4.5vw, 1.25rem);
		line-height: 1.25;
		flex: 1 1 100%;
		order: -1;
	}

	.hcl-schedule__nav--image .hcl-icon--img {
		height: 26px;
		max-width: 40px;
	}

	.hcl-schedule__today-btn {
		height: 36px;
		padding: 0 0.65rem;
		font-size: 0.72rem;
	}

	.hcl-schedule__calendar-btn {
		width: 36px;
		height: 36px;
	}

	.hcl-datepicker {
		right: 0;
		left: auto;
		width: min(280px, calc(100vw - 2rem));
	}

	.hcl-schedule__row {
		grid-template-columns: 1fr;
		grid-template-areas:
			"time"
			"slots";
		min-height: 0;
	}

	.hcl-schedule__time-col {
		grid-area: time;
		border-right: none;
		border-bottom: 1px solid var(--hcl-border);
		padding: 0.65rem 1rem;
	}

	.hcl-schedule__time-label {
		font-size: 0.75rem;
	}

	.hcl-schedule__slots-col {
		grid-area: slots;
		flex-direction: column;
		align-items: stretch;
		overflow-x: visible;
		padding: 0.75rem;
		gap: 0.65rem;
	}

	.hcl-schedule .hcl-card {
		min-width: 0;
		max-width: none;
		width: 100%;
		flex: none;
	}

	.hcl-slot--add {
		min-width: 0;
		width: 100%;
	}

	.hcl-schedule__legend {
		padding: 1rem 0.75rem 0;
		gap: 0.65rem 1rem;
		font-size: 0.8rem;
	}

	.hcl-schedule__loading,
	.hcl-schedule__empty {
		padding: 1.5rem 1rem;
		font-size: 0.9rem;
	}

	.hcl-schedule__add-row {
		padding: 0.75rem 1rem;
	}
}

/* Small phones */
@media (max-width: 400px) {
	.hcl-schedule__header {
		padding: 0.85rem;
	}

	.hcl-schedule__hours-icon {
		display: none;
	}

	.hcl-schedule__calendar-actions {
		gap: 0.35rem;
	}

	.hcl-schedule__today-btn {
		padding: 0 0.5rem;
		letter-spacing: 0.02em;
	}

	.hcl-legend__item {
		flex: 1 1 calc(50% - 0.5rem);
		min-width: 0;
	}
}

/* Touch devices: admin “add lesson” always visible */
@media (hover: none) {
	.hcl-schedule--admin .hcl-slot--add {
		opacity: 1;
	}
}

/* Week overview — left column shows day/date only */
.hcl-schedule--week .hcl-schedule__time-label {
	line-height: 1.35;
	white-space: normal;
}

.hcl-schedule__row--today .hcl-schedule__time-col {
	background: color-mix(in srgb, var(--hcl-accent) 6%, transparent);
}
