/* SimplyWhen appointment teaser – fixed heights, so loading causes no layout shift. */
.sw-teaser {
	--sw-slot-h: 56px;
	box-sizing: border-box;
	width: 100%;
	max-width: 520px;
	margin: 0 0 1.5em;
	padding: 20px;
	border: 1px solid #d0d7de;
	border-radius: 12px;
	background: #fff;
	color: #1f2328;
	font-size: 16px;
	line-height: 1.4;
}

.sw-teaser *,
.sw-teaser *::before,
.sw-teaser *::after {
	box-sizing: border-box;
}

.sw-teaser__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 12px;
}

div.sw-teaser .sw-teaser__photo img {
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

/* "div.sw-teaser …": stronger than theme rules like ".entry-content p / ul / a". */
div.sw-teaser p {
	margin: 0;
}

div.sw-teaser p.sw-teaser__heading {
	margin: 0 0 14px;
	font-size: 1.2em;
	font-weight: 700;
	line-height: 1.3;
	color: #1f2328;
}

.sw-teaser__name {
	font-weight: 700;
}


/* The hint line is always reserved (visibility, not display): no layout shift when it appears. */
div.sw-teaser p.sw-teaser__hint {
	min-height: 1.4em;
	margin: 0 0 10px;
	font-weight: 600;
	color: #1f2328;
	visibility: hidden;
}

div.sw-teaser p.sw-teaser__hint.is-shown {
	visibility: visible;
}

div.sw-teaser p.sw-teaser__hint::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin: 0 8px 1px 0;
	border-radius: 50%;
	background: var(--sw-primary, #1d4ed8);
}

div.sw-teaser ul.sw-teaser__slots {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	min-height: calc(var(--sw-teaser-rows, 2) * var(--sw-slot-h) + (var(--sw-teaser-rows, 2) - 1) * 10px);
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

div.sw-teaser ul.sw-teaser__slots > li {
	margin: 0;
	padding: 0;
}

.sw-teaser__placeholder {
	height: var(--sw-slot-h);
	border-radius: 8px;
	background: linear-gradient(90deg, #eef1f4 25%, #f6f8fa 50%, #eef1f4 75%);
	background-size: 200% 100%;
	animation: sw-teaser-pulse 1.4s ease-in-out infinite;
}

@keyframes sw-teaser-pulse {
	from { background-position: 100% 0; }
	to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.sw-teaser__placeholder {
		animation: none;
	}
}

div.sw-teaser a.sw-teaser__slot {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: var(--sw-slot-h); /* Same as the placeholder: no layout shift. */
	padding: 2px 12px;
	overflow: hidden;
	border: 2px solid var(--sw-primary, #1d4ed8);
	border-radius: 8px;
	color: #1f2328;
	text-decoration: none;
	text-align: center;
}

div.sw-teaser a.sw-teaser__slot:hover,
div.sw-teaser a.sw-teaser__slot:focus-visible {
	background: var(--sw-primary, #1d4ed8);
	color: var(--sw-on-primary, #fff);
	text-decoration: none;
}

div.sw-teaser a.sw-teaser__slot:focus-visible {
	outline: 3px solid #1f2328;
	outline-offset: 2px;
}

.sw-teaser__day {
	font-size: 14px;
	line-height: 1.3;
}

.sw-teaser__time {
	line-height: 1.3;
}

.sw-teaser__time {
	font-weight: 700;
}

.sw-teaser__none {
	grid-column: 1 / -1;
	align-self: center;
}

div.sw-teaser .sw-teaser__none p {
	margin: 0 0 10px;
}

a.sw-teaser__callback,
a.sw-cta {
	display: inline-block;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--sw-primary, #1d4ed8);
	color: var(--sw-on-primary, #fff);
	font-weight: 700;
	text-decoration: none;
}

div.sw-teaser a.sw-teaser__all {
	font-weight: 600;
	color: #1f2328;
}

a.sw-teaser__callback:hover,
a.sw-cta:hover {
	color: var(--sw-on-primary, #fff);
	filter: brightness(0.95);
}

@media (max-width: 420px) {
	.sw-teaser {
		padding: 16px;
	}

	div.sw-teaser ul.sw-teaser__slots {
		grid-template-columns: 1fr;
		min-height: calc(var(--sw-teaser-count, 4) * var(--sw-slot-h) + (var(--sw-teaser-count, 4) - 1) * 10px);
	}
}

/* Thank-you page [simplywhen_confirmation] */
.sw-confirmation {
	max-width: 640px;
	margin: 0 0 1.5em;
}

.sw-confirmation__list {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 0 0 12px;
}

.sw-confirmation__list dt {
	color: #57606a;
}

.sw-confirmation__list dd {
	margin: 0;
	font-weight: 600;
}

.sw-confirmation__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.sw-confirmation__manage {
	color: inherit;
}

/* Themes often underline all content links with ID selectors (e.g. "body #content a"),
   which no class rule can beat: buttons of the teaser stay without underline. */
div.sw-teaser a.sw-teaser__slot,
div.sw-teaser a.sw-teaser__slot span,
a.sw-teaser__callback,
a.sw-cta {
	text-decoration: none !important;
}
