/* Lageplan Central Samui, Ebene L1. Nur auf der Seite „Laden & Anfahrt“ geladen.
   Interaktionskomponente nach der Übergabe von Matthias Gottschalk (27.09.2026), an die Website-Farbwelt angepasst.
   Die Karte bleibt auch im Dunkelmodus eine helle Fläche; Farben hier deshalb fest, nicht über die Theme-Tokens. */
.siteplan { padding-block: 48px; }
.siteplan-grid { display: grid; gap: 22px; }
.siteplan-map { position: relative; border: 2px solid var(--frame); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); color: #20363a; color-scheme: light; }
.lp-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Poster (Mobil): fester Ausschnitt um den Laden, Vektor, kein Zoom-Rahmen im Seitenfluss */
.siteplan-poster { position: relative; aspect-ratio: 4 / 3; background: #f4f7f8; }
.siteplan-poster > svg { display: block; width: 100%; height: 100%; }
.poster-sign { position: absolute; left: 53%; top: 54%; transform: translate(-50%, calc(-100% - 18px)); display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid #18e5d7; border-radius: 999px; padding: 6px 14px 6px 8px; font-weight: 800; color: #294ba5; box-shadow: 0 4px 14px rgba(15, 46, 68, 0.14); white-space: nowrap; pointer-events: none; }
.poster-sign::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 2px; height: 18px; background: #294ba5; }
.poster-sign img { width: 26px; height: 26px; }
.poster-open { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); min-height: 46px; padding: 10px 18px; font-size: 0.95rem; white-space: nowrap; }
.siteplan-desktop { display: none; }
.plan-topbar { display: none; }
@media (min-width: 960px) {
  .siteplan-grid { grid-template-columns: 1.55fr 1fr; align-items: start; }
  .siteplan-poster { display: none; }
  .siteplan-desktop { display: block; }
}

/* Vollbild (Mobil): dieselbe Komponente, fest über der Seite; Zurück-Taste und Kreuz schließen */
.siteplan.is-open .siteplan-desktop { display: block; position: fixed; inset: 0; z-index: 90; background: #fff; overflow: hidden; }
.siteplan.is-open .plan-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: env(safe-area-inset-top, 0) 8px 0 14px; border-bottom: 1px solid #d6eef1; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #294ba5; }
.plan-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #d6eef1; background: #fff; color: #0f2e44; font-size: 1.1rem; font-weight: 800; cursor: pointer; flex: none; }
.siteplan.is-open #interactive-site-plan .plan-frame { height: calc(100dvh - 56px - 58px - env(safe-area-inset-top, 0)); min-height: 0; border-radius: 0; }
.siteplan.is-open #interactive-site-plan .hint { display: none; }
body.plan-open { overflow: hidden; }

/* Seitenspalte: Wegschritte, Legende, Aktionen */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; align-items: start; }
.steps li::before { content: counter(s); grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--lagoon); color: #0f2e44; font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; color: var(--brand-blue); grid-column: 2; }
.steps span { grid-column: 2; color: var(--muted); font-size: 0.95rem; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-inline-end: 6px; vertical-align: -2px; border: 1px solid rgba(15, 46, 68, 0.15); }
.siteplan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.siteplan .small { color: var(--muted); font-size: 0.82rem; margin-top: 12px; }

/* Komponente */
#interactive-site-plan { --accent: #0c7f83; --primary: #294ba5; --muted-bg: #f4f7f8; --line: #d6e3e8; font: 14px/1.45 var(--font-body); color: #20363a; width: 100%; min-width: 0; }
#interactive-site-plan *, #interactive-site-plan *::before, #interactive-site-plan *::after { box-sizing: border-box; }
#interactive-site-plan .plan-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; }
#interactive-site-plan .plan-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#interactive-site-plan .pbtn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #20363a; cursor: pointer; }
#interactive-site-plan .pbtn:hover { background: #edf7f7; }
#interactive-site-plan .zoom-readout { min-width: 54px; text-align: center; color: #53676b; font-variant-numeric: tabular-nums; }
#interactive-site-plan .cursor-interaction { cursor: pointer; }
#interactive-site-plan :focus-visible:not(.place) { outline: 2px solid var(--accent); outline-offset: 3px; }
#interactive-site-plan .plan-frame { -webkit-tap-highlight-color: transparent; }
#interactive-site-plan .place:focus { outline: none; }   /* Flächen: nie ein Rahmen, weder bei Tipp noch bei Tastaturfokus; die Füllung zeigt die Auswahl */
@media (pointer: coarse) { #interactive-site-plan .pbtn { min-width: 44px; min-height: 44px; } }
#interactive-site-plan .plan-frame { position: relative; overflow: hidden; height: 520px; min-height: 360px; background: var(--muted-bg); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
#interactive-site-plan .plan-frame.is-dragging { cursor: grabbing; }
#interactive-site-plan .plan-stage { position: absolute; left: 0; top: 0; width: 1788px; height: 909px; transform-origin: 0 0; will-change: transform; }
#interactive-site-plan .plan-base, #interactive-site-plan .plan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#interactive-site-plan .plan-base { pointer-events: none; }
#interactive-site-plan .place { fill: transparent; stroke: transparent; stroke-width: 5; vector-effect: non-scaling-stroke; }
#interactive-site-plan .place:hover, #interactive-site-plan .place:focus { fill: rgba(12, 127, 131, 0.22); stroke: none; }
#interactive-site-plan .place.is-selected { fill: rgba(41, 75, 165, 0.28); stroke: none; }
#interactive-site-plan .place.bazaar { fill: transparent; stroke: none; }
#interactive-site-plan .place.bazaar:hover, #interactive-site-plan .place.bazaar:focus, #interactive-site-plan .place.bazaar.is-selected { fill: rgba(24, 229, 215, 0.18); stroke: none; }
#interactive-site-plan .shop-outline { fill: transparent; stroke: transparent; stroke-width: 0.8; stroke-linejoin: round; vector-effect: none; }
#interactive-site-plan .place.shop-outline:hover, #interactive-site-plan .place.shop-outline:focus, #interactive-site-plan .place.shop-outline.is-selected { fill: rgba(41, 75, 165, 0.28); stroke: none; }
#interactive-site-plan .service-hit { fill: transparent; stroke: none; }
#interactive-site-plan .micro-place:hover, #interactive-site-plan .micro-place:focus, #interactive-site-plan .micro-place.is-selected { fill: rgba(12, 127, 131, 0.35); stroke: none; }
#interactive-site-plan .hint { color: #53676b; margin: 0; padding: 8px 12px 10px; font-size: 0.85rem; }

/* Detailzeile (Desktop) bzw. Karte unten (Vollbild) */
#interactive-site-plan .detail { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px 0; }
#interactive-site-plan .detail[hidden] { display: none; }
#interactive-site-plan .detail .logo { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; font-size: 0.8rem; text-align: center; overflow: hidden; }
#interactive-site-plan .detail .logo img { width: 100%; height: 100%; object-fit: contain; }
#interactive-site-plan .detail strong { font-weight: 700; color: var(--primary); }
#interactive-site-plan .detail .type { color: #53676b; }
#interactive-site-plan .detail .photo, #interactive-site-plan .detail .text, #interactive-site-plan .detail .acts { display: none; }
.siteplan.is-open #interactive-site-plan .detail { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0)); background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 32px rgba(15, 46, 68, 0.14); }
.siteplan.is-open #interactive-site-plan .detail[hidden] { display: none; }
.siteplan.is-open #interactive-site-plan .detail .photo { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 12px; border: 2px solid #a8f2ec; grid-row: 1 / span 2; }
.siteplan.is-open #interactive-site-plan .detail .logo { grid-row: 1 / span 2; }
.siteplan.is-open #interactive-site-plan .detail .photo + .logo { display: none; }
.siteplan.is-open #interactive-site-plan .detail strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; align-self: end; }
.siteplan.is-open #interactive-site-plan .detail .type { align-self: start; }
.siteplan.is-open #interactive-site-plan .detail .text { display: block; grid-column: 1 / -1; margin: 0; color: #4f6678; font-size: 0.9rem; line-height: 1.35; }
.siteplan.is-open #interactive-site-plan .detail .acts { display: flex; gap: 8px; grid-column: 1 / -1; margin-top: 4px; }
.siteplan.is-open #interactive-site-plan .detail .acts a { flex: 1; min-height: 44px; padding: 10px 8px; font-size: 0.9rem; }

/* Schwebende Vorschau (Desktop-Hover, Tastaturfokus) */
#interactive-site-plan .store-preview { position: absolute; z-index: 10; width: 250px; padding: 10px; pointer-events: none; display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 22px rgba(24, 54, 58, 0.14); }
#interactive-site-plan .store-preview.is-visible { display: block; }
#interactive-site-plan .store-photo { display: none; height: 105px; overflow: hidden; background: var(--muted-bg); margin-bottom: 9px; border-radius: 8px; }
#interactive-site-plan .store-photo.has-photo { display: block; }
#interactive-site-plan .store-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
#interactive-site-plan .store-meta { display: flex; align-items: center; gap: 9px; }
#interactive-site-plan .store-logo { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; font-size: 0.85rem; text-align: center; overflow: hidden; }
#interactive-site-plan .store-logo img { width: 100%; height: 100%; object-fit: contain; }
#interactive-site-plan .store-copy { min-width: 0; }
#interactive-site-plan .store-name { font-weight: 700; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#interactive-site-plan .store-type { color: #53676b; font-size: 12px; }

/* Festes Anjuna-Schild mit Verbindungslinie (bleibt in Bildschirmpixeln gleich groß) */
#interactive-site-plan .shop-sign-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
#interactive-site-plan .shop-sign-layer[hidden] { display: none; }
#interactive-site-plan .shop-sign-leader { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#interactive-site-plan .shop-sign-leader line { stroke: var(--primary); stroke-width: 1.5; }
#interactive-site-plan .shop-sign-leader circle { fill: var(--primary); stroke: #fff; stroke-width: 1.5; }
#interactive-site-plan .shop-sign { position: absolute; display: flex; align-items: center; gap: 8px; width: 158px; height: 44px; padding: 5px 10px 5px 6px; background: #fff; color: var(--primary); border: 2px solid #18e5d7; border-radius: 22px; box-shadow: 0 2px 8px rgba(18, 57, 60, 0.19); font: 800 14px/1.2 var(--font-body); white-space: nowrap; }
#interactive-site-plan .shop-sign img { width: 32px; height: 32px; object-fit: contain; flex: none; }
@media (max-width: 600px) { #interactive-site-plan .plan-frame { height: 430px; } }
@media print { .siteplan-poster, .plan-toolbar, .hint { display: none; } }
