/**
 * Booking notice — per-doctor "Важно" popup (assets/js/booking-notice.js).
 *
 * Plain CSS (no build), enqueued by inc/booking-notice.php next to the booking
 * modal. Native <dialog> in the top layer, so it covers the booking modal.
 * Colours follow the theme tokens: primary #292521, light bg #F2EEE9.
 */

.zd-booking-notice {
	box-sizing: border-box;
	width: min(40rem, calc(100vw - 2rem));
	max-width: none;
	max-height: calc(100dvh - 4rem);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 1.5rem;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--overlay);
	overflow: auto;
}

.zd-booking-notice[open] {
	animation: zd-booking-notice-in 0.2s ease-out;
}

.zd-booking-notice::backdrop {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 60%, transparent);
}

.zd-booking-notice__panel {
	position: relative;
	padding: 2.5rem;
}

.zd-booking-notice__title {
	margin: 0 0 1rem;
	padding-right: 3rem;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
}

.zd-booking-notice__text {
	margin: 0 0 2rem;
	font-size: 1.0625rem;
	line-height: 1.6;
	white-space: pre-line;
	color: inherit;
}

.zd-booking-notice__close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--bg-color-light);
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.zd-booking-notice__close:hover {
	opacity: 0.8;
}

.zd-booking-notice__ok {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 11rem;
	min-height: 3.25rem;
	padding: 0.75rem 2rem;
	border: 0;
	border-radius: 0.75rem;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font: inherit;
	font-size: 1.0625rem;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.zd-booking-notice__ok:hover {
	opacity: 0.85;
}

.zd-booking-notice__close:focus-visible,
.zd-booking-notice__ok:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
}

@keyframes zd-booking-notice-in {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Phones: a bottom sheet across the full width, full-width button. */
@media (max-width: 767px) {
	.zd-booking-notice {
		width: 100vw;
		max-height: 90dvh;
		margin: auto 0 0;
		border-radius: 1.5rem 1.5rem 0 0;
	}

	.zd-booking-notice[open] {
		animation-name: zd-booking-notice-up;
	}

	.zd-booking-notice__panel {
		padding: 2rem 1.25rem 1.5rem;
	}

	.zd-booking-notice__title {
		font-size: 1.25rem;
	}

	.zd-booking-notice__ok {
		width: 100%;
	}

	@keyframes zd-booking-notice-up {
		from {
			transform: translateY(100%);
		}
		to {
			transform: none;
		}
	}
}
