* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  color: #1a1a1a;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: #10375c;
  color: white;
}

header h1 {
  font-size: 1.2rem;
  margin: 0;
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls input[type="date"] {
  padding: 4px 6px;
  border-radius: 4px;
  border: none;
}

#map {
  height: calc(100vh - 60px);
  width: 100%;
}

#legend {
  position: absolute;
  bottom: 20px;
  left: 10px;
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  z-index: 1000;
}

.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}

.swatch.open {
  background: #2e7d32;
}

.swatch.closed {
  background: #c62828;
}

#cfs-box {
  position: absolute;
  bottom: 20px;
  right: 10px;
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  z-index: 1000;
  max-width: 260px;
}

#view-tabs {
  position: absolute;
  top: 76px;
  right: 10px;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 1000;
}

.view-tab {
  border: none;
  background: white;
  color: #1a1a1a;
  padding: 10px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
}

.view-tab:hover {
  background: #f0f0f0;
}

.view-tab.active {
  background: #10375c;
  color: white;
  font-weight: 600;
}

#legend-conditions {
  max-width: 200px;
}
