/**
 * One-time notice: Keltic Traffic Management is now BUKO Traffic & Safety.
 *
 * Colours follow the BUKO logo. What the page already gets right, such as the
 * typeface, is not overridden here. Only what must differ inside the dialog.
 */

.keltic-notice {
	--kn-primary: #363738;
	--kn-on-primary: #ffffff;
	--kn-surface: #ffffff;
	--kn-text: #363737;
	--kn-accent: #e40520;
	--kn-padding: clamp(1.75rem, 5vw, 3.5rem);

	position: fixed;
	inset: 0;
	/* Above Salient's sticky header. */
	z-index: 99999;
	display: grid;
	align-items: start;
	overflow-y: auto;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.keltic-notice[hidden] {
	display: none;
}

.keltic-notice.is-active {
	opacity: 1;
	pointer-events: auto;
}

.keltic-notice__overlay {
	position: fixed;
	inset: 0;
	background-color: rgb(0 0 0 / 0.65);
}

.keltic-notice__dialog {
	position: relative;
	box-sizing: border-box;
	width: min(92vw, 40rem);
	margin: clamp(1rem, 8vh, 6rem) auto;
	padding: var(--kn-padding);
	border-top: 0.375rem solid var(--kn-accent);
	background-color: var(--kn-surface);
	color: var(--kn-text);
	box-shadow: 0 1.25rem 2.5rem rgb(0 0 0 / 0.25);
	text-align: left;
}

.keltic-notice__dialog p {
	margin: 0 0 0.75rem;
	/* Salient adds padding below paragraphs, which would give uneven spacing
	   above the button. */
	padding: 0;
	text-wrap: pretty;
}

.keltic-notice__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	box-sizing: border-box;
	min-width: 2.75rem;
	min-height: 2.75rem;
	border: 0;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.keltic-notice__close:hover {
	background-color: rgb(0 0 0 / 0.06);
}

.keltic-notice__close:focus-visible {
	outline: 2px solid var(--kn-accent);
	outline-offset: 2px;
}

.keltic-notice__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(1.25rem, 4vw, 2.5rem);
	margin-block-end: 2rem;
}

.keltic-notice__logos img {
	width: auto;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

/* Each logo gets its own height. The Keltic logo is a tall block with a
   tagline below it, the BUKO logo a long, thin wordmark, so a shared height
   makes the BUKO logo far too wide. */
.keltic-notice__logo-keltic {
	/* The live file is 292x116; larger would look soft. */
	max-height: 3.5rem;
}

.keltic-notice__logo-buko {
	max-height: 1.5rem;
}

.keltic-notice__title {
	margin: 0 0 0.75rem;
	padding: 0;
	color: var(--kn-primary);
	font-size: clamp(1.375rem, 2.5vw, 2rem);
	line-height: 1.2;
	text-wrap: balance;
}

.keltic-notice__actions {
	margin-block: 1.5rem 0;
}

.keltic-notice__button {
	display: inline-block;
	box-sizing: border-box;
	border: 0;
	padding: 0.75rem 1.5rem;
	border-radius: 0.25rem;
	background-color: var(--kn-accent);
	color: var(--kn-on-primary);
	/* Salient gives buttons their own typeface and size. */
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.keltic-notice__button:hover,
.keltic-notice__button:focus {
	background-color: var(--kn-primary);
	color: var(--kn-on-primary);
}

.keltic-notice__button:focus-visible {
	outline: 2px solid var(--kn-accent);
	outline-offset: 2px;
}

body.keltic-notice-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.keltic-notice {
		transition: none;
	}
}
