/* Oreo Atlas Minimal Map UI V1 — presentation-only overrides. */
:root {
  --atlas-ink: #17333b;
  --atlas-muted: #687d82;
  --atlas-line: #e4eaeb;
  --atlas-paper: #fff;
}

.header {
  height: 52px;
  padding: 0 16px;
  gap: 14px;
  background: #153039;
}
.brand { gap: 7px; font-size: 14px; letter-spacing: .1em; }
.brand-mark { font-size: 22px; }
.header-label, #sync-label { display: none !important; }
.header-end { gap: 7px; }
.header-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 0;
}
.header-button svg { width: 18px; height: 18px; }
.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  height: calc(100dvh - 52px);
  min-height: 420px;
}
.workspace.minimal-images-closed > .library { display: none !important; }
.workspace.minimal-images-open { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) !important; }
.library { min-width: 0; border-right-color: var(--atlas-line); }
.library-head { padding: 16px 16px 0; }
.library h1 { margin: 3px 0 12px; font-size: 20px; }
.library .eyebrow { font-size: 9px; }
.library .filter-row, .library .dates, .library .list-caption { font-size: 12px; }
.map-section { min-width: 0; min-height: 0; }
.map-toolbar {
  top: 10px;
  left: auto;
  right: 12px;
  z-index: 760;
  gap: 6px;
}
.map-toolbar .map-mode {
  gap: 5px;
  padding: 6px 8px;
  border-color: transparent;
  box-shadow: none;
  background: rgb(255 255 255 / 82%);
  font-size: 10px;
}
.map-toolbar #fit { display: none; }
.map-toolbar .map-button { min-width: 34px; min-height: 34px; padding: 0; }
.minimal-icon-button {
  display: inline-grid !important;
  place-items: center;
  width: 42px;
  height: 42px;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #4b646a !important;
  font-size: 0 !important;
  transition: background .14s ease, color .14s ease;
}
.minimal-icon-button:hover { background: #eff4f3 !important; color: #173d43 !important; }
.minimal-icon-button.is-active,
.minimal-icon-button[aria-expanded="true"],
.minimal-icon-button[aria-pressed="true"] {
  background: #e6f1ee !important;
  color: #126c61 !important;
}
.minimal-icon-button svg { width: 20px; height: 20px; pointer-events: none; }
#uav-solar-analysis-toggle.minimal-icon-button[aria-pressed="true"] {
  background: #f5f0df !important;
  color: #8a6611 !important;
}
#map-toolbar-legacy { display: none !important; }
.map-tool-rail {
  position: absolute;
  z-index: 930;
  top: 64px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgb(222 231 231 / 84%);
  border-radius: 14px;
  background: rgb(255 255 255 / 91%);
  box-shadow: 0 2px 10px rgb(17 48 55 / 8%);
  backdrop-filter: blur(8px);
}
.map-tool-rail .minimal-icon-button { position: relative; }
.map-tool-rail > #layer-toggle {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
}
.map-tool-rail .minimal-icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 9px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 6px;
  background: #17333b;
  color: #fff;
  font: 11px/1.2 Tahoma, "Segoe UI", sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.map-tool-rail .minimal-icon-button:hover::after,
.map-tool-rail .minimal-icon-button:focus-visible::after { opacity: 1; }
.layer-panel, .terrain-panel, #measure-panel, .uav-planner-panel {
  top: 64px !important;
  left: 66px !important;
  right: auto !important;
  bottom: auto !important;
  width: min(390px, calc(100% - 82px)) !important;
  max-height: calc(100% - 78px) !important;
  overflow: auto;
  border: 1px solid var(--atlas-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgb(19 47 54 / 15%) !important;
}
.uav-planner-panel { width: min(420px, calc(100% - 82px)) !important; }
.uav-head { padding: 10px 13px; min-height: 48px; }
.uav-head h2 { margin: 0; font-size: 16px; }
.uav-eyebrow { font-size: 8px; }
.uav-body { max-height: calc(100dvh - 140px); padding: 3px 14px 14px; }
.uav-disclosure {
  margin: 0;
  padding: 0 !important;
  border-bottom: 1px solid #edf0f0;
}
.uav-disclosure > summary,
.uav-sub-disclosure > summary {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 2px;
  cursor: pointer;
  list-style: none;
  color: #28474d;
  font-size: 12px;
  font-weight: 650;
  background: #fff;
}
.uav-disclosure > summary::-webkit-details-marker,
.uav-sub-disclosure > summary::-webkit-details-marker { display: none; }
.uav-disclosure > summary::after,
.uav-sub-disclosure > summary::after { content: "+"; margin-left: auto; color: #718287; font-size: 18px; font-weight: 400; }
.uav-disclosure[open] > summary::after,
.uav-sub-disclosure[open] > summary::after { content: "−"; }
.uav-disclosure-content { padding: 0 0 12px; }
.uav-survey-section > summary { color: #146d62; }
.uav-sub-disclosure { margin: 8px 0; border-top: 1px solid #edf0f0; }
.uav-sub-disclosure > summary { min-height: 36px; font-size: 11px; }
.uav-solar-analysis-map-ui { z-index: 880; }
.uav-solar-analysis-summary {
  top: 64px;
  right: 12px;
  width: min(260px, calc(100% - 84px));
  padding: 9px 10px;
  border-color: rgb(224 232 231 / 92%);
  border-radius: 12px;
  box-shadow: 0 3px 16px rgb(18 46 52 / 10%);
  backdrop-filter: blur(10px);
}
.uav-solar-analysis-summary header strong { font-size: 12px; }
.uav-solar-analysis-summary > p { margin: 4px 0 6px; font-size: 9px; }
.uav-solar-analysis-grid { grid-template-columns: 1fr 1fr; gap: 3px; }
.uav-solar-analysis-grid span { padding: 4px 5px; background: #f5f7f6; font-size: 8px; }
.uav-solar-analysis-grid b { font-size: 10px; }
.uav-sa-legend { gap: 4px 8px; margin: 6px 0 3px; font-size: 8px; }
.uav-sa-layer { grid-template-columns: 1fr 68px; margin-top: 2px; font-size: 9px; }
.uav-sa-layer label { min-height: 23px; }
.uav-solar-analysis-summary > small { margin-top: 5px; font-size: 8px; }
.uav-solar-advanced { margin-top: 4px; border-top: 1px solid #edf0f0; }
.uav-solar-advanced > summary { min-height: 27px; cursor: pointer; color: #607278; font-size: 9px; }
.uav-solar-map-bar {
  bottom: 12px;
  width: min(760px, calc(100% - 82px));
  grid-template-columns: 32px auto minmax(120px, 1fr) auto auto 112px 62px;
  gap: 5px;
  padding: 6px 8px;
  border-color: rgb(224 232 231 / 92%);
  border-radius: 11px;
  box-shadow: 0 3px 16px rgb(18 46 52 / 10%);
}
.map-coordinate-readout {
  position: absolute;
  z-index: 650;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 104px);
  padding: 5px 9px;
  border: 1px solid rgb(222 230 229 / 92%);
  border-radius: 9px;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 2px 9px rgb(18 46 52 / 12%);
  color: #3f5d61;
  font: 10px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .01em;
  white-space: nowrap;
  pointer-events: auto;
  user-select: none;
}
.map-coordinate-readout.is-stale { opacity: .76; }
#map-coordinate-format {
  max-width: 72px;
  padding: 1px 2px;
  border: 0;
  background: transparent;
  color: #526a70;
  font: 600 10px/1.35 Tahoma, "Segoe UI", sans-serif;
}
#map-coordinate-value { overflow: hidden; text-overflow: ellipsis; }
.uav-solar-analysis-active .map-coordinate-readout { bottom: 72px; }
#coordinate-panel { display: none !important; }
.map-scale-label { display: none !important; }
.leaflet-control-zoom a { width: 28px !important; height: 28px !important; line-height: 28px !important; }
.leaflet-bottom.leaflet-left { bottom: 5px; }
.leaflet-bottom.leaflet-right { bottom: 5px; right: 5px; }
.minimal-images-open > .library { min-height: 0; }

@media (max-width: 900px) {
  .workspace.minimal-images-open { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr) !important; }
  .uav-solar-analysis-summary { width: min(245px, calc(100% - 84px)); }
}
@media (max-width: 700px) {
  .workspace.minimal-images-open { grid-template-columns: minmax(0, 1fr) !important; }
  .workspace.minimal-images-open > .library {
    position: absolute;
    z-index: 1100;
    inset: 0 auto 0 0;
    display: flex !important;
    width: min(340px, calc(100vw - 72px));
    box-shadow: 8px 0 24px rgb(12 37 45 / 14%);
  }
  .workspace > .map-section { grid-column: 1; }
  .map-tool-rail { top: 58px; left: 8px; gap: 1px; padding: 3px; }
  .minimal-icon-button { width: 38px; height: 38px; min-width: 38px !important; min-height: 38px !important; }
  .layer-panel, .terrain-panel, #measure-panel {
    top: 58px !important;
    left: 56px !important;
    width: min(360px, calc(100% - 64px)) !important;
    max-height: calc(100% - 70px) !important;
  }
  .uav-planner-panel {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-height: 76dvh !important;
    border-radius: 16px 16px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .uav-body { max-height: calc(76dvh - 58px); }
  .uav-solar-analysis-summary { top: 58px; right: 8px; width: min(232px, calc(100% - 58px)); }
  .uav-solar-map-bar {
    bottom: 8px;
    left: 54px;
    transform: none;
    width: calc(100% - 62px);
    grid-template-columns: 30px 42px minmax(0, 1fr) 48px;
  }
  .uav-solar-map-bar > span:nth-of-type(1),
  .uav-solar-map-bar > span:nth-of-type(2),
  .uav-solar-map-bar label:nth-of-type(1),
  .uav-solar-map-bar label:nth-of-type(2) { display: none; }
  .uav-solar-map-bar > strong { justify-self: center; }
  .uav-solar-map-bar input[type=date] { max-width: 100%; }
  .map-coordinate-readout { bottom: 28px; max-width: calc(100% - 86px); gap: 4px; padding: 4px 7px; font-size: 9px; }
  #map-coordinate-format { max-width: 62px; font-size: 9px; }
  #map-coordinate-value { max-width: min(54vw, 225px); }
  .uav-solar-analysis-active .map-coordinate-readout { bottom: 73px; }
}
@media (max-width: 380px) {
  .uav-solar-analysis-summary { width: min(205px, calc(100% - 58px)); }
  .uav-sa-layer { grid-template-columns: 1fr 54px; }
  .map-tool-rail { left: 5px; }
  .minimal-icon-button { width: 35px; height: 35px; min-width: 35px !important; min-height: 35px !important; }
  .map-coordinate-readout { max-width: calc(100% - 76px); gap: 3px; padding: 4px 6px; }
  #map-coordinate-value { max-width: 48vw; }
}
@media (prefers-reduced-motion: reduce) {
  .minimal-icon-button, .map-tool-rail .minimal-icon-button::after { transition: none; }
}
