/*
 * Nur --smt-* aus tokens.css. Eine Klasse Spezifität, damit das Projekt überschreiben kann.
 * :where(.smt) allein verliert gegen die Browser-Styles von button und input.
 */

:where(.smt),
:where(.smt) * {
	box-sizing: border-box;
}

:where(.smt) {
	color: var(--smt-text);
	font-size: var(--smt-text-m);
	line-height: 1.5;
}

:where(.smt-booking) {
	position: relative;
	container-type: inline-size;
	container-name: smt;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: break-word;
	scroll-margin-top: var(--smt-scroll-margin);
}

:where(.smt) .smt-booking__body {
	display: flex;
	flex-direction: column;
	gap: var(--smt-gap);
	min-width: 0;
}

:where(.smt) .smt-booking__live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:where(.smt) .smt-booking__zone {
	margin: 0 0 var(--smt-space-s);
	color: var(--smt-text-muted);
	font-size: var(--smt-text-s);
}

:where(.smt) .smt-booking__title,
:where(.smt) .smt-offer__title,
:where(.smt) .smt-slots__title,
:where(.smt) .smt-calendar__label,
:where(.smt) .smt-course-date__title {
	margin: 0;
	color: var(--smt-text);
	line-height: 1.3;
}

:where(.smt) .smt-booking__title {
	font-size: var(--smt-heading-size);
	scroll-margin-top: var(--smt-scroll-margin);
}

:where(.smt) .smt-offer__title,
:where(.smt) .smt-course-date__title {
	font-size: var(--smt-card-title-size);
}

:where(.smt) .smt-slots__title,
:where(.smt) .smt-calendar__label {
	font-size: var(--smt-text-l);
}

:where(.smt) .smt-steps,
:where(.smt) .smt-offer__meta,
:where(.smt) .smt-form__hint,
:where(.smt) .smt-slots__hint {
	margin: 0;
	color: var(--smt-text-muted);
	font-size: var(--smt-text-s);
}

:where(.smt) .smt-offers,
:where(.smt) .smt-course-dates {
	display: grid;
	align-items: stretch;
	gap: var(--smt-gap);
}

:where(.smt) .smt-offer,
:where(.smt) .smt-course-date,
:where(.smt) .smt-summary {
	min-width: 0;
	padding: var(--smt-card-padding);
	background: var(--smt-card-bg);
	border: var(--smt-card-border);
	border-radius: var(--smt-card-radius);
	box-shadow: var(--smt-card-shadow);
}

:where(.smt) .smt-offer,
:where(.smt) .smt-course-date {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--smt-space-xs);
}

:where(.smt) .smt-offer__excerpt,
:where(.smt) .smt-course-date p {
	margin: 0;
}

:where(.smt) .smt-course-date--full {
	color: var(--smt-text-muted);
}

:where(.smt) .smt-description {
	min-width: 0;
}

:where(.smt) .smt-description--clamped {
	max-height: 9rem;
	overflow: hidden;
}

:where(.smt) .smt-time {
	display: flex;
	flex-direction: column;
	gap: var(--smt-gap);
	min-width: 0;
}

:where(.smt) .smt-calendar,
:where(.smt) .smt-slots {
	min-width: 0;
}

:where(.smt) .smt-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--smt-space-xs);
	margin-bottom: var(--smt-space-s);
}

:where(.smt) .smt-calendar__weekdays,
:where(.smt) .smt-calendar__days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: calc(var(--smt-space-xs) / 2);
}

:where(.smt) .smt-calendar__weekday {
	color: var(--smt-text-muted);
	font-size: var(--smt-text-s);
	text-align: center;
}

:where(.smt) .smt-calendar__nav,
:where(.smt) .smt-calendar__day,
:where(.smt) .smt-slot {
	min-width: 0;
	min-height: 44px;
	padding: var(--smt-space-xs);
	border: var(--smt-border);
	border-radius: var(--smt-radius);
	background: var(--smt-bg);
	color: var(--smt-text);
	font: inherit;
	font-size: var(--smt-text-m);
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
}

:where(.smt) .smt-calendar__nav {
	width: 44px;
	padding: 0;
	border-radius: var(--smt-control-radius);
}

:where(.smt) .smt-calendar__day,
:where(.smt) .smt-slot {
	width: 100%;
	border-radius: var(--smt-control-radius);
}

:where(.smt) .smt-calendar__day {
	padding-inline: 0;
	color: var(--smt-text-muted);
	text-align: center;
	cursor: default;
}

:where(.smt) .smt-calendar__day--available {
	background: var(--smt-bg);
	color: var(--smt-text);
	cursor: pointer;
}

:where(.smt) .smt-calendar__day--available:hover,
:where(.smt) .smt-slot:hover:not(:disabled),
:where(.smt) .smt-calendar__nav:hover {
	border-color: var(--smt-primary);
}

:where(.smt) .smt-calendar__day--today {
	box-shadow: inset 0 -2px 0 var(--smt-border-color);
}

:where(.smt) .smt-calendar__day--current,
:where(.smt) .smt-slot--current,
:where(.smt) .smt-course-date--current {
	border-color: var(--smt-primary);
	border-style: dashed;
}

:where(.smt) .smt-slot:disabled {
	cursor: default;
}

:where(.smt) .smt-legend {
	display: flex;
	align-items: center;
	gap: var(--smt-space-xs);
	margin: var(--smt-space-s) 0 0;
	color: var(--smt-text-muted);
	font-size: var(--smt-text-s);
}

:where(.smt) .smt-legend__mark {
	flex: 0 0 auto;
	width: var(--smt-text-m);
	height: var(--smt-text-m);
	border: var(--smt-border);
	border-color: var(--smt-primary);
	border-style: dashed;
	border-radius: var(--smt-control-radius);
	background: var(--smt-bg);
}

:where(.smt) .smt-calendar__day--selected,
:where(.smt) .smt-slot:focus {
	background: var(--smt-primary-ultra-light);
	border-width: 1px;
	border-color: var(--smt-primary);
	box-shadow: inset 0 0 0 1px var(--smt-primary);
	color: var(--smt-text);
}

:where(.smt) .smt-calendar__day--today.smt-calendar__day--selected {
	box-shadow: inset 0 0 0 1px var(--smt-primary), inset 0 -2px 0 var(--smt-border-color);
}

:where(.smt) .smt-calendar__day:disabled,
:where(.smt) .smt-calendar__nav:disabled {
	border-color: transparent;
	background: transparent;
	color: var(--smt-text-muted);
	cursor: default;
}

:where(.smt) .smt-calendar__day:focus,
:where(.smt) .smt-calendar__nav:focus,
:where(.smt) .smt-slot:focus,
:where(.smt) .smt-link:focus,
:where(.smt) .smt-field__input:focus,
:where(.smt) .smt-choice input:focus {
	outline: var(--smt-focus-width) solid var(--smt-focus);
	outline-offset: var(--smt-focus-offset);
}

:where(.smt) .smt-slots__title {
	margin-bottom: var(--smt-space-s);
}

:where(.smt) .smt-slots__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 5.5rem), 1fr));
	gap: var(--smt-grid-gap);
}

:where(.smt) .smt-summary dl {
	display: grid;
	gap: var(--smt-space-xs);
	margin: 0;
}

:where(.smt) .smt-summary__row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--smt-space-xs);
}

:where(.smt) .smt-summary dt {
	margin: 0;
	color: var(--smt-text-muted);
}

:where(.smt) .smt-summary dd {
	margin: 0;
}

:where(.smt) .smt-form {
	display: flex;
	flex-direction: column;
	gap: var(--smt-space-s);
	min-width: 0;
}

:where(.smt) .smt-field {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--smt-space-xs);
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

:where(.smt) .smt-field__label,
:where(.smt) .smt-field legend {
	padding: 0;
	color: var(--smt-text);
	font-size: var(--smt-text-m);
}

:where(.smt) .smt-field__mark {
	color: var(--smt-danger);
}

:where(.smt) .smt-field__input {
	width: 100%;
	min-height: 44px;
	padding: var(--smt-space-xs);
	border: var(--smt-border);
	border-radius: var(--smt-control-radius);
	background: var(--smt-bg);
	color: var(--smt-text);
	font: inherit;
	font-size: var(--smt-text-m);
}

:where(.smt) textarea.smt-field__input {
	min-height: 8rem;
	resize: vertical;
}

:where(.smt) .smt-field__input[aria-invalid="true"] {
	border-color: var(--smt-danger);
}

:where(.smt) .smt-field__help {
	margin: 0;
	color: var(--smt-text-muted);
	font-size: var(--smt-text-s);
}

:where(.smt) .smt-field__error {
	margin: 0;
	color: var(--smt-danger);
	font-size: var(--smt-text-s);
}

:where(.smt) .smt-choice {
	display: flex;
	align-items: flex-start;
	gap: var(--smt-space-xs);
	min-height: 44px;
}

:where(.smt) .smt-choice input {
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

:where(.smt) input[type="checkbox"],
:where(.smt) input[type="radio"] {
	accent-color: var(--smt-primary);
}

:where(.smt) .smt-hp-clip {
	position: relative;
	width: 0;
	height: 0;
	overflow: hidden;
}

:where(.smt) .smt-hp {
	position: absolute;
	left: -9999px;
}

:where(.smt) .smt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--smt-space-s);
}

:where(.smt) .smt-actions button,
:where(.smt) .smt-actions a,
:where(.smt) .smt-offer > button,
:where(.smt) .smt-course-date > button {
	min-height: 44px;
	max-width: 100%;
	white-space: normal;
}

:where(.smt) .smt-offer > button {
	margin-top: auto;
}

:where(.smt) .smt-link {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--smt-primary);
	font: inherit;
	font-size: var(--smt-text-s);
	text-align: left;
	text-decoration: underline;
	cursor: pointer;
}

:where(.smt) .smt-notice,
:where(.smt__notice) {
	margin: 0;
	padding: var(--smt-space-m);
	background: var(--smt-bg-alt);
	border-radius: var(--smt-radius);
	color: var(--smt-text);
}

:where(.smt) .smt-notice--error {
	color: var(--smt-danger);
	background: var(--smt-bg);
	border: 1px solid var(--smt-danger);
}

:where(.smt) .smt-notice--error a {
	color: var(--smt-danger);
}

:where(.smt) .smt-notice--success {
	color: var(--smt-success);
}

:where(.smt) .smt-notice ul {
	margin: var(--smt-space-xs) 0 0;
	padding-left: var(--smt-space-m);
}

:where(.smt--own-buttons) .smt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: var(--smt-space-xs) var(--smt-space-m);
	border: var(--smt-border);
	border-radius: var(--smt-radius-pill);
	background: var(--smt-bg);
	color: var(--smt-text);
	font: inherit;
	font-size: var(--smt-text-m);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

:where(.smt--own-buttons) .smt-btn--primary {
	border-color: transparent;
	background: var(--smt-primary);
	color: var(--smt-on-primary);
}

:where(.smt--own-buttons) .smt-btn--primary:hover {
	background: var(--smt-primary-hover);
}

:where(.smt--own-buttons) .smt-btn:focus {
	outline: var(--smt-focus-width) solid var(--smt-focus);
	outline-offset: var(--smt-focus-offset);
}

:where(.smt--own-buttons) .smt-btn:disabled {
	cursor: default;
	opacity: 0.6;
}

@container smt (min-width: 30rem) {
	:where(.smt) .smt-calendar__weekdays,
	:where(.smt) .smt-calendar__days {
		gap: var(--smt-space-xs);
	}
}

@container smt (min-width: 40rem) {
	:where(.smt) .smt-offers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	:where(.smt) .smt-time {
		display: grid;
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
		align-items: start;
	}
}

:where(.smt-manage) {
	position: relative;
	container-type: inline-size;
	container-name: smt;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--smt-space-m);
	min-width: 0;
	max-width: 100%;
	scroll-margin-top: var(--smt-scroll-margin);
}

:where(.smt-manage) .smt-summary,
:where(.smt-manage) .smt-booking__body {
	width: 100%;
}

:where(.smt-manage) p {
	margin: 0;
}

:where(.smt-manage) p.smt-legend {
	margin: var(--smt-space-s) 0 0;
}
