/* html/css/map-views.css
   Saved Map Views — bottom-strip chip UI on the map runtime.
   Loaded by map-view.html. Independent from map-view.css so the
   feature can be reverted without touching the runtime stylesheet. */

#map-views-strip {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 1100;
  max-width: calc(100vw - 32px);
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

#map-views-strip::-webkit-scrollbar { height: 6px; }
#map-views-strip::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

.map-view-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  background: #f1f3f5;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  color: #212529;
  font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.map-view-chip:hover { background: #e7eaee; }
.map-view-chip.active {
  background: #0d6efd;
  color: #fff;
  border-color: #0a58ca;
}
.map-view-chip.stale { opacity: 0.7; }
.map-view-chip.stale::after {
  content: '\f071';                          /* fa-triangle-exclamation */
  font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.7rem;
  color: #b45309;
  margin-left: 0.25rem;
}

.map-view-chip-scope {
  font-size: 0.65rem;
  opacity: 0.65;
  font-weight: 400;
}

.map-view-chip-menu {
  margin-left: 0.2rem;
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.55;
  padding: 0 0.15rem;
}
.map-view-chip-menu:hover { opacity: 1; }

.map-view-add-chip {
  background: #fff;
  border: 1px dashed #adb5bd;
  color: #495057;
}
.map-view-add-chip:hover { background: #f8f9fa; border-color: #495057; }

.map-view-divider {
  width: 1px;
  height: 1.5rem;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 0.15rem;
  flex-shrink: 0;
}

/* Inline popovers used by the strip (save / rename / delete confirm) */
#map-view-save-popover,
.map-view-popover {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 0.5rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  padding: 0.75rem;
  z-index: 1200;
  width: min(90vw, 320px);
}

/* Style picker (palette / classes / classification) */
.map-view-style-popover {
  max-height: 70vh;
  overflow-y: auto;
  width: min(90vw, 300px);
}

/* LODES "About this data" explainer */
.map-view-lodes-explainer {
  width: min(92vw, 440px);
  max-height: 80vh;
  overflow-y: auto;
  font-size: 0.85rem;
}
.map-view-lodes-explainer p,
.map-view-lodes-explainer ul {
  font-size: 0.85rem;
  line-height: 1.4;
}
.map-view-palette-group {
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
}
.map-view-palette-swatch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.2rem 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  margin-bottom: 0.15rem;
  text-align: left;
  font-size: 0.75rem;
}
.map-view-palette-swatch:hover {
  background: #f4f6f8;
}
.map-view-palette-swatch.selected {
  border-color: #0d6efd;
  background: rgba(13, 110, 253, 0.06);
}
.map-view-palette-grad {
  display: inline-block;
  width: 90px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.map-view-palette-name {
  color: #212529;
}
