.hm-appointment {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
	align-items: center;
	gap: clamp(2rem, 4vw, 5rem);
	width: 100%;
	padding: var(--hm-layout-section-top) var(--hm-layout-gutter) var(--hm-layout-section-bottom);
	background: linear-gradient(135deg, var(--hm-color-surface-medium) 0%, var(--hm-color-border-strong) 100%);
}

.hm-appointment__intro {
	display: grid;
	gap: clamp(0.8rem, 1.1vw, 1.2rem);
}

.hm-appointment__title {
	margin: 0;
	color: var(--hm-color-text);
	font-size: clamp(2rem, 3vw, 3.4rem);
	font-weight: 400;
	line-height: 1.05;
}

.hm-appointment__text {
	max-width: 34rem;
	margin: 0;
	color: var(--hm-color-text);
	font-size: clamp(1rem, 1.05vw, 1.15rem);
	line-height: 1.45;
}

.hm-appointment__actions {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 1.4vw, 1.5rem);
}

/*
 * Alle Termin-Buttons verwenden dieselbe helle Grunddarstellung.
 * Der jeweilige Bereich liefert Farbe und Kontrast ausschließlich über die
 * gemeinsamen Palettenvariablen.
 */
.hm-appointment__button {
	display: grid;
	grid-column: span 2;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.55fr);
	min-width: 0;
	height: 4rem;
	overflow: hidden;
	border: 1px solid var(--hm-color-accent);
	border-radius: 0.45em;
	background: var(--hm-color-surface);
	color: var(--hm-color-text);
	text-decoration: none;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.hm-appointment__button:only-child {
	grid-column: 2 / span 2;
}

.hm-appointment__button-logo,
.hm-appointment__button-text {
	display: flex;
	align-items: center;
}

/*
 * Der Logo-Bereich erhält eine eigene helle Fläche und eine klare Trennlinie.
 * Dadurch bleiben Anbieterlogo und Aktionstext auch im hellen Zustand als zwei
 * zusammengehörige, aber eindeutig getrennte Bereiche lesbar.
 */
.hm-appointment__button-logo {
	justify-content: center;
	padding: 0.55rem clamp(0.85rem, 1vw, 1.1rem);
	border-right: 1px solid var(--hm-color-border-strong);
	background: var(--hm-color-surface-soft);
	transition: background-color 160ms ease, border-color 160ms ease;
}

.hm-appointment__provider-mark {
	display: block;
	width: min(100%, 8.5rem);
	height: min(100%, 2.7rem);
	background: var(--hm-color-accent);
	-webkit-mask-image: var(--hm-provider-logo-mask);
	mask-image: var(--hm-provider-logo-mask);
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	transition: background-color 160ms ease;
}

.hm-appointment__button-text {
	padding: 0.55rem clamp(1.15rem, 1.6vw, 1.75rem);
	font-size: clamp(1rem, 1.2vw, 1.3rem);
	line-height: 1.15;
}

/* Optionale Akzentfarbe für textbasierte Termin-Aktionen. */
.hm-appointment__button-text--accent {
	color: var(--hm-color-accent);
}

/* Beim Hover wird die komplette Aktion dunkel und ihr Inhalt hell. */
.hm-appointment__button:hover,
.hm-appointment__button:focus-visible {
	border-color: var(--hm-color-accent-hover);
	background: var(--hm-color-accent-hover);
	color: var(--hm-color-surface);
}

.hm-appointment__button:hover .hm-appointment__button-logo,
.hm-appointment__button:focus-visible .hm-appointment__button-logo {
	border-right-color: var(--hm-color-surface);
	background: var(--hm-color-accent-hover);
}

.hm-appointment__button:hover .hm-appointment__button-text--accent,
.hm-appointment__button:focus-visible .hm-appointment__button-text--accent {
	color: var(--hm-color-surface);
}

.hm-appointment__button:hover .hm-appointment__provider-mark,
.hm-appointment__button:focus-visible .hm-appointment__provider-mark {
	background: var(--hm-color-surface);
}

.hm-appointment__button:focus-visible {
	outline: 2px solid var(--hm-color-accent);
	outline-offset: 3px;
}

@media (max-width: 1050px) {
	.hm-appointment {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.hm-appointment__actions {
		grid-template-columns: 1fr;
	}

	.hm-appointment__button,
	.hm-appointment__button:only-child {
		grid-column: auto;
		grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
		height: auto;
		min-height: 4rem;
	}
}
