/* Turistkort – offentlig visning */
/* Leaflets tegnelag i egne paner (fx kommune-udtoning) må ikke rammes af temaets globale svg-størrelse. */
.leaflet-container .leaflet-tv-kommune-pane svg { width: auto; height: auto; vertical-align: baseline; }
.tv-kortside { --tv-kant: #d6dde5; --tv-lys: #f4f7fa; --tv-blaa: #1f5f8b; --tv-graa: #5f6b76; }
.tv-kortside__vaerktoej { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1rem; }
.tv-kortside__soeg { display: flex; align-items: center; gap: .6rem; background: #fff; border: 2px solid var(--tv-kant); border-radius: 12px; padding: 0 1rem; min-height: 54px; max-width: 520px; }
.tv-kortside__soeg svg { width: 22px; height: 22px; color: var(--tv-graa); flex-shrink: 0; }
.tv-kortside__soeg input { flex: 1; border: 0; background: transparent; font-size: 1.1rem; min-height: 50px; padding: 0; box-shadow: none; outline: none; }
.tv-kortside__filtre { display: flex; flex-wrap: wrap; gap: .5rem; }
.tv-filter { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem .5rem .6rem; border: 2px solid var(--tv-kant); border-radius: 999px; background: #fff; color: #1b2430; font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; min-height: 46px; line-height: 1.1; transition: background .12s, border-color .12s, color .12s; }
.tv-filter__ikon { width: 24px; height: 24px; color: var(--tv-farve); }
.tv-filter__antal { font-size: .85rem; color: var(--tv-graa); background: var(--tv-lys); border-radius: 999px; padding: .1rem .5rem; }
.tv-filter:hover { border-color: var(--tv-farve); }
.tv-filter--aktiv, .tv-filter[aria-pressed="true"] { background: var(--tv-farve); border-color: var(--tv-farve); color: #fff; }
.tv-filter--aktiv .tv-filter__ikon, .tv-filter[aria-pressed="true"] .tv-filter__ikon { color: #fff; }
.tv-filter--aktiv .tv-filter__antal, .tv-filter[aria-pressed="true"] .tv-filter__antal { background: rgba(255,255,255,.25); color: #fff; }
.tv-filter--nulstil { --tv-farve: var(--tv-blaa); color: var(--tv-blaa); border-style: dashed; }
.tv-filter:focus-visible { outline: 3px solid var(--tv-blaa); outline-offset: 2px; }

.tv-kortside__indhold { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.tv-kortside__kort { height: 620px; border-radius: 14px; border: 2px solid var(--tv-kant); overflow: hidden; z-index: 0; background: #ECE3D2; }
.leaflet-container { background: #ECE3D2; }
.tv-kortside__liste { max-height: 620px; overflow: auto; border: 2px solid var(--tv-kant); border-radius: 14px; background: #fff; padding: .5rem; }
.tv-kortside__status { margin: .5rem .75rem; font-weight: 700; color: var(--tv-graa); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tv-kortside__visalle { background: none; border: 0; padding: .2rem .4rem; margin: 0; font: inherit; font-weight: 700; color: var(--tv-blaa, #1f5f8b); text-decoration: underline; cursor: pointer; border-radius: 6px; min-height: 32px; }
.tv-kortside__visalle:hover, .tv-kortside__visalle:focus-visible { background: rgba(31,95,139,.1); outline: none; }
.tv-stedliste { list-style: none; margin: 0; padding: 0; }
.tv-stedliste__punkt { display: flex; align-items: stretch; border-top: 1px solid var(--tv-kant); }
.tv-stedliste__knap { flex: 1; display: flex; gap: .8rem; align-items: flex-start; text-align: left; background: none; border: 0; padding: .8rem .75rem; cursor: pointer; font: inherit; color: inherit; border-radius: 10px; }
.tv-stedliste__knap:hover, .tv-stedliste__knap:focus-visible { background: var(--tv-lys); outline: none; }
.tv-stedliste__ikon { width: 40px; height: 40px; border-radius: 50%; background: var(--tv-farve); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.tv-stedliste__ikon svg { width: 22px; height: 22px; }
.tv-stedliste__tekst { display: flex; flex-direction: column; gap: .2rem; }
.tv-stedliste__tekst strong { font-size: 1.05rem; }
.tv-stedliste__adresse { color: var(--tv-graa); font-size: .95rem; }
.tv-stedliste__badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.tv-stedliste__link { display: flex; align-items: center; padding: 0 .9rem; color: var(--tv-blaa); font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 10px; }
.tv-stedliste__link:hover { background: var(--tv-lys); text-decoration: underline; }

/* Badges (deles med tema) */
.tv-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700; padding: .15rem .55rem .15rem .35rem; border-radius: 999px; background: color-mix(in srgb, var(--tv-farve) 14%, #fff); color: var(--tv-farve); line-height: 1.3; }
.tv-badge svg, .tv-badge__ikon { width: 16px; height: 16px; }

/* Markører */
.tv-markoer-wrap { background: none; border: 0; }
.tv-markoer { position: relative; width: 36px; height: 48px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.tv-markoer__pin { width: 36px; height: 48px; fill: var(--tv-farve); stroke: #fff; stroke-width: 2; }
.tv-markoer__cirkel { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--tv-farve); display: grid; place-items: center; }
.tv-markoer__cirkel svg { width: 15px; height: 15px; }
.leaflet-marker-icon.tv-markoer-wrap:focus-visible { outline: 3px solid #1f5f8b; border-radius: 50%; }
.tv-klynge-wrap { background: none; border: 0; }
/* Friluftsfaciliteter (GeoFA) – små runde markører */
.tv-friluft-wrap { background: none; border: 0; }
.tv-friluft { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #4F6D3A; border: 2px solid #4F6D3A; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.tv-friluft svg { width: 17px; height: 17px; fill: currentColor; }
.tv-friluft--toilet, .tv-friluft--vand, .tv-friluft--parkering, .tv-friluft--info { color: #0E7C86; border-color: #0E7C86; }
.tv-friluft--bad, .tv-friluft--kajak, .tv-friluft--fisk { color: #1F77B4; border-color: #1F77B4; }
.tv-friluft--baal { color: #C8102E; border-color: #C8102E; }
.leaflet-marker-icon.tv-friluft-wrap:focus-visible { outline: 3px solid #1f5f8b; border-radius: 50%; }
.tv-popup--friluft .tv-badge svg { width: 1em; height: 1em; vertical-align: -.15em; }
.tv-popup__ekstra { margin: 0 1rem .5rem; color: var(--tv-graa, #5f6b76); font-size: .9rem; }
.tv-popup__kilde { margin: .8rem 1rem 0; color: #7a8591; font-size: .75rem; }
.tv-filter--friluft { margin-left: auto; border-style: dashed; }
@media (max-width: 700px) { .tv-filter--friluft { margin-left: 0; } }
.tv-klynge { width: 44px; height: 44px; border-radius: 50%; background: #1f5f8b; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1rem; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* Popup */
.tv-popup-wrap .leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,.22); }
.tv-popup-wrap .leaflet-popup-content { margin: 0; width: auto !important; line-height: 1.45; font-size: 15px; }
.tv-popup-wrap .leaflet-popup-close-button { width: 32px; height: 32px; font-size: 24px; line-height: 32px; top: 4px; right: 4px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
/* Lille popup på kortet med kun navnet */
.tv-popup-wrap--navn .leaflet-popup-content-wrapper { border-radius: 10px; padding: 0; }
.tv-popup-wrap--navn .leaflet-popup-content { margin: 0; padding: .45rem .8rem; font-size: 15px; white-space: nowrap; }
.tv-popup-wrap--navn .leaflet-popup-tip-container { margin-top: -1px; }
.tv-popup__kun-navn { color: #1b2430; }

/* Boks med detaljer om valgt sted (uden for kortet, så den kan oversættes) */
.tv-valgt { position: relative; margin: .25rem .25rem .75rem; border: 2px solid var(--tv-farve, #1f5f8b); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.08); animation: tv-valgt-ind .2s ease-out; }
.tv-valgt[hidden] { display: none; }
.tv-valgt .tv-popup { font-size: 15px; line-height: 1.45; }
.tv-valgt__luk { position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(27,36,48,.75); color: #fff; font-size: 24px; line-height: 36px; text-align: center; cursor: pointer; padding: 0; }
.tv-valgt__luk:hover, .tv-valgt__luk:focus-visible { background: #1b2430; outline: 2px solid #1f5f8b; outline-offset: 2px; }
.tv-valgt .tv-popup__titel { padding-right: 2.6rem; }
.tv-stedliste__punkt--valgt { background: var(--tv-lys); border-radius: 10px; }
@keyframes tv-valgt-ind { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.tv-popup { padding: 0 0 .9rem; }
.tv-popup__billede { width: 100%; height: 150px; object-fit: cover; display: block; }
.tv-popup__kredit { display: block; font-size: .7rem; color: #6b7680; padding: .25rem 1rem 0; }
.tv-popup__titel { font-size: 1.15rem; margin: .9rem 1rem .3rem; line-height: 1.25; }
.tv-popup__badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 1rem .5rem; }
.tv-popup__tekst { margin: 0 1rem .5rem; }
.tv-popup__adresse { margin: 0 1rem .7rem; color: var(--tv-graa, #5f6b76); font-size: .92rem; }
.tv-popup__links { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 1rem; }
.tv-popup .tv-knap { min-height: 40px; }

/* Enkelt sted */
.tv-enkeltkort { height: 320px; border-radius: 14px; overflow: hidden; border: 2px solid var(--tv-kant, #d6dde5); z-index: 0; }

/* Leaflet-kontroller lidt større til berøring */
.leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; }
.leaflet-container { font-family: inherit; }
.leaflet-container a { color: #1f5f8b; }

@media (max-width: 900px) {
	.tv-kortside__indhold { grid-template-columns: 1fr; }
	.tv-kortside__kort { height: 62vh; min-height: 380px; }
	.tv-kortside__liste { max-height: none; }
	/* Filtre som vandret, swipebar række, så kortet ikke skubbes langt ned på mobil */
	.tv-kortside__filtre { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x proximity; }
	.tv-kortside__filtre .tv-filter { flex-shrink: 0; scroll-snap-align: start; }
}

/* Leaflets link-farve må ikke overskrive knapperne i popups */
.leaflet-container .tv-knap { color: #1f5f8b; }
.leaflet-container .tv-knap--primaer { color: #fff; background: #1f5f8b; }
.leaflet-container .tv-knap--primaer:hover { color: #fff; background: #164566; }
.leaflet-container .tv-knap--lys { color: #1b2430; border-color: #d6dde5; }
