/* ==========================================================================
   Pop-up message
   Site-wide notice card rendered by argyll/popup-message at wp_body_open.

   Layering: above the header (1000) and mobile drawer (1300), below the
   gallery lightbox (9999), the booking widget and the cookie consent banner,
   which must stay visible and clickable while the pop-up is open.

   The card is centred in the top two-thirds of the viewport so it never
   overlaps the consent banner floating at the bottom.
   ========================================================================== */

.argyll-popup {
	--argyll-popup-inset: var(--spacing-content-gap);
	--argyll-popup-zone: 66.667vh;

	inset: 0;
	pointer-events: none;
	position: fixed;
	z-index: 1400;
}

@supports (height: 100dvh) {
	.argyll-popup {
		--argyll-popup-zone: 66.667dvh;
	}
}

.argyll-popup[hidden] {
	display: none;
}

.argyll-popup__backdrop {
	background: color-mix(in srgb, var(--color-neutral-black) 55%, transparent);
	inset: 0;
	opacity: 0;
	pointer-events: auto;
	position: absolute;
	transition: opacity 240ms ease;
}

.argyll-popup__stage {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	height: var(--argyll-popup-zone);
	justify-content: center;
	left: 0;
	padding: var(--argyll-popup-inset);
	position: absolute;
	right: 0;
	top: 0;
}

.argyll-popup__dialog {
	background: var(--color-surface-base);
	border-radius: var(--radius-image);
	box-shadow: var(--shadow-popover);
	box-sizing: border-box;
	color: var(--color-text-primary);
	max-height: 100%;
	max-width: 640px;
	opacity: 0;
	overflow-y: auto;
	padding: 64px 56px 56px;
	pointer-events: auto;
	position: relative;
	transform: translateY(-16px);
	transition: opacity 240ms ease, transform 240ms ease;
	width: 100%;
}

/* Focus lands on the card so it is announced; the card itself isn't a control. */
.argyll-popup__dialog:focus {
	outline: none;
}

.argyll-popup.is-open .argyll-popup__backdrop,
.argyll-popup.is-open .argyll-popup__dialog {
	opacity: 1;
}

.argyll-popup.is-open .argyll-popup__dialog {
	transform: none;
}

.argyll-popup__close {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 1px solid color-mix(in srgb, var(--color-text-primary) 20%, transparent);
	border-radius: var(--radius-pill);
	color: var(--color-text-primary);
	cursor: pointer;
	display: inline-flex;
	height: 44px;
	justify-content: center;
	padding: 0;
	position: absolute;
	right: 16px;
	top: 16px;
	transition: background-color 200ms ease, border-color 200ms ease;
	width: 44px;
}

.argyll-popup__close svg {
	display: block;
	height: 24px;
	width: 24px;
}

.argyll-popup__close:hover,
.argyll-popup__close:focus-visible {
	background: var(--color-surface-subtle);
	border-color: var(--color-text-primary);
}

.argyll-popup__message {
	font-family: var(--font-family-body);
	font-size: var(--font-size-nav);
	font-weight: var(--font-weight-body-regular);
	line-height: 1.4;
	margin: 0;
	text-align: center;
	text-wrap: balance;
}

.argyll-popup__message strong {
	font-weight: var(--font-weight-body-semibold);
}

.argyll-popup__message a {
	color: var(--color-action-primary);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.argyll-popup__message a[href^="tel:"] {
	white-space: nowrap;
}

/* Phones: the consent banner is tall, so pin the card to the top of its zone. */
@media (max-width: 767px) {
	.argyll-popup {
		--argyll-popup-inset: var(--spacing-component-gap-small);
	}

	.argyll-popup__stage {
		align-items: flex-start;
	}

	.argyll-popup__dialog {
		border-radius: var(--radius-image-compact);
		padding: 68px 24px 32px;
	}

	.argyll-popup__close {
		right: 12px;
		top: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.argyll-popup__backdrop,
	.argyll-popup__dialog,
	.argyll-popup__close {
		transition: none;
	}

	.argyll-popup__dialog {
		transform: none;
	}
}

/* --------------------------------------------------------------------------
   Site Editor preview: the same card, in normal flow instead of an overlay.
   -------------------------------------------------------------------------- */

.argyll-popup-editor {
	align-items: center;
	background: color-mix(in srgb, var(--color-neutral-black) 55%, transparent);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-component-gap-small);
	padding: var(--spacing-component-gap) var(--spacing-content-gap);
}

.argyll-popup-editor .argyll-popup__dialog {
	opacity: 1;
	transform: none;
}

.argyll-popup-editor .argyll-popup__close {
	cursor: default;
}

.argyll-popup-editor.is-disabled .argyll-popup__dialog {
	opacity: 0.55;
}

.argyll-popup-editor__status {
	background: var(--color-surface-base);
	border-radius: var(--radius-pill);
	color: var(--color-text-primary);
	font-family: var(--font-family-body);
	font-size: var(--font-size-caption);
	font-weight: var(--font-weight-body-semibold);
	margin: 0;
	padding: 6px 16px;
}
