/* ─── Malta — Site view (MapLibre GL) ─── platform addition; follows the island palette */
#site { position: fixed; inset: 0; z-index: 4; display: none; background: var(--sea); }
body[data-view="site"] #site { display: block; }
body[data-view="site"] #map { visibility: hidden; }
body[data-view="site"] header .sub { display: none; }
#site-map { position: absolute; inset: 0; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-attrib { background: rgba(13,20,25,0.85) !important; color: #5b727c !important; font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.maplibregl-ctrl-attrib a { color: #7fa0ad !important; }
.maplibregl-ctrl-group { background: rgba(13,20,25,0.9) !important; border: 1px solid var(--hair); box-shadow: 0 6px 22px rgba(0,0,0,0.5) !important; }
.maplibregl-ctrl-group button { filter: invert(0.85); }
.maplibregl-popup-content { background: rgba(10,17,21,0.96); color: var(--ink); border: 1px solid var(--hair); border-radius: 10px; font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 10px 12px; max-width: 320px; }
.maplibregl-popup-tip { border-top-color: rgba(10,17,21,0.96) !important; }
.maplibregl-popup-close-button { color: var(--ink-dim); font-size: 16px; }
.sp-title { font-family: "Archivo", sans-serif; font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.sp-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.sp-row span { color: var(--ink-dim); } .sp-row b { font-weight: 500; text-align: right; }
.sp-src { margin-top: 6px; font-size: 10px; color: #54707c; line-height: 1.4; }

/* top bar: address search + state */
#site-bar { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; gap: 8px; align-items: center; }
body:not([data-view="site"]) #site-bar { display: none; }
#site-search { position: relative; }
#site-search input { width: 360px; max-width: 70vw; background: rgba(13,20,25,0.92); border: 1px solid var(--hair); color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 8px 12px 8px 30px; border-radius: 999px; outline: none; backdrop-filter: blur(6px); }
#site-search input:focus { border-color: #4a6570; }
#site-search .ss-ico { position: absolute; left: 11px; top: 7px; color: #51707d; font-size: 13px; pointer-events: none; }
#site-results { position: absolute; top: 36px; left: 0; right: 0; background: rgba(13,20,25,0.97); border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; display: none; box-shadow: 0 14px 40px rgba(0,0,0,0.5); }
#site-results.open { display: block; }
#site-results button { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; padding: 8px 12px; cursor: pointer; }
#site-results button:hover { background: #1a262d; }
#site-results .ss-note { padding: 8px 12px; color: var(--ink-dim); font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.site-chip { background: rgba(13,20,25,0.9); border: 1px solid var(--hair); color: var(--ink-dim); font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.06em; padding: 7px 13px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); }
.site-chip:hover { color: var(--ink); border-color: #4a6570; }
.site-chip.zoom { color: #7fa0ad; cursor: default; }
.site-chip.on { color: #ffe0a0; border-color: #a8873a; background: rgba(255,207,94,0.14); }
.site-chip.rep { color: #ffe0a0; border-color: #6e5a2a; background: rgba(255,207,94,0.1); }
.site-chip.rep:hover { border-color: #a8873a; background: rgba(255,207,94,0.22); color: #fff; }

/* site-only layers panel (right side, registry-generated) */

/* attribution footer for the site view (registry sources of the layers on + basemap) */
#site-attrib { position: fixed; left: 28px; bottom: 18px; max-width: 560px; z-index: 5; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #5b727c; line-height: 1.5; display: none; }
body[data-view="site"] #site-attrib { display: block; }
body[data-view="site"] footer { display: none; }

/* pin */
.site-pin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ffcf5e; background: rgba(255,207,94,0.25); box-shadow: 0 0 0 4px rgba(255,207,94,0.15), 0 0 14px rgba(255,207,94,0.6); cursor: pointer; }

@media (max-width: 820px) {
  #site-bar { top: calc(var(--hdr, 118px) + 8px); left: 12px; right: 12px; width: auto; transform: none; flex-wrap: wrap; }
  #site-search { flex: 1 1 100%; }
  #site-search input { width: 100%; max-width: none; }
  #site-attrib { left: 0; right: 0; bottom: 0; max-width: none; padding: 5px 12px 6px; font-size: 9px; line-height: 1.35; background: rgba(11,17,21,0.92); border-top: 1px solid var(--hair); z-index: 4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body[data-view="site"] #site-attrib { display: -webkit-box; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 34px; }
}
/* ── premium quote panel (gated service; drawn only from /api/premium/quote, no checkout while ordering is closed) ── */
.site-chip.prem { color: #c9b8ff; border-color: #4e3f8a; background: rgba(140,110,255,0.1); }
.site-premium { position: fixed; right: 20px; top: 122px; width: 340px; max-width: calc(100vw - 32px); z-index: 9; background: rgba(11,17,21,0.96); border: 1px solid #3c5560; border-radius: 12px; padding: 12px 14px; color: var(--ink); font-size: 12.5px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
.site-premium[hidden] { display: none; } .sp-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .sp-h b { color: #c9b8ff; } .sp-x { background: none; border: 0; color: var(--ink-dim); font-size: 18px; cursor: pointer; }
.sp-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } .sp-l { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: #a9c4d0; margin: 4px 0; } .sp-l b { color: #ffe0a0; }
.sp-inc { margin: 4px 0 6px 16px; padding: 0; } .sp-inc li { margin: 1px 0; } .sp-closed { color: #ffb0a0; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; border: 1px dashed #6e3a2a; border-radius: 8px; padding: 6px 8px; }
.sp-fine { font-family: "IBM Plex Mono", monospace; font-size: 9.5px; color: #6d8590; margin: 6px 0 0; } .sp-err, .sp-wait { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: #a9c4d0; } .sp-err { color: #ffb0a0; }
.sp-buy { background: #5a48b0; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; }
@media (max-width: 820px) { .site-premium { right: 8px; left: 8px; top: auto; bottom: 60px; width: auto; } }
