/* ── Layout ──────────────────────────────────────────────────────────────────── */

.main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

#map {
  flex: 1;
  height: 100%;
  min-height: 0;
  position: relative;
}

/* ── Desktop side panel ──────────────────────────────────────────────────────── */

.panel {
  width: 300px;
  flex-shrink: 0;
  background: var(--ocean);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sec-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--muted);
}

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

.legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.leg-sub {
  font-size: 10px;
  color: var(--muted);
}

.leg-title {
  font-size: 13px;
}

.leg-info {
  margin-top: 12px;
  padding: 10px;
  background: var(--card);
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Search ──────────────────────────────────────────────────────────────────── */

.search-wrap {
  padding: 8px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.search-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--accent);
}

/* ── Time slider ─────────────────────────────────────────────────────────────── */

.ts-bar {
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ts-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}

.ts-icon {
  font-size: 13px;
  line-height: 1;
}

.ts-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  flex: 1;
}

.ts-input {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  display: block;
}

.ts-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 200, 240, 0.5);
}

.ts-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(0, 200, 240, 0.5);
}

.ts-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 9px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.2px;
}

/* ── Beach list ──────────────────────────────────────────────────────────────── */

.beach-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}

.beach-scroll::-webkit-scrollbar {
  width: 3px;
}

.beach-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.blist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bitem {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.bitem:hover,
.bitem.active {
  border-color: var(--accent);
  background: var(--card2);
}

.bdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.binfo {
  flex: 1;
  min-width: 0;
}

.bname {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bzone {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.bpct {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.pct-safe {
  color: var(--safe);
}

.pct-warn {
  color: var(--warn);
}

.pct-danger {
  color: var(--danger);
}

.map-credit {
  position: absolute;
  bottom: 6px;
  right: 8px;
  z-index: 1000;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.55;
  white-space: nowrap;
}

.map-credit a {
  color: inherit;
  text-decoration: none;
}

.map-credit a:hover {
  opacity: 1;
  color: var(--text);
}

/* ── Error banner ──────────────────────────────────────────────────────────── */

.error-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 14, 28, 0.88);
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  max-width: min(420px, 90vw);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.error-banner.visible {
  opacity: 1;
  visibility: visible;
}

.error-banner__icon {
  color: var(--danger);
  font-size: 16px;
  flex-shrink: 0;
}

/* ── About link (desktop panel) ───────────────────────────────────────────── */

.about-link {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
}

.about-link:hover {
  color: var(--text);
}

/* ── Disclaimer modal ─────────────────────────────────────────────────────── */

.disc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(6, 14, 28, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.disc-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.disc-modal {
  position: relative;
  z-index: 9999;
  background: var(--ocean);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 400px;
  width: 90vw;
  font-family: 'DM Sans', sans-serif;
}

.disc-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 14px;
}

.disc-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.disc-body p {
  margin-bottom: 12px;
}

.disc-body p:last-child {
  margin-bottom: 0;
}

.disc-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: var(--deep);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* ── Mobile info tab content ──────────────────────────────────────────────── */

.bs-info-content {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.bs-info-content p {
  margin-bottom: 14px;
}

.bs-info-content p:last-child {
  margin-bottom: 0;
}