/* Side-Walk Interaktivt Kort – frontend
 * Skrifttyper arves fra temaet, så kortet passer ind på sitet.
 * Farver kan overskrives med CSS-variablerne nedenfor.
 */
/* Farverne er hentet fra Naturpark Lillebælt-kortet: vand, land og pins. */
.swik,
.swik-dialog-host {
	--swik-bg: #04414a;        /* dybt vand */
	--swik-bg-2: #0a5662;      /* lysere vand */
	--swik-text: #f2efe4;      /* lys tekst */
	--swik-muted: #c5d0cb;     /* sekundær tekst */
	--swik-accent: #e89c6b;    /* pin-orange */
	--swik-accent-ink: #2b1a0e;
	--swik-line: rgba(242, 239, 228, 0.16);
	--swik-ink: #1d1d1b;       /* tooltip på kortet */
	--swik-radius: 18px;
}

/* ---------- Kort ---------- */
.swik {
	position: relative;
	width: 100%;
}

.swik__stage {
	position: relative;
	display: inline-block;
	width: 100%;
	line-height: 0;
}

.swik__map {
	display: block;
	width: 100%;
	height: auto;
	user-select: none;
}

.swik__marker {
	position: absolute;
	/* Spidsen af ikonet (nederst i midten) sidder på koordinaten */
	transform: translate(-50%, -100%);
	width: var(--swik-pin-size, 40px);
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	z-index: 1;
}

.swik__pin {
	display: block;
	width: 100%;
	height: auto;
	transform-origin: 50% 100%;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
	transition: transform 0.15s ease;
	user-select: none;
}

.swik__marker:hover .swik__pin,
.swik__marker:focus-visible .swik__pin,
.swik__marker.is-active .swik__pin {
	transform: scale(1.15);
}

.swik__marker:focus-visible {
	outline: 2px solid var(--swik-ink);
	outline-offset: 3px;
	border-radius: 4px;
}

@media (max-width: 600px) {
	.swik__marker { width: calc(var(--swik-pin-size, 40px) * 0.75); }
}

.swik__label {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	padding: 5px 9px;
	border-radius: 6px;
	background: var(--swik-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.swik__marker:hover,
.swik__marker:focus-visible {
	z-index: 2;
}

.swik__marker:hover .swik__label,
.swik__marker:focus-visible .swik__label {
	opacity: 1;
}

@media (hover: none) {
	.swik__label { display: none; }
}

/* Skjulte hotspots (filter) */
.swik__marker {
	transition: opacity 0.2s ease, visibility 0.2s;
}

.swik__marker.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* ---------- Filter ---------- */
.swik__filter {
	--swik-filter-bg: #545a40;
	padding: 18px 22px 22px;
	background: var(--swik-filter-bg);
	color: var(--swik-text);
}

.swik__filter-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
	margin-bottom: 14px;
}

.swik__filter-title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--swik-text);
}

.swik__filter-status {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0;
	font-size: 0.8rem;
	color: var(--swik-muted);
}

.swik .swik__filter .swik__filter-reset {
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--swik-accent);
	font: inherit;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
	cursor: pointer;
}

.swik .swik__filter .swik__filter-reset:hover,
.swik .swik__filter .swik__filter-reset:focus {
	background: none;
	color: #f0b088;
}

.swik .swik__filter .swik__filter-reset[hidden] { display: none; }

.swik__filter-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 4px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.swik__filter-list li {
	min-width: 0;
	margin: 0;
	padding: 0;
}

/* Høj specificitet, så temaets/Elementors knap-styling ikke slår igennem */
.swik .swik__filter .swik__chip {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-width: 0;
	height: auto;
	min-height: 40px;
	margin: 0;
	padding: 5px 10px 5px 5px;
	border: 1px solid transparent;
	border-radius: 9px;
	background: transparent;
	box-shadow: none;
	color: var(--swik-text);
	font: inherit;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.swik .swik__filter .swik__chip:hover,
.swik .swik__filter .swik__chip:focus {
	background: rgba(242, 239, 228, 0.08);
	color: var(--swik-text);
}

.swik .swik__filter .swik__chip:focus-visible {
	outline: 2px solid var(--swik-accent);
	outline-offset: 1px;
}

.swik .swik__filter .swik__chip-icon {
	flex: none;
	display: block;
	width: 30px;
	height: 30px;
	max-width: none;
	margin: 0;
	border-radius: 5px;
	object-fit: contain;
}

.swik .swik__filter .swik__chip-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: normal;
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Når der filtreres, træder de valgte frem */
.swik .swik__filter.is-filtering .swik__chip {
	opacity: 0.55;
}

.swik .swik__filter.is-filtering .swik__chip:hover {
	opacity: 0.85;
}

.swik .swik__filter .swik__chip[aria-pressed="true"] {
	opacity: 1;
	border-color: var(--swik-accent);
	background: rgba(232, 156, 107, 0.16);
}

.swik .swik__filter .swik__chip[aria-pressed="true"] .swik__chip-name {
	color: #fff;
}

@media (max-width: 560px) {
	.swik__filter { padding: 16px 14px 18px; }
	.swik__filter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Pop-up ---------- */
html.swik-lock {
	overflow: hidden;
}

.swik-dialog {
	--swik-img-height: 260px;
	position: fixed;
	width: min(720px, calc(100% - 24px));
	max-width: none;
	max-height: min(90vh, 880px);
	padding: 0;
	border: 0;
	border-radius: var(--swik-radius);
	background: var(--swik-bg);
	color: var(--swik-text);
	box-shadow: 0 30px 80px rgba(0, 20, 24, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
	overflow: hidden;
}

.swik-dialog[open] {
	display: flex;
	flex-direction: column;
	animation: swik-in 0.22s ease-out;
}

@keyframes swik-in {
	from { opacity: 0; transform: translateY(10px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

.swik-dialog::backdrop {
	background: rgba(2, 28, 32, 0.6);
	backdrop-filter: blur(3px);
}

.swik-dialog[open]:not(:modal) {
	inset: 0;
	margin: auto;
	z-index: 99999;
}

.swik-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(4, 65, 74, 0.72);
	color: var(--swik-text);
	backdrop-filter: blur(6px);
	cursor: pointer;
	transition: background 0.15s ease;
}

.swik-dialog__close:hover {
	background: var(--swik-bg);
}

.swik-dialog__close:focus-visible {
	outline: 2px solid var(--swik-accent);
	outline-offset: 2px;
}

.swik-dialog__body {
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: var(--swik-bg-2) transparent;
}

.swik-dialog .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Billeder / slider ---------- */
.swik-slider {
	--swik-per-view: 1;
	--swik-gap: 3px;
	position: relative;
	background: var(--swik-bg-2);
}

.swik-slider__track {
	display: flex;
	gap: var(--swik-gap);
	height: var(--swik-img-height);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.swik-slider__track::-webkit-scrollbar {
	display: none;
}

.swik-slider__track:focus-visible {
	outline: 2px solid var(--swik-accent);
	outline-offset: -2px;
}

.swik-slider__slide {
	flex: 0 0 calc((100% - (var(--swik-per-view) - 1) * var(--swik-gap)) / var(--swik-per-view));
	height: 100%;
	margin: 0;
	scroll-snap-align: start;
	overflow: hidden;
}

.swik-slider__img {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
}

/* Blød overgang fra billede til kort */
.swik-slider::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 56px;
	background: linear-gradient(to bottom, transparent, rgba(4, 65, 74, 0.55));
	pointer-events: none;
}

.swik-slider__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(4, 65, 74, 0.72);
	color: var(--swik-text);
	backdrop-filter: blur(6px);
	cursor: pointer;
	transition: background 0.15s ease;
}

.swik-slider__nav:hover { background: var(--swik-bg); }
.swik-slider__nav[hidden] { display: none; }
.swik-slider__nav--prev { left: 12px; }
.swik-slider__nav--next { right: 12px; }

.swik-slider__nav:focus-visible {
	outline: 2px solid var(--swik-accent);
	outline-offset: 2px;
}

.swik-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 6px;
	pointer-events: none;
}

.swik-slider__dots span {
	width: 7px;
	height: 7px;
	border-radius: 4px;
	background: rgba(242, 239, 228, 0.5);
	transition: width 0.2s ease, background 0.2s ease;
}

.swik-slider__dots span.is-active {
	width: 20px;
	background: var(--swik-accent);
}

@media (max-width: 560px) {
	.swik-slider { --swik-per-view: 1 !important; }
	.swik-slider__track { height: calc(var(--swik-img-height) * 0.75); }
}

/* ---------- Tekst ---------- */
.swik-card__body {
	padding: 22px 26px 24px;
}

.swik-card--no-media .swik-card__body {
	padding-top: 26px;
}

.swik-card--no-media .swik-card__head {
	padding-right: 44px;
}

.swik-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 14px;
}

.swik-card__title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--swik-text);
}

.swik-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.swik-card__tags li {
	margin: 0;
	padding: 4px 10px;
	border: 1px solid rgba(232, 156, 107, 0.55);
	border-radius: 999px;
	background: rgba(232, 156, 107, 0.1);
	color: var(--swik-accent);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.swik-card__address {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--swik-muted);
}

.swik-card__address svg {
	flex: none;
	color: var(--swik-accent);
}

.swik-card__desc {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--swik-text);
	opacity: 0.92;
}

.swik-card__desc p {
	margin: 0 0 0.6em;
	color: inherit;
}

.swik-card__desc p:last-child {
	margin-bottom: 0;
}

.swik-card__desc a {
	color: var(--swik-accent);
}

.swik-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--swik-line);
}

.swik-card__pictos {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.swik-card__pictos li {
	margin: 0;
	padding: 0;
	width: 38px;
	height: 38px;
	border-radius: 7px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(242, 239, 228, 0.22);
}

.swik-card__pictos img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.swik-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 11px 20px;
	border-radius: 999px;
	background: var(--swik-accent);
	color: var(--swik-accent-ink);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.15s ease;
}

.swik-card__btn::after {
	content: "";
	width: 7px;
	height: 7px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

.swik-card__btn:hover,
.swik-card__btn:focus-visible {
	background: #f0b088;
	color: var(--swik-accent-ink);
	text-decoration: none;
}

.swik-card__btn:focus-visible {
	outline: 2px solid var(--swik-text);
	outline-offset: 2px;
}

@media (max-width: 560px) {
	.swik-card__body { padding: 18px 18px 20px; }
	.swik-card__title { font-size: 1.2rem; }
	.swik-card__btn { width: 100%; justify-content: center; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.swik__pin,
	.swik__label,
	.swik-slider__dots span,
	.swik__marker,
	.swik__chip { transition: none; }
	.swik-dialog[open] { animation: none; }
	.swik-slider__track { scroll-behavior: auto; }
}
