/* natureswimming.com live map template */
:root {
  --bg:#0f172a; --rail:#14532d; --panel:#fff; --panel-2:#f1f5f9;
  --ink:#0f172a; --muted:#64748b; --line:#e2e8f0; --accent:#0ea5e9;
  --t-wild:#2563eb; --t-spring_natural:#f97316; --t-pool_natural:#0d9488;
  --t-pool_open:#64748b; --t-pool_covered:#475569; --t-spa_thermal:#a855f7;
  --q-excellent:#16a34a; --q-good:#2563eb; --q-sufficient:#eab308; --q-poor:#dc2626; --q-unknown:#9ca3af;
}
* { box-sizing:border-box; }
html, body { height:100%; margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; color:var(--ink); }

.app {
  display:grid;
  grid-template-columns:160px 1fr 384px;
  grid-template-rows:1fr auto;
  grid-template-areas:"rail map panel" "ad ad ad";
  height:100vh;
}

/* rail */
.rail { grid-area:rail; background:var(--rail); display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; overflow-y:auto; }
.rail .group-label { display:none; }
.tool { width:auto; min-height:64px; border-radius:0; border:0; display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; padding:8px 10px; cursor:pointer; color:#ecfdf5; background:rgba(255,255,255,.06); font-size:13px; font-weight:600; line-height:1.15; text-align:left; user-select:none; transition:background .12s,border-color .12s,opacity .12s; }
.tool > span { flex:1; }
.tool:hover { background:rgba(255,255,255,.16); }
.tool .dot { width:16px; height:16px; border-radius:50%; border:2px solid #fff; }
.tool.filter.off { opacity:.35; }
.tool.filter.off .dot { background:transparent !important; }
.tool.action { background:rgba(255,255,255,.12); }
.tool.action.active { background:rgba(255,255,255,.3); box-shadow:inset 0 0 0 2px #fff; }
.tool svg { width:20px; height:20px; stroke:#ecfdf5; fill:none; stroke-width:2; }
.tool .ic { width:60px; height:60px; border-radius:50%; object-fit:cover; display:block; flex:none; }
.tool.filter.off .ic { filter:grayscale(1); opacity:.45; }

/* map */
#map { grid-area:map; height:100%; width:100%; background:#a5c8e1; position:relative; }
.map-title { position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:5; pointer-events:none; font-size:2vh; font-weight:800; letter-spacing:-.01em; color:#0f172a; background:rgba(255,255,255,.82); padding:.5vh 1.4vh; border-radius:999px; box-shadow:0 2px 10px rgba(0,0,0,.18); backdrop-filter:blur(3px); white-space:nowrap; }
.map-title .nat { color:var(--t-pool_natural); }
.map-title .swim { color:var(--accent); }
/* hover tooltip */
.nsw-tip .maplibregl-popup-content { padding:5px 9px; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,.18); font-size:12.5px; }
.nsw-tip .maplibregl-popup-tip { display:none; }
.tip-name { font-weight:700; color:#0f172a; margin-bottom:3px; }
.tip-q { display:flex; align-items:center; gap:6px; font-size:11.5px; color:#334155; line-height:1.5; }
.tip-q .dot { width:9px; height:9px; border-radius:50%; flex:none; }
.tip-type { display:inline-flex; align-items:center; gap:6px; font-weight:600; color:#334155; }
.tip-type .dot { width:9px; height:9px; border-radius:50%; }

.marker { width:40px; height:40px; border-radius:50%; border:2px solid #fff; box-shadow:0 1px 5px rgba(0,0,0,.35); cursor:pointer; transition:transform .1s; background-size:cover; background-position:center; background-repeat:no-repeat; }
.marker:hover { transform:scale(1.18); }

/* panel */
.panel { grid-area:panel; background:var(--panel); border-left:1px solid var(--line); display:flex; flex-direction:column; overflow:hidden; }
.panel-head { padding:14px 18px; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:10px; }
.brand { font-weight:800; font-size:17px; letter-spacing:-.01em; text-decoration:none; }
.brand .nat { color:var(--t-pool_natural); } .brand .swim { color:var(--accent); }
.search { margin-left:auto; position:relative; }
.search input { width:150px; padding:7px 10px 7px 30px; border:1px solid var(--line); border-radius:9px; font-size:13px; outline:none; }
.search svg { position:absolute; left:8px; top:7px; width:16px; height:16px; stroke:var(--muted); fill:none; stroke-width:2; }
.panel-body { padding:0; overflow-y:auto; flex:1; }

.gallery { padding:16px 18px 0; }
.hero { height:190px; border-radius:14px; position:relative; overflow:hidden; display:flex; align-items:flex-end; color:#fff; }
.hero .type-chip { position:absolute; top:12px; left:12px; background:rgba(0,0,0,.55); padding:4px 10px; border-radius:999px; font-size:11px; font-weight:600; display:flex; align-items:center; gap:6px; }
.hero .type-chip .dot { width:9px; height:9px; border-radius:50%; }
.thumbs { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-top:8px; }
.thumb { height:64px; border-radius:10px; }

.card { padding:14px 18px 20px; }
.title-row { display:flex; align-items:baseline; gap:8px; }
.title-row h2 { margin:0; font-size:21px; letter-spacing:-.02em; }
.loc { color:var(--muted); font-size:13px; margin:2px 0 12px; display:flex; align-items:center; gap:5px; }
.loc svg { width:14px; height:14px; stroke:var(--muted); fill:none; stroke-width:2; }
.quality { display:inline-flex; align-items:center; gap:8px; padding:7px 12px; border-radius:10px; font-size:13px; font-weight:600; color:#fff; margin-bottom:14px; }
.quality .q-dot { width:10px; height:10px; border-radius:50%; background:rgba(255,255,255,.9); }
.quality small { font-weight:400; opacity:.9; }
.desc { font-size:14px; line-height:1.5; color:#334155; margin:0 0 14px; }
.facts { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.chip { display:inline-flex; align-items:center; gap:6px; background:var(--panel-2); border:1px solid var(--line); border-radius:999px; padding:6px 11px; font-size:12.5px; color:#334155; }
.chip svg { width:14px; height:14px; stroke:#334155; fill:none; stroke-width:2; }
.chip.fee { background:#ecfeff; border-color:#a5f3fc; color:#0e7490; font-weight:600; }
.actions { display:flex; gap:8px; }
.btn { flex:1; text-align:center; padding:10px; border-radius:10px; font-size:13px; font-weight:600; border:1px solid var(--line); background:#fff; color:var(--ink); cursor:pointer; text-decoration:none; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }

.empty { padding:28px 18px; }
.empty h3 { margin:0 0 6px; font-size:16px; }
.empty p { color:var(--muted); font-size:13.5px; line-height:1.5; margin:0 0 18px; }
.legend-types { display:flex; flex-wrap:wrap; gap:8px 12px; margin:12px 0; }
.leg { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:#334155; }
.leg .dot { width:11px; height:11px; border-radius:50%; }
.featured { display:flex; flex-direction:column; gap:10px; }
.feat { display:flex; gap:12px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:12px; cursor:pointer; transition:border-color .12s,background .12s; }
.feat:hover { border-color:var(--accent); background:#f8fafc; }
.feat .swatch { width:46px; height:46px; border-radius:10px; flex:none; }
.feat .ft { font-weight:600; font-size:14px; } .feat .fs { color:var(--muted); font-size:12px; }

/* ad strip: fits a centered 970x90 (or 728x90) leaderboard / sponsor logo */
.ad { grid-area:ad; height:90px; background:linear-gradient(90deg,#bbf7d0,#a7f3d0); display:flex; align-items:center; justify-content:center; border-top:1px solid #86efac; overflow:hidden; }
.ad > * { max-width:100%; }

@media (max-width:880px) {
  .app { grid-template-columns:1fr; grid-template-rows:92px 1fr 42vh auto; grid-template-areas:"rail" "map" "panel" "ad"; }
  .rail { flex-direction:row; overflow-x:auto; padding:0; gap:0; }
  .rail .group-label { display:none; }
  .panel-head .search input { width:120px; }
  .tool { flex-direction:column; width:72px; min-height:92px; gap:3px; padding:6px 4px; font-size:10px; text-align:center; justify-content:center; }
  .tool .ic { width:40px; height:40px; }
  .tool > span { flex:none; }
  .ad { height:auto; min-height:56px; padding:6px 0; }
}
