/**
 * Temporary-hours notice dialog.
 *
 * Kept out of locations.css because that stylesheet depends on Leaflet and is
 * only enqueued where the directory shortcode runs — a single clinic page loads
 * neither, so the dialog rendered completely unstyled.
 */

/* ── Temporary-hours notice ────────────────────────────────────────────────
   Beta audit: a scheduled pop-up announcing temporary hours on a clinic page,
   without editing that clinic's real hours. Native <dialog>, so focus trap,
   ESC and the backdrop come from the platform. */
.gvhc-notice-dialog {
	max-width: 30rem;
	width: calc(100% - 2rem);
	padding: 28px;
	/* Centred by translation, not by `inset:0; margin:auto`. The UA default for
	   <dialog> centres with auto margins, and the theme's reset zeroes margins
	   on everything — so the pop-up was pinned to the top-left corner. A
	   transform can't be undone by a margin rule. */
	position: fixed;
	inset: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-height: calc(100vh - 4rem);
	overflow-y: auto;
	border: 0;
	border-top: 6px solid var(--color-gvhc-green, #81bd41);
	border-radius: 14px;
	background: #fff;
	color: var(--color-dark-navy, #0b1a3b);
	box-shadow: 0 18px 50px -12px rgba(11, 26, 59, .45);
}
.gvhc-notice-dialog::backdrop { background: rgba(11, 26, 59, .55); }
.gvhc-notice-dialog__title {
	margin: 0 0 10px;
	font-family: var(--font-heading, inherit);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
}
.gvhc-notice-dialog__body { margin: 0 0 22px; font-size: 1rem; line-height: 1.6; white-space: pre-line; }
.gvhc-notice-dialog__body a { color: inherit; text-decoration: underline; }
.gvhc-notice-dialog__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--color-gvhc-blue, #073d94);
	color: #fff;
	font-family: var(--font-heading, inherit);
	font-size: .9375rem;
	font-weight: 700;
	cursor: pointer;
}
.gvhc-notice-dialog__close:hover { opacity: .9; }
.gvhc-notice-dialog__close:focus-visible { outline: 3px solid var(--color-gvhc-green, #81bd41); outline-offset: 2px; }

/* Fallback for browsers without dialog.showModal(): render inline and legible
   rather than as an invisible element. */
.gvhc-notice-dialog[open]:not(:modal) {
	position: static;
	inset: auto;
	transform: none;
	margin: 24px auto;
	max-height: none;
}
