/* ═══════════════════════════════════════════════════════════════
   TANK LOGIC — bioload-calculator.css
   Tool-specific styles for the Stocking & Bioload Calculator.

   DEPENDENCIES: system.css + style.css + tool.css MUST load first.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Multi-Page Step Animation ─────────────────────── */
#step2 {
  animation: bioload-step-in 0.32s var(--ease) both;
}
@keyframes bioload-step-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── In-Content Ad Slot ────────────────────────────── */
/* ─── Sticky Sidebar Ad (desktop only) ──────────────── */
/* ─── Fish List (dynamic rows) ──────────────────────── */
.fish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fish-row {
  display: grid;
  grid-template-columns: 1fr 90px 90px 90px 32px;
  gap: 8px;
  align-items: end;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
}
.fish-row .input-group { margin: 0; }
.fish-row .input-label {
  font-size: 11px;
  margin-bottom: 3px;
}
.fish-row .tool-input {
  padding: 8px 30px 8px 10px;
  font-size: 13px;
}
.fish-row .fish-remove {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--error-subtle);
  border: 1px solid var(--error);
  color: var(--error);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t) var(--ease);
}
.fish-row .fish-remove:hover {
  background: var(--error);
  color: var(--bg);
}
.fish-row .waste-factor-select {
  /* Uses .tool-select inherited styles */
}

@media (max-width: 580px) {
  .fish-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }
  .fish-row .input-group:nth-child(1) { grid-column: 1 / -1; }
  .fish-row .fish-remove {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
  }
}

.add-fish-btn {
  font-size: 13px;
  padding: 8px 14px;
  width: 100%;
  border-style: dashed;
}

/* ─── Stress Gauge ──────────────────────────────────── */
.stress-gauge-wrap {
  margin-top: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.stress-gauge-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.stress-gauge-label > span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.stress-gauge-value {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stress-gauge-value.tier-moderate  { color: var(--water); }
.stress-gauge-value.tier-heavy     { color: var(--sand); }
.stress-gauge-value.tier-overstock { color: var(--error); }

.stress-gauge-bar {
  position: relative;
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  overflow: visible;
}
.stress-gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--accent) 30%,
    var(--water) 30%,
    var(--water) 60%,
    var(--sand) 60%,
    var(--sand) 80%,
    var(--error) 80%,
    var(--error) 100%);
  border-radius: var(--r-full);
  transition: width 0.6s var(--ease);
  width: 0%;
}
/* Solid colour overlay up to the actual score */
.stress-gauge-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: var(--bg-elevated);
  opacity: 0.55;
  border-radius: var(--r-full);
}
.stress-gauge-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 20px;
  background: var(--text-muted);
  opacity: 0.5;
}
.stress-gauge-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Result Insight ────────────────────────────────── */
.result-insight {
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
}
.result-insight strong { color: var(--accent); }
.result-insight--warning {
  background: var(--sand-subtle);
  border-color: var(--sand-border);
}
.result-insight--warning strong { color: var(--sand); }
.result-insight--danger {
  background: var(--error-subtle);
  border-color: var(--error);
}
.result-insight--danger strong { color: var(--error); }

/* ─── Mobile tweaks ─────────────────────────────────── */
@media (max-width: 640px) {
  .stress-gauge-value { font-size: 28px; }
  .panel-title-row { flex-wrap: wrap; gap: 8px; }
  .panel-title-row .btn { width: 100%; }
}
