/* Destination Ghost Engine — components that sit inside the current theme.
   Brand tokens (--dg-blue/black/white) are set from the logo in Settings. */
:root {
	--dg-blue: #2f8fe0;
	--dg-black: #05070b;
	--dg-white: #ffffff;
	--dg-on-blue: #05070b;
	--dg-ink: #0b111a;
	--dg-panel: color-mix(in srgb, var(--dg-black) 94%, var(--dg-blue));
	--dg-line: color-mix(in srgb, var(--dg-blue) 35%, transparent);
	--dg-mist: color-mix(in srgb, var(--dg-white) 72%, var(--dg-blue));
	--dg-glow: 0 0 0 1px color-mix(in srgb, var(--dg-blue) 45%, transparent), 0 10px 40px -12px color-mix(in srgb, var(--dg-blue) 70%, transparent);
	--dg-radius: 12px;
}

/* ---------- shared ---------- */
.dg-section, .dg-brief, .dg-after { box-sizing: border-box; }
.dg-section *, .dg-brief *, .dg-fab * { box-sizing: border-box; }
.dg-after { margin-top: 2.5em; display: flex; flex-direction: column; gap: 2.5em; }
.dg-section h2 { margin: 0 0 .8em; }
.dg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .45em;
	background: var(--dg-blue); color: var(--dg-on-blue) !important; text-decoration: none !important;
	font-family: inherit; font-weight: 700; letter-spacing: .01em; line-height: 1.2;
	padding: .75em 1.25em; border-radius: 999px; border: 0; cursor: pointer;
	box-shadow: var(--dg-glow); transition: transform .15s ease, filter .15s ease;
}
.dg-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.dg-btn:focus-visible, .dg-link:focus-visible, .dg-fab a:focus-visible, .dg-fab button:focus-visible, .dg-lb__tabs button:focus-visible { outline: 3px solid var(--dg-white); outline-offset: 3px; }
.dg-btn--small { padding: .45em .9em; font-size: .85em; }
.dg-btn--big { font-size: 1.15em; padding: .9em 1.6em; }
.dg-btn .dg-ghost { width: 1.2em; height: 1.2em; }
.dg-link { font-weight: 600; }

/* ---------- In brief (answer-first box for readers and AI search) ---------- */
.dg-brief {
	position: relative; margin: 0 0 2em; padding: 1.4em 1.5em 1.2em;
	background: var(--dg-panel); color: var(--dg-white); border-radius: var(--dg-radius);
	box-shadow: var(--dg-glow); overflow: hidden;
}
.dg-brief::before { /* drifting mist */
	content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 140%;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--dg-blue) 28%, transparent), transparent 70%);
	pointer-events: none; opacity: .55;
}
.dg-brief > * { position: relative; }
.dg-brief__title { color: var(--dg-white) !important; font-size: 1.05em !important; letter-spacing: .04em; margin: 0 0 .4em !important; display: flex; align-items: center; gap: .5em; }
.dg-brief__title::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--dg-blue); box-shadow: 0 0 12px var(--dg-blue); }
.dg-brief__summary { font-size: 1.12em; line-height: 1.6; margin: 0 0 .9em; color: var(--dg-white); }
.dg-brief__meta { display: flex; flex-wrap: wrap; gap: .4em 1.4em; margin: 0 0 .6em; font-size: .9em; color: var(--dg-mist); }
.dg-brief__meta strong { color: var(--dg-white); margin-right: .3em; font-weight: 700; }
.dg-brief__meta a { color: var(--dg-white); }
.dg-brief__facts { margin: .4em 0 0; padding: 0; list-style: none; display: grid; gap: .45em; }
.dg-brief__facts li { padding-left: 1.3em; position: relative; line-height: 1.5; color: var(--dg-white); }
.dg-brief__facts li::before { content: ""; position: absolute; left: .2em; top: .62em; width: .45em; height: .45em; border-radius: 50%; border: 2px solid var(--dg-blue); }

/* ---------- Cards ---------- */
.dg-tourgrid, .dg-storygrid { display: grid; gap: 1.4em; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.dg-card {
	display: flex; flex-direction: column; background: var(--dg-panel); color: var(--dg-white);
	border-radius: var(--dg-radius); overflow: hidden; border: 1px solid var(--dg-line);
	transition: transform .2s ease, box-shadow .2s ease;
}
.dg-card:hover { transform: translateY(-3px); box-shadow: var(--dg-glow); }
.dg-card__media { display: block; aspect-ratio: 16 / 10; background: var(--dg-ink); overflow: hidden; }
.dg-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.dg-card:hover .dg-card__img { transform: scale(1.04); }
.dg-card__ph { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--dg-blue); }
.dg-card__ph .dg-ghost { width: 56px; height: 56px; opacity: .6; }
.dg-card__body { padding: 1em 1.1em 1.2em; display: flex; flex-direction: column; gap: .5em; flex: 1; }
.dg-card__kicker { margin: 0; font-size: .78em; letter-spacing: .06em; color: var(--dg-blue); font-weight: 700; }
.dg-card__title { margin: 0 !important; font-size: 1.2em !important; line-height: 1.25 !important; }
.dg-card__title a { color: var(--dg-white) !important; text-decoration: none; }
.dg-card__title a:hover { text-decoration: underline; text-decoration-color: var(--dg-blue); }
.dg-card__text { margin: 0; font-size: .93em; line-height: 1.55; color: var(--dg-mist); }
.dg-card__actions { margin: auto 0 0; padding-top: .5em; display: flex; flex-wrap: wrap; align-items: center; gap: .6em 1em; }
.dg-card__actions .dg-link { color: var(--dg-white); font-size: .9em; }
.dg-chips { display: flex; flex-wrap: wrap; gap: .35em; margin: 0; }
.dg-chips span { font-size: .78em; padding: .2em .6em; border-radius: 999px; border: 1px solid var(--dg-line); color: var(--dg-white); }

/* ---------- FAQ ---------- */
.dg-faq details { border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.dg-faq summary { cursor: pointer; padding: .9em 2em .9em 0; font-weight: 700; position: relative; list-style: none; }
.dg-faq summary::-webkit-details-marker { display: none; }
.dg-faq summary::after { content: "+"; position: absolute; right: .3em; top: .7em; font-size: 1.3em; color: var(--dg-blue); transition: transform .2s; }
.dg-faq details[open] summary::after { transform: rotate(45deg); }
.dg-faq details > div { padding: 0 0 1em; }

/* ---------- Sources ---------- */
.dg-sources ol { padding-left: 1.4em; margin: 0; }
.dg-sources li { margin: .35em 0; }
.dg-sources span { opacity: .75; }

/* ---------- Link / cite box ---------- */
.dg-linkbox { padding: 1.4em 1.5em; border-radius: var(--dg-radius); border: 1px dashed var(--dg-line); }
.dg-lb__intro { margin: 0 0 1em; }
.dg-lb__tabs { display: flex; flex-wrap: wrap; gap: .4em; margin-bottom: .8em; }
.dg-lb__tabs button { font: inherit; font-size: .9em; padding: .4em .95em; border-radius: 999px; border: 1px solid var(--dg-line); background: transparent; color: inherit; cursor: pointer; }
.dg-lb__tabs button[aria-selected="true"] { background: var(--dg-blue); color: var(--dg-on-blue); border-color: var(--dg-blue); }
.dg-lb__hint { margin: 0 0 .4em; font-size: .85em; opacity: .8; }
.dg-lb__copy { display: flex; gap: .6em; align-items: flex-start; }
.dg-lb__copy textarea { flex: 1; min-width: 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: .6em .7em; border-radius: 8px; border: 1px solid var(--dg-line); background: color-mix(in srgb, var(--dg-black) 6%, transparent); color: inherit; resize: vertical; }
.dg-share { display: flex; flex-wrap: wrap; gap: .5em 1em; align-items: center; margin: 1em 0 0; font-size: .9em; }
.dg-share span { font-weight: 700; }
.dg-share__native { font: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; color: inherit; padding: 0; }
.dg-rating { font-weight: 700; }

/* ---------- Map ---------- */
.dg-map { position: relative; height: var(--dg-map-h, 420px); border-radius: var(--dg-radius); overflow: hidden; border: 1px solid var(--dg-line); background: radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--dg-blue) 14%, var(--dg-ink)), var(--dg-ink) 70%); z-index: 0; }
@media (max-width: 600px) { .dg-map { height: min(var(--dg-map-h, 420px), 70vh); } }
.dg-map__hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dg-mist); font-size: .9em; }
.dg-map.is-ready .dg-map__hint { display: none; }
.dg-map.is-failed .dg-map__hint::after { content: " (map unavailable — see the list below)"; }
.dg-pin { color: var(--dg-blue); filter: drop-shadow(0 4px 10px rgb(0 0 0 / .6)); }
.dg-pin--story span { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--dg-white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dg-blue) 45%, transparent), 0 0 18px var(--dg-blue); }
.dg-popup .leaflet-popup-content-wrapper { background: var(--dg-ink); color: var(--dg-white); border-radius: 12px; box-shadow: var(--dg-glow); }
.dg-popup .leaflet-popup-tip { background: var(--dg-ink); }
.dg-popup .leaflet-popup-content { margin: 12px 14px; display: grid; gap: 4px; font-size: 14px; line-height: 1.4; }
.dg-popup img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.dg-popup a { color: var(--dg-mist); }
.dg-popup span { color: var(--dg-mist); font-size: 13px; }
.dg-pin__dir { font-weight: 700; }
.leaflet-container a.leaflet-popup-close-button { color: var(--dg-mist); }
.dg-maplist { margin-top: .6em; }
.dg-pager { display: flex; justify-content: space-between; margin-top: 1.4em; font-weight: 700; }

/* ---------- Reading progress ---------- */
.dg-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 99999; pointer-events: none; }
.dg-progress span { display: block; height: 100%; width: 0; background: var(--dg-blue); box-shadow: 0 0 10px var(--dg-blue); }
.admin-bar .dg-progress { top: 32px; }

/* ---------- Floating Book Now ---------- */
.dg-fab { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 99990; display: flex; align-items: center; gap: .4em; font-family: inherit; transform: translateY(0); opacity: 1; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.dg-fab[hidden] { display: flex !important; transform: translateY(140%); opacity: 0; pointer-events: none; }
.dg-fab__btn {
	display: inline-flex; align-items: center; gap: .7em; padding: .7em 1.25em .7em .85em; border-radius: 999px;
	background: var(--dg-black); color: var(--dg-white) !important; text-decoration: none !important;
	box-shadow: 0 0 0 2px var(--dg-blue), 0 12px 36px -8px color-mix(in srgb, var(--dg-blue) 80%, transparent);
}
.dg-fab__btn:hover { background: color-mix(in srgb, var(--dg-black) 80%, var(--dg-blue)); }
.dg-fab__btn .dg-ghost { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--dg-blue); color: var(--dg-on-blue); flex: none; animation: dg-float 3.2s ease-in-out infinite; }
.dg-fab__text { display: flex; flex-direction: column; line-height: 1.15; }
.dg-fab__label { font-weight: 800; font-size: 1.02em; letter-spacing: .01em; }
.dg-fab__sub { font-size: .76em; color: var(--dg-mist); margin-top: .15em; }
.dg-fab__close { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--dg-black); color: var(--dg-white); cursor: pointer; font-size: 18px; line-height: 1; opacity: .75; box-shadow: 0 0 0 1px var(--dg-line); }
.dg-fab__close:hover { opacity: 1; }
.dg-bar { display: none; }
@keyframes dg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* Phones: full-width bottom bar with the tour and price. */
@media (max-width: 767px) {
	.dg-fab { left: 0; right: 0; bottom: 0; gap: 0; }
	.dg-fab__btn, .dg-fab__close { display: none; }
	.dg-bar {
		display: flex; align-items: center; gap: .8em; width: 100%;
		padding: .7em max(14px, env(safe-area-inset-right)) calc(.7em + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
		background: color-mix(in srgb, var(--dg-black) 94%, transparent); backdrop-filter: blur(8px);
		border-top: 1px solid var(--dg-blue); box-shadow: 0 -10px 30px -10px color-mix(in srgb, var(--dg-blue) 60%, transparent);
	}
	.dg-bar__info { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--dg-white); line-height: 1.2; }
	.dg-bar__info strong { font-size: .95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.dg-bar__info span { font-size: .76em; color: var(--dg-mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.dg-bar__promo { color: var(--dg-blue) !important; font-weight: 700; }
	.dg-bar__btn { flex: none; background: var(--dg-blue); color: var(--dg-on-blue) !important; font-weight: 800; padding: .75em 1.3em; border-radius: 999px; text-decoration: none !important; }
	body.dg-has-bar { padding-bottom: 76px; }
	.dg-lb__copy { flex-direction: column; align-items: stretch; }
	.dg-brief { padding: 1.1em 1.1em 1em; }
}
/* Tablets: compact pill. */
@media (min-width: 768px) and (max-width: 1024px) {
	.dg-fab__sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.dg-fab, .dg-card, .dg-card__img, .dg-btn { transition: none !important; }
	.dg-fab__btn .dg-ghost { animation: none; }
}
@media print { .dg-fab, .dg-progress, .dg-linkbox { display: none !important; } }

/* ---------- forms (group quotes, waitlists) ---------- */
.dg-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dg-form__grid { display: grid; gap: 4px 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.dg-field { margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.dg-field--full { grid-column: 1 / -1; }
.dg-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 8px 0 0; }
.dg-form__foot span { font-size: .9em; opacity: .8; }
.dg-form__inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.dg-form__inline .dg-field { flex: 1 1 260px; margin: 0; }
.dg-form__msg { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 600; }
.dg-form__msg--ok { background: color-mix(in srgb, var(--dg-blue) 22%, transparent); }
.dg-form__msg--error { background: rgb(220 60 60 / .2); }
.dg-map.leaflet-container { background: var(--dg-ink); font: inherit; }
.dg-map.leaflet-container .leaflet-control-attribution { background: rgb(5 7 11 / .75); color: var(--dg-mist); }
.dg-map.leaflet-container .leaflet-control-attribution a { color: var(--dg-mist); }
.dg-map.leaflet-container .leaflet-bar a { background: var(--dg-ink); color: var(--dg-white); border-color: var(--dg-line); }
/* OpenStreetMap tiles darkened to match the site (no API key needed). */
.dg-tiles--dark { filter: invert(1) hue-rotate(185deg) brightness(.92) contrast(.88) saturate(.55); }


.dg-pin--stop span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--dg-white); color: var(--dg-black); font: 700 13px/1 system-ui, sans-serif; box-shadow: 0 0 0 3px var(--dg-blue), 0 0 16px var(--dg-blue); }
.dg-route { stroke: var(--dg-white); stroke-opacity: .85; }
