/* Scandi Contact Button — floating "Contact us" pill + panel.
   Colours and fonts = scandi.travel brand (aubergine #2A1F4D, ink #1A1622, Fraunces / Manrope). */

.scx {
	--scx-ink: #1A1622;
	--scx-accent: #2A1F4D;
	--scx-muted: #6B6573;
	--scx-line: rgba(42, 31, 77, .22);
	position: fixed;
	right: 24px;
	bottom: calc(24px + env(safe-area-inset-bottom));
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font-family: 'Manrope', system-ui, sans-serif;
	line-height: 1.3;
}
.scx * { box-sizing: border-box; }
/* While open, sit above everything (e.g. the cookie-settings icon) */
.scx.is-open { z-index: 2147483000; }

/* Pill button (theme button styles are overridden on purpose) */
.scx .scx-btn {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	height: 52px;
	margin: 0 !important;
	padding: 0 22px 0 18px !important;
	border: 0 !important;
	border-radius: 26px !important;
	background: var(--scx-accent) !important;
	color: #fff !important;
	font: 500 16px/1 'Manrope', system-ui, sans-serif !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	box-shadow: 0 8px 22px rgba(26, 22, 34, .22);
	cursor: pointer;
	transition: background .15s;
}
.scx .scx-btn:hover { background: var(--scx-ink) !important; color: #fff !important; }
.scx .scx-btn:focus-visible { outline: 2px solid var(--scx-accent); outline-offset: 3px; }
.scx .scx-btn svg { flex: none; }
.scx .scx-i-close,
.scx .scx-label-close { display: none; }
.scx.is-open .scx-btn { background: var(--scx-ink) !important; }
.scx.is-open .scx-i-open,
.scx.is-open .scx-label-open { display: none; }
.scx.is-open .scx-i-close,
.scx.is-open .scx-label-close { display: inline; }

/* Panel */
.scx .scx-panel {
	position: absolute;
	right: 0;
	bottom: 66px;
	width: 340px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border: 1px solid rgba(42, 31, 77, .12);
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(26, 22, 34, .2);
	overflow: hidden;
}
.scx .scx-panel[hidden] { display: none; }
.scx .scx-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px;
	background: var(--scx-accent);
	color: #fff;
}
/* Photo: square crop of the face from an 800×533 picture
   (crop 320×320 starting at x 135, y 0 → size 250 %, position 28.125 % 0) */
.scx .scx-photo {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .18);
	background-repeat: no-repeat;
	background-size: 250% auto;
	background-position: 28.125% 0;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.scx.is-loaded .scx-photo { background-image: var(--scx-photo); }
.scx .scx-head-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.scx .scx-title {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
	color: #fff !important;
}
.scx .scx-sub { font-size: 13px; color: rgba(255, 255, 255, .82) !important; }
.scx .scx-x {
	display: none;
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 18px !important;
	background: transparent !important;
	color: #fff !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.scx .scx-body { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.scx .scx-primary,
.scx .scx-wa {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 50px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none !important;
	transition: background .15s, border-color .15s;
}
.scx .scx-primary { background: var(--scx-accent); color: #fff !important; }
.scx .scx-primary:hover { background: var(--scx-ink); color: #fff !important; }
.scx .scx-wa { border: 1px solid var(--scx-line); background: #fff; color: var(--scx-ink) !important; }
.scx .scx-wa svg { color: var(--scx-accent); }
.scx .scx-wa:hover { border-color: var(--scx-accent); background: rgba(42, 31, 77, .04); }
.scx .scx-note { padding-top: 4px; font-size: 13px; color: var(--scx-muted); text-align: center; }
.scx .scx-backdrop { display: none; }

/* Phones: smaller pill; the panel slides up as a bottom sheet */
@media (max-width: 767px) {
	.scx { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
	.scx .scx-btn { height: 48px; padding: 0 18px 0 15px !important; font-size: 15px !important; }
	.scx.is-open .scx-backdrop { display: block; position: fixed; inset: 0; background: rgba(26, 22, 34, .38); }
	.scx .scx-panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-width: none;
		border: 0;
		border-radius: 18px 18px 0 0;
		padding-bottom: env(safe-area-inset-bottom);
		z-index: 1;
	}
	.scx .scx-head { padding: 18px 52px 16px 16px; gap: 12px; }
	.scx .scx-photo { width: 44px; height: 44px; }
	.scx .scx-title { font-size: 18px; }
	.scx .scx-x { display: inline-flex; }
	.scx .scx-body { padding: 14px 14px 20px; gap: 8px; }
	.scx .scx-primary,
	.scx .scx-wa { height: 48px; font-size: 15px; }
	.scx.is-open .scx-btn { display: none !important; }
}

/* scandi.travel tour pages: when the Scandi Tour Design booking bar is shown
   (body class std-bar-on), lift the button above it. No effect elsewhere. */
body.std-bar-on .scx { bottom: 88px; }
@media (prefers-reduced-motion: no-preference) {
	body.std-tour-page .scx { transition: bottom .2s; }
}

@media (prefers-reduced-motion: reduce) {
	.scx .scx-btn, .scx .scx-primary, .scx .scx-wa { transition: none; }
}
@media print { .scx { display: none !important; } }
