/**
 * Kiosk message banner — premium hospitality alert (V2 redesign).
 *
 * Design language: Relais & Châteaux luxury vibe — frosted glass on navy,
 * gold gilt for the dismiss action, hairline gold rule per level, Marcellus
 * serif eyebrow when available, never blocky.
 *
 * Layout: floating capsule, max-width 1100px, centered top:18px. Pure overlay
 * (page content NOT pushed down). Dot indicator chip sits below the capsule.
 */

:root {
	--gs-kmb-navy:        #152840;
	--gs-kmb-navy-deep:   #0d1a2c;
	--gs-kmb-gold:        #c49a3a;
	--gs-kmb-gold-soft:   #d8b765;
	--gs-kmb-ivory:       #f4ecda;
	--gs-kmb-rose-warning:#a47422;
	--gs-kmb-rose-urgent: #8c2018;
	/* Overlay scale: the ambient slideshow (portal-kiosk-slideshow.css) is
	 * fixed at 9999 — the capsule stack AND the badge must sit above it. */
	--gs-kmb-z:           10000;
	--gs-kmb-inset:       18px;
	--gs-kmb-gap:         16px;
	/* Family only. The portal's --gs-font-body is a `font` SHORTHAND
	 * (weight size/line-height, design-tokens.css) — used as a font-family
	 * value it is invalid and the capsule silently fell back to the UA serif. */
	--gs-kmb-font:        'Jost', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

.gs-kiosk-message-stack {
	position: fixed;
	top: var( --gs-kmb-inset );
	left: 50%;
	transform: translateX( -50% );
	width: calc( 100% - 48px );
	max-width: 1100px;
	z-index: var( --gs-kmb-z );
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var( --gs-space-sm, 8px );
}

.gs-kiosk-message-stack[hidden] { display: none; }

/* SSR-painted stack stays invisible until the JS has applied the dismissed
 * filter — otherwise already-dismissed capsules flash for the few ms between
 * CSS paint and script execution on every reload. The JS removes the
 * attribute on its first render. */
.gs-kiosk-message-stack[data-ssr-pending="1"] {
	visibility: hidden;
}

/* The capsule is a fixed overlay: without a reserved footprint it covers
 * the first in-flow blocks of the page (PWA install banner, panel tops).
 * kiosk-inbox.js (and the legacy kiosk-message-banner.js) maintain
 * --gs-kmb-offset = capsule bottom edge + 16px breathing room while a
 * message is visible, so the portal / welcome-book shells start BELOW the
 * capsule instead of underneath it. Two guards: the sibling form for a
 * stack rendered next to the shell, the root attribute form for the inbox
 * stack, which the JS re-parents under <body>. */
.gs-kiosk-message-stack:not([hidden]) ~ .mphb-gs-shell,
.gs-kiosk-message-stack:not([hidden]) ~ .wb-shell,
:root[data-kiosk-inbox-open="1"] .mphb-gs-shell,
:root[data-kiosk-inbox-open="1"] .wb-shell {
	margin-top: var( --gs-kmb-offset, 0px );
}

/* Each item is the floating glass capsule. .is-active is foregrounded; the
 * others sit behind at lower opacity for the crossfade animation. */
.gs-kiosk-message {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	box-sizing: border-box;
	width: 100%;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 18px;
	padding: 14px 18px 14px 20px;
	color: var( --gs-kmb-ivory );
	font-family: var( --gs-kmb-font );
	font-size: 15px;
	line-height: 1.45;
	letter-spacing: 0.005em;
	background:
		linear-gradient( 135deg, rgba(21,40,64,0.92), rgba(13,26,44,0.92) );
	-webkit-backdrop-filter: blur( 18px ) saturate( 130% );
	backdrop-filter:         blur( 18px ) saturate( 130% );
	border: 1px solid rgba( 196, 154, 58, 0.32 );
	border-radius: 14px;
	box-shadow:
		0 10px 32px rgba( 0, 0, 0, 0.38 ),
		0 1px 0 rgba( 255, 255, 255, 0.04 ) inset;
	opacity: 0;
	transform: translateY( -6px );
	transition: opacity 420ms cubic-bezier( 0.16, 0.84, 0.32, 1 ),
	            transform 420ms cubic-bezier( 0.16, 0.84, 0.32, 1 );
	/* Inactive capsules are transparent but still painted ABOVE the active
	 * one (later siblings, same box): they must never swallow its taps —
	 * with two messages the first "Compris" was unreachable. */
	pointer-events: none;
	overflow: hidden;
}

.gs-kiosk-message.is-active {
	position: relative;
	opacity: 1;
	transform: translateY( 0 );
	pointer-events: auto;
}

.gs-kiosk-message[hidden],
.gs-kiosk-message[data-dismissed="true"] {
	display: none;
}

/* Hairline accent — gold rule at the top of the capsule. */
.gs-kiosk-message::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba( 216, 183, 101, 0.6 ) 18%,
		rgba( 216, 183, 101, 0.6 ) 82%,
		transparent 100%
	);
	pointer-events: none;
}

/* Icon disc — frosted gold rim. */
.gs-kiosk-message__icon {
	grid-column: 1;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba( 196, 154, 58, 0.12 );
	border: 1px solid rgba( 196, 154, 58, 0.45 );
	color: var( --gs-kmb-gold-soft );
}

.gs-kiosk-message__icon > svg {
	width: 20px;
	height: 20px;
}

.gs-kiosk-message__text {
	grid-column: 2;
	font-weight: 400;
	color: var( --gs-kmb-ivory );
}

/* Dismiss — gold gilt button, generous tap target, COMPRIS visible. */
.gs-kiosk-message__dismiss {
	grid-column: 3;
	flex: 0 0 auto;
	height: 38px;
	min-width: 116px;
	padding: 0 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba( 196, 154, 58, 0.55 );
	background: linear-gradient( 180deg, rgba( 196, 154, 58, 0.95 ), rgba( 165, 127, 47, 0.95 ) );
	color: var( --gs-kmb-navy-deep );
	font-family: var( --gs-kmb-font );
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba( 196, 154, 58, 0.32 );
	transition: background 240ms ease, box-shadow 240ms ease, transform 200ms ease;
}

.gs-kiosk-message__dismiss:hover,
.gs-kiosk-message__dismiss:focus-visible {
	background: linear-gradient( 180deg, var( --gs-kmb-gold-soft ), var( --gs-kmb-gold ) );
	box-shadow: 0 6px 16px rgba( 196, 154, 58, 0.5 );
	outline: none;
}

.gs-kiosk-message__dismiss:active {
	transform: translateY( 1px );
	box-shadow: 0 2px 6px rgba( 196, 154, 58, 0.28 );
}

/* ===== Level tinting — keep navy-glass base, vary the icon + accent ===== */

.gs-kiosk-message[data-level="info"] .gs-kiosk-message__icon {
	background: rgba( 216, 183, 101, 0.10 );
	border-color: rgba( 216, 183, 101, 0.42 );
	color: var( --gs-kmb-gold-soft );
}

.gs-kiosk-message[data-level="warning"] {
	background:
		linear-gradient( 135deg, rgba( 90, 60, 16, 0.92 ), rgba( 60, 40, 10, 0.92 ) );
	border-color: rgba( 216, 183, 101, 0.55 );
}
.gs-kiosk-message[data-level="warning"] .gs-kiosk-message__icon {
	background: rgba( 244, 236, 218, 0.14 );
	border-color: rgba( 216, 183, 101, 0.6 );
	color: var( --gs-kmb-ivory );
}

.gs-kiosk-message[data-level="urgent"] {
	background:
		linear-gradient( 135deg, rgba( 140, 32, 24, 0.94 ), rgba( 90, 16, 10, 0.94 ) );
	border-color: rgba( 244, 236, 218, 0.42 );
}
.gs-kiosk-message[data-level="urgent"] .gs-kiosk-message__icon {
	background: rgba( 244, 236, 218, 0.18 );
	border-color: rgba( 244, 236, 218, 0.6 );
	color: var( --gs-kmb-ivory );
}
.gs-kiosk-message[data-level="urgent"] .gs-kiosk-message__dismiss {
	background: linear-gradient( 180deg, var( --gs-kmb-ivory ), #e0d3b0 );
	color: var( --gs-kmb-rose-urgent );
	border-color: rgba( 244, 236, 218, 0.7 );
}

/* ===== Soft pulsing halo for urgent — refined, not aggressive ===== */
.gs-kiosk-message[data-level="urgent"].is-active {
	animation: gs-kmb-pulse 2.4s ease-in-out 0.6s infinite;
}
@keyframes gs-kmb-pulse {
	0%, 100% { box-shadow: 0 10px 32px rgba( 0, 0, 0, 0.38 ), 0 0 0 0 rgba( 192, 57, 43, 0.32 ); }
	50%      { box-shadow: 0 10px 32px rgba( 0, 0, 0, 0.38 ), 0 0 0 12px rgba( 192, 57, 43, 0    ); }
}

/* ===== Dot indicator chip — centered below the capsule ===== */
.gs-kiosk-message-stack > .gs-kiosk-message-dots {
	position: relative;
	display: inline-flex;
	gap: 8px;
	padding: 5px 11px;
	background: rgba( 13, 26, 44, 0.78 );
	-webkit-backdrop-filter: blur( 10px );
	backdrop-filter:         blur( 10px );
	border: 1px solid rgba( 196, 154, 58, 0.32 );
	border-radius: 999px;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.35 );
	pointer-events: auto;
}

.gs-kiosk-message-dots[hidden] { display: none; }

.gs-kiosk-message-dot {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.gs-kiosk-message-dot::before {
	content: '';
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba( 244, 236, 218, 0.4 );
	transition: background 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.gs-kiosk-message-dot.is-active::before {
	background: var( --gs-kmb-gold-soft );
	transform: scale( 1.35 );
	box-shadow: 0 0 8px rgba( 216, 183, 101, 0.6 );
}

.gs-kiosk-message-dot:focus-visible::before {
	box-shadow: 0 0 0 2px rgba( 244, 236, 218, 0.6 );
}

/* ===== Badge — collapsed counter, top-right pill (kiosk-inbox.js) =====
 * Info items fold into it 5 min after first seen. It has to remain a real
 * control on a tablet under the slideshow: 44 px tall, count chip + word,
 * gilt like the Compris button, above the slideshow (--gs-kmb-z). Hidden
 * while the stack shows the unfolded items. RTL mirror: rtl.css. */
.gs-kiosk-notif-badge {
	position: fixed;
	top: var( --gs-kmb-inset );
	right: var( --gs-kmb-inset );
	z-index: var( --gs-kmb-z );
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 18px 0 9px;
	border: 1px solid rgba( 244, 236, 218, 0.4 );
	border-radius: 999px;
	background: var( --gs-kmb-gold );
	color: var( --gs-kmb-navy-deep );
	font-family: var( --gs-kmb-font );
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	box-shadow:
		0 6px 18px rgba( 0, 0, 0, 0.42 ),
		0 0 0 4px rgba( 196, 154, 58, 0.22 );
	-webkit-tap-highlight-color: transparent;
	transition: box-shadow 240ms ease, transform 200ms ease;
}

/* A waiting message has to be seen from across the room, not only by whoever
 * stands at the tablet (Ahmed, 01/10/2026): a gold halo radiates from the
 * badge in a loop and the count chip beats with it. A radiating ring rather
 * than an on/off blink — it calls without flashing. */
.gs-kiosk-notif-badge:not([hidden]) {
	animation: gs-kmb-badge-call 1.8s ease-out infinite;
}
.gs-kiosk-notif-badge:not([hidden]) .gs-kiosk-notif-badge__count {
	animation: gs-kmb-badge-beat 1.8s ease-in-out infinite;
}
@keyframes gs-kmb-badge-call {
	0% {
		box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.42 ), 0 0 0 0 rgba( 196, 154, 58, 0.85 );
	}
	70%,
	100% {
		box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.42 ), 0 0 0 22px rgba( 196, 154, 58, 0 );
	}
}
@keyframes gs-kmb-badge-beat {
	0%,
	100% {
		transform: scale( 1 );
	}
	15% {
		transform: scale( 1.18 );
	}
	30% {
		transform: scale( 1 );
	}
}

/* `display: inline-flex` above beats the UA's [hidden] rule — restore it so
 * the inbox module can toggle the badge with the attribute (no inline style). */
.gs-kiosk-notif-badge[hidden] {
	display: none;
}

.gs-kiosk-notif-badge:focus-visible {
	outline: 2px solid var( --gs-kmb-ivory );
	outline-offset: 2px;
}

.gs-kiosk-notif-badge:active {
	transform: translateY( 1px );
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.36 );
}

.gs-kiosk-notif-badge__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 7px;
	border-radius: 999px;
	background: var( --gs-kmb-navy-deep );
	color: var( --gs-kmb-ivory );
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0;
}

/* While the capsule stack is open the badge drops below it (--gs-kmb-offset
 * = capsule bottom + 16 px, maintained by the JS) instead of covering the
 * Compris button at the capsule's right end. */
:root[data-kiosk-inbox-open="1"] .gs-kiosk-notif-badge {
	top: var( --gs-kmb-offset, var( --gs-kmb-inset ) );
}

/* ===== Volume selector — drawer on the right edge (kiosk-inbox.js, APK >= v105) =====
 * The guest picks the tablet message volume (low / medium / high, Ahmed
 * 11/10/2026). Ahmed 12/10/2026: a drawer on the right edge, closed by
 * default so it covers nothing; closed, the handle shows the speaker and the
 * current level. Mockup validated by Fable (64x120 handle, 3 x 52 px options
 * centred on it). Rendered hidden by the SSR partial, revealed only when the
 * native bridge exists; below the message stack so the capsules can cover it.
 * Always on the PHYSICAL right edge, RTL included: direction is pinned to ltr
 * so the handle stays left of the panel and the closed offset hides the panel. */
.gs-kiosk-volume {
	--gs-kv-panel-w: 176px;
	--gs-kv-handle-w: 64px;
	--gs-kv-bg: rgba( 13, 26, 44, 0.82 );
	--gs-kv-line: rgba( 244, 236, 218, 0.4 );
	position: fixed;
	top: 50%;
	right: 0;
	z-index: calc( var( --gs-kmb-z ) - 1 );
	display: flex;
	direction: ltr;
	align-items: center;
	margin: 0;
	padding: 0;
	font-family: var( --gs-kmb-font );
	-webkit-tap-highlight-color: transparent;
	/* Closed: only the handle is on screen (the 1 px is the panel's overlap). */
	transform: translate( calc( var( --gs-kv-panel-w ) - 1px ), -50% );
	transition: transform 260ms ease;
}

.gs-kiosk-volume.is-open {
	transform: translate( 0, -50% );
}

/* Closed: the off-screen options leave the tab order and the accessibility
 * tree; visibility flips only once the slide-out transition has ended. */
.gs-kiosk-volume__panel {
	visibility: hidden;
	transition: visibility 0s linear 260ms;
}

.gs-kiosk-volume.is-open .gs-kiosk-volume__panel {
	visibility: visible;
	transition-delay: 0s;
}

.gs-kiosk-volume[hidden] {
	display: none;
}

.gs-kiosk-volume__handle,
.gs-kiosk-volume__panel {
	box-sizing: border-box;
	border: 1px solid var( --gs-kv-line );
	border-right: 0;
	border-radius: 18px 0 0 18px;
	background: var( --gs-kv-bg );
	-webkit-backdrop-filter: blur( 14px ) saturate( 130% );
	backdrop-filter:         blur( 14px ) saturate( 130% );
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.4 );
}

.gs-kiosk-volume__handle {
	flex: 0 0 auto;
	width: var( --gs-kv-handle-w );
	height: 120px;
	margin: 0;
	padding: 12px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: var( --gs-kmb-ivory );
	font-family: var( --gs-kmb-font );
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.gs-kiosk-volume__handle > svg {
	width: 28px;
	height: 28px;
	color: var( --gs-kmb-gold-soft );
}

/* Open: the options carry the level, the handle keeps the icon only. */
.gs-kiosk-volume.is-open .gs-kiosk-volume__current {
	display: none;
}

.gs-kiosk-volume__handle:focus-visible {
	outline: 2px solid var( --gs-color-gold, #c9a227 );
	outline-offset: -4px;
}

.gs-kiosk-volume__panel {
	flex: 0 0 auto;
	width: var( --gs-kv-panel-w );
	margin-left: -1px;
	padding: 12px 16px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gs-kiosk-volume__opt {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 12px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var( --gs-kv-line );
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.08 );
	color: var( --gs-kmb-ivory );
	font-family: var( --gs-kmb-font );
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background 240ms ease, color 240ms ease, border-color 240ms ease;
}

.gs-kiosk-volume__opt.is-active {
	background: var( --gs-kmb-gold );
	border-color: var( --gs-kmb-gold );
	color: var( --gs-kmb-navy-deep );
}

.gs-kiosk-volume__opt:active {
	transform: translateY( 1px );
}

/* The fixed handle owns the right 64 px of the screen: the portal content
 * keeps clear of it (the kiosk slideshow header and footer do not). */
body.gs-kiosk-volume-shown .mphb-gs-shell {
	padding-right: 64px;
}

/* The polite announcer of the picked level — present for screen readers
 * only, the pill itself never grows. */
.gs-kiosk-volume__live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

/* ===== Mobile (≤ 600px web guest portal) — tighter layout ===== */
@media ( max-width: 600px ) {
	.gs-kiosk-message-stack {
		top: 10px;
		width: calc( 100% - 16px );
	}
	.gs-kiosk-message {
		grid-template-columns: auto 1fr;
		grid-template-rows: auto auto;
		gap: 10px 14px;
		padding: 12px 14px;
		font-size: 14px;
	}
	.gs-kiosk-message__icon {
		width: 32px;
		height: 32px;
	}
	.gs-kiosk-message__icon > svg {
		width: 16px;
		height: 16px;
	}
	.gs-kiosk-message__text {
		grid-column: 2;
	}
	.gs-kiosk-message__dismiss {
		grid-column: 1 / -1;
		min-width: 0;
		width: 100%;
		font-size: 11px;
	}
}

/* ===== Reduced motion ===== */
@media ( prefers-reduced-motion: reduce ) {
	.gs-kiosk-message,
	.gs-kiosk-message.is-active,
	.gs-kiosk-message[data-level="urgent"].is-active {
		animation: none;
		transition: opacity 200ms linear;
		transform: none;
	}
	.gs-kiosk-message-dot::before {
		transition: none;
	}
	/* No motion: the badge keeps a wider, steady halo instead of the loop. */
	.gs-kiosk-notif-badge:not([hidden]),
	.gs-kiosk-notif-badge:not([hidden]) .gs-kiosk-notif-badge__count {
		animation: none;
	}
	.gs-kiosk-notif-badge:not([hidden]) {
		box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.42 ), 0 0 0 8px rgba( 196, 154, 58, 0.45 );
	}
	/* No transition at all on the volume drawer and its options. */
	.gs-kiosk-volume,
	.gs-kiosk-volume__panel,
	.gs-kiosk-volume.is-open .gs-kiosk-volume__panel,
	.gs-kiosk-volume__opt {
		transition: none;
	}
}

/* Arabic: letter-spacing breaks the cursive joins. */
:lang(ar) .gs-kiosk-volume__opt,
:lang(ar) .gs-kiosk-volume__handle {
	letter-spacing: 0;
	text-transform: none;
}

.gs-kiosk-volume__opt:focus-visible {
	outline: 2px solid var(--gs-color-gold, #c9a227);
	outline-offset: 2px;
}
