/* ============================================================
   WATER BODY HEALTH INDEX — Styles
   ============================================================ */

/* ─── Layout ─── */
.page-container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.page-header { text-align: center; margin-bottom: 24px; }
.page-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800;
  background: linear-gradient(135deg, var(--fish-accent, #06b6d4), var(--fish-accent-bright, #22d3ee), var(--fish-accent-ultra, #67e8f9));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}
.page-header p { color: var(--fish-text-dim, #64748b); font-size: 0.95rem; max-width: 650px; margin: 0 auto; }

/* ─── Glass Panel ─── */
.glass-panel {
  background: rgba(10, 22, 40, 0.65); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
  padding: 22px; margin-bottom: 20px;
}
.section-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* ─── Search / Selector ─── */
.search-row {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px;
}
.search-row input, .search-row select {
  padding: 10px 14px; border-radius: 8px; font-size: 0.9rem;
  background: var(--fish-bg-raised, #0d2137); color: var(--fish-text, #e0e8f0);
  border: 1px solid rgba(255,255,255,0.1); outline: none; transition: border-color 0.2s;
}
.search-row input { flex: 1; min-width: 200px; }
.search-row input:focus, .search-row select:focus { border-color: var(--fish-accent, #06b6d4); }
.search-row select { min-width: 160px; cursor: pointer; }

/* ─── Water Body Cards (browse) ─── */
.wb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px;
}
.wb-card {
  padding: 16px; border-radius: 10px;
  background: var(--fish-bg-raised, #0d2137); border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; transition: all 0.2s;
}
.wb-card:hover { border-color: rgba(6,182,212,0.3); background: rgba(6,182,212,0.04); transform: translateY(-1px); }
.wb-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.wb-card-name { font-size: 0.95rem; font-weight: 700; }
.wb-card-state { font-size: 0.72rem; font-weight: 600; color: var(--fish-text-muted); padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,0.05); }
.wb-card-type { font-size: 0.75rem; color: var(--fish-text-dim); text-transform: capitalize; margin-bottom: 8px; }
.wb-mini-score {
  display: flex; align-items: center; gap: 8px;
}
.mini-gauge {
  width: 40px; height: 40px; position: relative;
}
.mini-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mini-gauge circle { fill: none; stroke-width: 4; }
.mini-gauge .track { stroke: rgba(255,255,255,0.06); }
.mini-gauge .fill { stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.mini-gauge .score-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800;
}
.wb-mini-label { font-size: 0.78rem; font-weight: 600; }

/* ─── Detail View ─── */
.detail-view { display: none; }
.detail-view.visible { display: block; }
.browse-view.hidden { display: none; }

.detail-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 600; color: var(--fish-text-muted);
  background: var(--fish-bg-raised); border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer; transition: all 0.2s; margin-bottom: 16px;
}
.detail-back:hover { color: var(--fish-accent); border-color: rgba(6,182,212,0.3); }

.detail-header { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-header-info h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 2px; }
.detail-header-info .meta { font-size: 0.85rem; color: var(--fish-text-muted); }

/* ─── Health Gauge (large) ─── */
.health-gauge-wrap { display: flex; align-items: center; justify-content: center; }
.health-gauge {
  width: 160px; height: 160px; position: relative;
}
.health-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.health-gauge circle { fill: none; }
.health-gauge .track { stroke: rgba(255,255,255,0.06); stroke-width: 10; }
.health-gauge .fill { stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.health-gauge .center-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.health-gauge .score-num { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.health-gauge .score-label { font-size: 0.78rem; font-weight: 600; margin-top: 2px; }

/* ─── Component Bars ─── */
.component-list { display: flex; flex-direction: column; gap: 12px; }
.comp-row { }
.comp-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.comp-name { font-size: 0.85rem; font-weight: 600; }
.comp-value { font-size: 0.82rem; font-weight: 700; }
.comp-bar {
  height: 8px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden;
}
.comp-bar-fill {
  height: 100%; border-radius: 4px; transition: width 0.8s ease;
}
.comp-detail { font-size: 0.75rem; color: var(--fish-text-dim); margin-top: 3px; }

/* ─── Trend Chart ─── */
.trend-chart-wrap {
  position: relative; height: 200px; padding: 10px 0;
}
.trend-canvas { width: 100%; height: 100%; }
.trend-months {
  display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--fish-text-dim);
  padding: 4px 10px 0;
}

/* ─── Fishing Impact ─── */
.impact-panel {
  background: rgba(6,182,212,0.06); border: 1px solid rgba(6,182,212,0.15);
  border-radius: 10px; padding: 16px;
}
.impact-panel h3 { font-size: 1rem; font-weight: 700; color: var(--fish-accent); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.impact-panel p { font-size: 0.88rem; line-height: 1.7; max-width: none; }

/* ─── Community Reports ─── */
.report-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.report-form .full-width { grid-column: 1 / -1; }
.report-form label { font-size: 0.82rem; font-weight: 600; color: var(--fish-text-muted); display: block; margin-bottom: 3px; }
.report-form select, .report-form textarea, .report-form input {
  width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 0.88rem;
  background: var(--fish-bg-raised, #0d2137); color: var(--fish-text);
  border: 1px solid rgba(255,255,255,0.1); outline: none; resize: vertical;
}
.report-form select:focus, .report-form textarea:focus, .report-form input:focus {
  border-color: var(--fish-accent);
}

.btn-submit {
  padding: 10px 20px; border-radius: 8px; font-size: 0.88rem; font-weight: 700;
  background: var(--fish-accent, #06b6d4); color: var(--fish-text-inverse, #0a1628);
  border: none; cursor: pointer; transition: all 0.2s;
}
.btn-submit:hover { background: var(--fish-accent-bright, #22d3ee); }

.reports-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.report-item {
  padding: 12px; border-radius: 8px; background: var(--fish-bg-raised);
  border: 1px solid rgba(255,255,255,0.04); font-size: 0.85rem;
}
.report-item .report-meta { display: flex; gap: 12px; margin-bottom: 4px; }
.report-item .report-tag {
  display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 0.7rem; font-weight: 600;
}
.report-item .report-date { font-size: 0.72rem; color: var(--fish-text-dim); }
.report-item .report-text { color: var(--fish-text-muted); line-height: 1.5; }

/* ─── Two Column Layout ─── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .report-form { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .search-row input, .search-row select { width: 100%; }
  .detail-header { flex-direction: column; align-items: center; text-align: center; }
}

/* ─── Score Colors ─── */
.score-green { color: #10b981; }
.score-cyan { color: #22d3ee; }
.score-yellow { color: #f59e0b; }
.score-red { color: #ef4444; }
.bar-green { background: #10b981; }
.bar-cyan { background: #22d3ee; }
.bar-yellow { background: #f59e0b; }
.bar-red { background: #ef4444; }
.tag-green { background: rgba(16,185,129,0.15); color: #10b981; }
.tag-cyan { background: rgba(34,211,238,0.15); color: #22d3ee; }
.tag-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.tag-red { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ─── Empty State ─── */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--fish-text-dim);
}
