/* superclaim NCR hospital map. Uses only the page tokens on :root. Pairs with map.js.
   Rules are scoped under .sc-map so they win over maplibre-gl.css, which map.js injects later. */

.sc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-tools .zones { display: contents; }
.sc-near {
  font: inherit; font-size: 0.9375rem; font-weight: 600; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); background: var(--accent-soft, transparent); border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.sc-near svg { width: 18px; height: 18px; flex: none; }
.sc-near:active { transform: scale(0.97); }
.sc-near[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.sc-near[aria-busy="true"] { opacity: 0.6; }
@media (hover: hover) and (pointer: fine) { .sc-near[aria-pressed="false"]:hover { border-color: var(--accent); } }

/* Frame */
.sc-map {
  position: relative; width: 100%; height: 360px; margin-top: 24px; overflow: hidden;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-plate, 12px);
  font-family: var(--font);
}
@media (min-width: 768px) { .sc-map { height: 480px; } }
.sc-ph {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 24px; text-align: center;
  background: var(--tint); color: var(--muted); font-size: 0.9375rem;
  transition: opacity 200ms var(--ease-out);
}
.sc-map.sc-live .sc-ph { opacity: 0; pointer-events: none; }
.sc-map .maplibregl-canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* Popup */
.sc-map .maplibregl-popup { font-family: var(--font); }
.sc-map .maplibregl-popup-content {
  background: var(--plate); color: var(--plate-ink); border-radius: 12px; padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); font-size: 0.875rem; line-height: 1.35;
}
.sc-map .maplibregl-popup-content strong { display: block; font-weight: 600; }
.sc-map .maplibregl-popup-content span { display: block; opacity: 0.8; }
.sc-map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.sc-map .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.sc-map .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--plate); }
.sc-map .maplibregl-popup-anchor-top .maplibregl-popup-tip,
.sc-map .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.sc-map .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--plate); }
.sc-map .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--plate); }
.sc-map .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--plate); }

/* Zoom buttons, top right, no compass. Selectors match or beat maplibre-gl.css, which map.js
   inserts before the page's own stylesheets. */
.sc-map .maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 12px 12px 0 0; }
.sc-map .maplibregl-ctrl-group, .sc-map .maplibregl-ctrl-group:not(:empty) {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; overflow: hidden;
}
.sc-map .maplibregl-ctrl-group button { width: 36px; height: 36px; }
.sc-map .maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }
.sc-map .maplibregl-ctrl-group button:focus { box-shadow: none; }
.sc-map .maplibregl-ctrl-group button:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
.sc-map .maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon,
.sc-map .maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
  background-image: none; background-color: var(--ink);
  -webkit-mask: var(--sc-ico) center / 16px 16px no-repeat; mask: var(--sc-ico) center / 16px 16px no-repeat;
}
.sc-map .maplibregl-ctrl-zoom-in { --sc-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v12M2 8h12' stroke='%23000' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E"); }
.sc-map .maplibregl-ctrl-zoom-out { --sc-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h12' stroke='%23000' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E"); }
@media (hover: hover) and (pointer: fine) { .sc-map .maplibregl-ctrl-group button:not(:disabled):hover { background: var(--tint); } }

/* Attribution, compact, bottom right. Kept visible as the OSM and OpenFreeMap terms ask. */
.sc-map .maplibregl-ctrl.maplibregl-ctrl-attrib,
.sc-map .maplibregl-ctrl-attrib.maplibregl-compact {
  background: var(--bg); color: var(--muted); border: 1px solid var(--line); border-radius: 12px;
  font-size: 0.75rem; line-height: 1.4; font-family: var(--font); margin: 0 8px 8px 0; min-height: 24px;
}
.sc-map .maplibregl-ctrl-attrib a { color: var(--muted); }
.sc-map .maplibregl-ctrl-attrib.maplibregl-compact-show { padding: 2px 28px 2px 8px; }
.sc-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button,
.sc-map .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {
  background-image: none; background-color: var(--ink-soft);
  -webkit-mask: var(--sc-info) center / 16px 16px no-repeat; mask: var(--sc-info) center / 16px 16px no-repeat;
  --sc-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M8 7.2v4' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='4.8' r='1' fill='%23000'/%3E%3C/svg%3E");
}
.sc-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button:focus { box-shadow: none; }
.sc-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Two-finger / Ctrl-scroll hint */
.sc-map .maplibregl-cooperative-gesture-screen {
  background: color-mix(in srgb, var(--ink) 55%, transparent); color: var(--bg);
  font-family: var(--font); font-size: 1rem; font-weight: 600; padding: 24px;
}

/* List under the map */
.sc-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.sc-item {
  font: inherit; width: 100%; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px;
  padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease;
}
.sc-item .sc-name { font-size: 1rem; }
.sc-item .sc-meta { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-item[aria-current="true"] { background: var(--tint); box-shadow: inset 3px 0 0 var(--accent); }
@media (hover: hover) and (pointer: fine) { .sc-item:hover { background: var(--tint); } }
@media (min-width: 768px) { .sc-list { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
@media (min-width: 1024px) { .sc-list { grid-template-columns: 1fr 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .sc-near { transition: background-color 150ms ease, color 150ms ease; }
  .sc-near:active { transform: none; }
  .sc-ph { transition: none; }
}
.sc-map + .cap { margin-top: 24px; }
