/* ── Map Settings Panel ──────────────────────────────────────────── */

.map-settings-gear {
  position: absolute;
  top: 100px;
  left: 10px;
  z-index: 850;
  width: 29px;
  height: 29px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--wing-glass);
  backdrop-filter: blur(8px);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color 0.15s, border-color 0.15s;
  user-select: none;
  padding: 0;
}

.map-settings-gear:hover {
  color: var(--text);
  border-color: var(--accent);
}

.map-settings-gear.open {
  color: var(--accent);
  border-color: var(--accent);
}

.map-settings-panel {
  position: absolute;
  top: 10px;
  left: 48px;
  z-index: 850;
  background: var(--wing-glass-dense);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  width: 240px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.map-settings-panel .ms-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.map-settings-panel .ms-section {
  margin-bottom: 10px;
}

.map-settings-panel .ms-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.map-settings-panel .ms-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.map-settings-panel .ms-color-input {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  flex-shrink: 0;
}

.map-settings-panel .ms-color-input::-webkit-color-swatch-wrapper {
  padding: 1px;
}

.map-settings-panel .ms-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.map-settings-panel .ms-hex {
  font-size: 9px;
  color: #94a3b8;
  font-family: monospace;
}

.map-settings-panel .ms-depth-label {
  font-size: 10px;
  color: var(--text);
  min-width: 48px;
  text-align: right;
}

.map-settings-panel select {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  outline: none;
  width: 100%;
}

.map-settings-panel select:focus {
  border-color: var(--accent);
}

.map-settings-panel .ms-reset {
  width: 100%;
  font-size: 9px;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}

.map-settings-panel .ms-reset:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ── ENC Settings additions ──────────────────────────────────────── */

.map-settings-panel .ms-title .ms-reset-btn {
  float: right;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
}

.map-settings-panel .ms-title .ms-reset-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.map-settings-panel .ms-toggle-all {
  float: right;
}

.map-settings-panel .ms-toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.map-settings-panel .ms-toggle-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
}

.map-settings-panel .ms-toggle-item input[type="checkbox"] {
  width: 12px;
  height: 12px;
  margin: 0;
  cursor: pointer;
}

.map-settings-panel .ms-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  font-size: 10px;
  color: var(--muted);
}

.map-settings-panel .ms-color-row input[type="color"] {
  width: 28px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}

.map-settings-panel .ms-color-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 1px;
}

.map-settings-panel .ms-color-row input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

/* ── Depth Legend ──────────────────────────────────────────────────── */

.depth-legend {
  position: absolute;
  bottom: 44px;
  left: 10px;
  z-index: 800;
  background: var(--wing-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.depth-legend__bar {
  width: 14px;
  border-radius: 3px;
  min-height: 120px;
}

.depth-legend__ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 8px;
  color: var(--muted);
  font-family: monospace;
  padding: 1px 0;
}
