/*
 * File: map-attribution.css
 * Purpose: Compact mandatory credits and an expandable secondary-source panel.
 * Dependencies: map-mode-attribution.js markup; styles.css positioning.
 * Public entry: map.html stylesheet; .map-attribution-* selectors.
 * Side effects: None; disclosure overlays the map without resizing it.
 */

/* Keep mandatory names readable; permit wrapping on narrow map viewports. */
.map-attribution {
  background: rgba(255, 255, 255, 0.94);
  font-size: 11px;
}

.map-attribution-primary { display: inline; }
/* Expanded legal text must sit above the neighboring compass/coordinate controls. */
.map-attribution:has(details[open]) { z-index: 9; }
.map-attribution-details { display: inline; }
.map-attribution-details summary {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 4px;
  color: #344b40;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  list-style: none;
}
.map-attribution-details summary::-webkit-details-marker { display: none; }
.map-attribution-details summary:focus-visible {
  outline: 2px solid #4285F4;
  outline-offset: 2px;
}

/* Absolute popup leaves the observed attribution bar and map canvas unchanged. */
.map-attribution-sources {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(350px, 100%);
  box-sizing: border-box;
  max-height: min(220px, 45dvh);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #d5d8dc;
  border-radius: 8px;
  background: #fff;
  color: #41474d;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 4px 16px #0002;
}
