/* Presentation for map.html only; shared map and public-map styles stay intact. */
.page-main.map-workspace-main { padding: 0; }
.map-workspace {
  position: relative;
  height: calc(100dvh - var(--topbar-h, 72px) - var(--safe-area-top, 0px));
  min-height: 360px;
  isolation: isolate;
}
.map-workspace > .map-container { height: 100%; min-height: 0; border: 0; border-radius: 0; }
.map-workspace > .map-toolbar {
  position: absolute; inset: 0; z-index: 20; display: block;
  padding: 0; margin: 0; border: 0; border-radius: 0; background: none;
  box-shadow: none; pointer-events: none;
}
.map-workspace .map-toolbar > * { pointer-events: auto; }
.map-workspace .map-location-bar {
  position: absolute; top: 16px; left: 16px; width: min(420px, calc(100% - 160px));
  display: block; margin: 0; padding: 10px; border: 1px solid #2a3647;
  border-radius: 12px; background: #111821; box-shadow: 0 6px 24px #0004;
}
.map-workspace .map-location-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.map-workspace .map-location-controls { display: flex; gap: 6px; width: 100%; }
.map-workspace #mapLocationInput { flex: 1 1 calc(100% - 64px); width: 0; min-width: 0; }
.map-workspace .map-location-action { width: auto; min-width: 0; min-height: 36px; padding: 8px 12px; }
.map-workspace #mapLocationGo { background: #2563eb; }
.map-workspace #mapLocationSave, .map-workspace #mapLocationUs { font-size: 12px; }
.map-workspace .map-saved-locations { width: auto; margin: 8px 0 0; }
.map-workspace .map-saved-locations summary { cursor: pointer; font-size: 11px; letter-spacing: .03em; }
.map-workspace .map-saved-locations-list { max-height: 160px; overflow: auto; padding-top: 8px; }
.map-workspace .map-location-bar:has(details[open]) { z-index: 25; }
.map-workspace .map-mode-switch { position: absolute; left: 16px; top: 152px; width: min(300px, calc(100% - 160px)); border-radius: 10px; }
.map-workspace .map-mode-switch::before, .map-workspace .map-mode-switch-btn { border-radius: 7px; }
.map-workspace .map-mode-switch-btn { padding: 12px 8px; }
.map-workspace .map-display-menu { position: absolute; right: 16px; top: 16px; }
.map-workspace .map-toolbar > .toolbar-dropdown { position: absolute; right: 16px; width: auto; }
.map-workspace [data-dropdown-name="tools"] { top: 66px; }
.map-workspace [data-dropdown-name="submit"] { top: 166px; }
.map-workspace .map-guide-trigger { position: absolute; right: 16px; top: 116px; margin: 0; display: flex; }
.map-workspace .toolbar-trigger { min-height: 40px; border-radius: 9px; width: auto; background: #111821; color: #e5eefc; box-shadow: 0 4px 14px #0003; }
.map-workspace summary.toolbar-trigger { display: flex; cursor: pointer; list-style: none; }
.map-workspace summary::-webkit-details-marker { display: none; }
.map-workspace .map-display-menu > summary { background: #1d4ed8; border-color: #60a5fa66; }
.map-workspace .toolbar-dropdown { display: block; }
.map-workspace .map-display-panel, .map-workspace .map-conditions-workspace-panel,
.map-workspace .map-toolbar > .toolbar-dropdown > .toolbar-dropdown-panel {
  position: absolute; top: 48px; right: 0; left: auto; z-index: 45;
  width: min(400px, calc(100vw - 48px)); max-height: calc(100dvh - var(--topbar-h, 72px) - 100px);
  overflow: auto; overscroll-behavior: contain; padding: 12px;
  border: 1px solid #2a3647; border-radius: 12px; background: #111821;
  box-shadow: 0 16px 40px #0006;
}
.map-workspace .map-display-menu[open], .map-workspace .map-mode-panel:has(details[open]),
.map-workspace .map-toolbar > .toolbar-dropdown.is-open { z-index: 50; }
.map-workspace .map-display-panel .toolbar-dropdown { width: 100%; margin-top: 8px; }
.map-workspace .map-display-panel .toolbar-trigger { width: 100%; justify-content: space-between; }
.map-workspace .map-display-panel .toolbar-dropdown-panel { position: static; width: 100%; max-height: none; box-shadow: none; padding: 8px 0; border: 0; }
.map-workspace .map-workspace-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #cbd5e1; font-size: 13px; font-weight: 700; }
.map-workspace [data-workspace-close], .map-workspace [data-dropdown-close] { padding: 8px; border: 1px solid #334155; background: #1b2430; border-radius: 7px; color: #e5eefc; cursor: pointer; }
.map-workspace #mapConditionsModePanel { position: absolute; top: 210px; left: 16px; width: auto; }
.map-workspace #mapConditionsModePanel[hidden] { display: none; }
.map-workspace .map-conditions-workspace-panel { left: 0; right: auto; max-height: calc(100dvh - var(--topbar-h, 72px) - 285px); }
.map-workspace .map-conditions-mode-body { display: grid; grid-template-columns: 1fr; }
.map-workspace .map-conditions-mode-shell { padding: 0; border: 0; }
.map-workspace .map-conditions-mode-header .section-summary { display: none; }
.map-workspace #status { position: absolute; bottom: 32px; left: 16px; max-width: min(440px, calc(100% - 180px)); max-height: 80px; overflow: auto; padding: 6px 9px; margin: 0; background: #111821eb; font-size: 11px; pointer-events: auto; }
.map-workspace .maplibregl-ctrl-top-right, .map-workspace .maplibregl-ctrl-top-left { top: 224px; }
.map-workspace .map-conditions-timeline-toggle { top: auto; bottom: 82px; right: 16px; }
.map-workspace .conditions-floating-report-btn { bottom: 32px; right: 16px; }
.map-workspace .map-conditions-timeline { top: 230px; bottom: 88px; right: 16px; }
.map-workspace button:focus-visible, .map-workspace summary:focus-visible { outline: 2px solid #93c5fd; outline-offset: 3px; }
@media (max-width: 900px) {
  .map-workspace .map-location-bar { width: calc(100% - 32px); }
  .map-workspace .map-mode-switch { width: min(300px, calc(100% - 32px)); }
  .map-workspace .map-display-menu { top: 210px; }
  .map-workspace [data-dropdown-name="tools"] { top: 260px; }
  .map-workspace .map-guide-trigger { top: 310px; }
  .map-workspace [data-dropdown-name="submit"] { top: 360px; }
  .map-workspace .maplibregl-ctrl-top-right, .map-workspace .maplibregl-ctrl-top-left { top: 258px; left: 6px; right: auto; }
  .map-workspace .map-display-panel, .map-workspace .map-conditions-workspace-panel,
  .map-workspace .map-toolbar > .toolbar-dropdown > .toolbar-dropdown-panel {
    position: fixed; top: auto; bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px; right: 12px; width: auto; max-height: 58dvh;
    border-radius: 18px 18px 12px 12px;
  }
  .map-workspace .map-conditions-timeline { top: auto; bottom: 88px; max-height: 55dvh; }
  .map-workspace .map-display-panel::before, .map-workspace .map-conditions-workspace-panel::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 4px; background: #64748b; margin: 0 auto 12px; }
  .map-workspace #status { max-width: calc(100% - 200px); }
}
@media (max-height: 650px) and (min-width: 901px) {
  .map-workspace .map-conditions-workspace-panel { position: fixed; top: calc(var(--topbar-h, 72px) + 16px); left: auto; right: 150px; max-height: calc(100dvh - var(--topbar-h, 72px) - 32px); }
}
/* Keep exploration controls accessible while condition overlays are active. */
.map-workspace[data-map-mode="conditions"] .toolbar-dropdown { display: block; }
.map-workspace[data-map-mode="conditions"] .map-guide-trigger { display: flex; }
@media (max-width: 900px) and (min-width: 560px) and (max-height: 600px) {
  .map-workspace .map-location-bar { width: min(420px, calc(100% - 160px)); }
  .map-workspace .map-display-menu { top: 16px; }
  .map-workspace [data-dropdown-name="tools"] { top: 66px; }
  .map-workspace .map-guide-trigger { top: 116px; }
  .map-workspace [data-dropdown-name="submit"] { top: 166px; }
}
.map-workspace .map-conditions-timeline { z-index: 30; }
