/* Porta il modulo sopra eventuali livelli trasparenti del page builder
   (es. ::before delle sezioni Elementor) che altrimenti coprono il pulsante. */
.wpcf7:has([data-bf-slots]) {
	position: relative;
	z-index: 2;
}

/* Colori sovrascrivibili dal tema: .bf-slots { --bf-accent: #... } */
.bf-slots {
	--bf-accent: #b5487a;
	--bf-accent-ink: #ffffff;
	--bf-border: #d9d4d6;
	--bf-muted: #8a8285;
	--bf-surface: #ffffff;
	--bf-surface-alt: #faf7f8;
	--bf-radius: 10px;
	display: block;
	margin: 0 0 1.5em;
}

.bf-slots__intro,
.bf-slots__closed {
	display: block;
	margin-bottom: 1em;
	color: var(--bf-muted);
}

.bf-slots__notice {
	display: block;
	margin: 0 0 1em;
	padding: .75em 1em;
	border-radius: var(--bf-radius);
	background: #fff4e5;
	color: #7a4b00;
}

.bf-clinic {
	display: block;
	margin-bottom: .75em;
	border: 1px solid var(--bf-border);
	border-radius: var(--bf-radius);
	background: var(--bf-surface);
	transition: border-color .15s ease;
}

.bf-clinic.is-active {
	border-color: var(--bf-accent);
}

.bf-clinic__toggle {
	display: flex;
	align-items: center;
	gap: .75em;
	margin: 0;
	padding: 1em 1.1em;
	cursor: pointer;
	font-weight: 600;
}

.bf-clinic__toggle input {
	width: 1.15em;
	height: 1.15em;
	margin: 0;
	accent-color: var(--bf-accent);
	flex: none;
}

/* Riquadro fisso uguale per tutti i loghi: il logo si adatta senza deformarsi
   e i nomi delle cliniche restano allineati. */
.bf-slots {
	--bf-logo-w: 110px;
	--bf-logo-h: 40px;
}

.bf-clinic__logo {
	display: block;
	flex: none;
	box-sizing: border-box;
	width: var(--bf-logo-w) !important;
	height: var(--bf-logo-h) !important;
	max-width: var(--bf-logo-w) !important;
	max-height: var(--bf-logo-h) !important;
	margin: 0;
	object-fit: contain;
	object-position: center;
}

@media (max-width: 480px) {
	.bf-slots {
		--bf-logo-w: 80px;
		--bf-logo-h: 32px;
	}
}

.bf-clinic__panel {
	display: block;
	padding: 0 1.1em 1.1em;
}

.bf-clinic__panel[hidden] {
	display: none;
}

.bf-clinic__hint {
	display: block;
	margin-bottom: .6em;
	font-size: .9em;
	color: var(--bf-muted);
}

.bf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: .5em;
}

.bf-slot {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.bf-slot input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.bf-slot__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: .55em .4em;
	border: 1px solid var(--bf-border);
	border-radius: calc(var(--bf-radius) - 2px);
	background: var(--bf-surface-alt);
	line-height: 1.2;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.bf-slot__time {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.bf-slot__left {
	font-size: .75em;
	color: var(--bf-muted);
}

.bf-slot:hover .bf-slot__body {
	border-color: var(--bf-accent);
}

.bf-slot input:focus-visible + .bf-slot__body {
	outline: 2px solid var(--bf-accent);
	outline-offset: 2px;
}

.bf-slot input:checked + .bf-slot__body {
	background: var(--bf-accent);
	border-color: var(--bf-accent);
	color: var(--bf-accent-ink);
}

.bf-slot input:checked + .bf-slot__body .bf-slot__left {
	color: inherit;
	opacity: .85;
}

.bf-slot.is-full,
.bf-slot.is-elsewhere {
	cursor: not-allowed;
}

.bf-slot.is-full .bf-slot__body,
.bf-slot.is-elsewhere .bf-slot__body {
	border-color: var(--bf-border);
	background: transparent;
	color: var(--bf-muted);
}

.bf-slot.is-full .bf-slot__time {
	text-decoration: line-through;
}
