/* =============================================
   Tank Logic — Stocking Calculator CSS  v3
   Unit toggles, confidence meter, filtration
   ============================================= */

/* ── SELECT / DROPDOWN ───────────────────────── */
.tool-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a6080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.tool-select option { background: var(--bg-1); color: var(--tx-hi); }

/* ── UNIT TOGGLE BAR ─────────────────────────── */
.stocking-unit-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.stocking-unit-bar__label {
  font-size: var(--sz-11);
  font-weight: 600;
  color: var(--tx);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.stocking-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}

.stocking-toggle-btn {
  padding: 4px 11px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--tx-lo);
  font-size: var(--sz-12);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--t) var(--ease);
  letter-spacing: -0.01em;
}
.stocking-toggle-btn.active {
  background: var(--accent);
  color: #021a12;
}
.stocking-toggle-btn:not(.active):hover { color: var(--tx); }

/* ── FILTER MODIFIER ROW ─────────────────────── */
.filter-modifier-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.filter-modifier-label {
  font-size: var(--sz-12);
  font-weight: 600;
  color: var(--tx);
  white-space: nowrap;
}

.filter-modifier-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--tx);
  font-size: var(--sz-12);
  font-family: var(--font);
  font-weight: 500;
  padding: 5px 28px 5px 10px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a6080' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--t);
}
.filter-modifier-select:focus { border-color: var(--accent); }
.filter-modifier-select option { background: var(--bg-1); color: var(--tx-hi); }

.filter-modifier-bonus {
  font-size: var(--sz-11);
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-lo);
  border: 1px solid rgba(0,200,150,0.18);
  border-radius: 100px;
  padding: 2px 9px;
  margin-left: auto;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ── FISH SEARCH ─────────────────────────────── */
.fish-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.fish-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0; right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

.fish-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-size: var(--sz-13);
  color: var(--tx-hi);
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.fish-dropdown-item:last-child { border-bottom: none; }
.fish-dropdown-item:hover { background: var(--accent-lo); color: var(--accent); }
.fish-dropdown-item span { font-size: var(--sz-11); color: var(--tx-lo); }

/* ── CUSTOM FISH ROW ─────────────────────────── */
.custom-fish-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-bottom: 18px;
}

/* ── FISH LIST ───────────────────────────────── */
.fish-list-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--sz-10);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-xlo);
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.fish-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.fish-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  animation: slide-in 0.2s var(--ease);
}

.fish-item-name  { font-size: var(--sz-13); font-weight: 600; color: var(--tx-hi); flex: 1; }
.fish-item-calc  { font-size: var(--sz-11); color: var(--tx-lo); margin-right: 10px; }
.fish-item-total { font-size: var(--sz-13); font-weight: 700; color: var(--accent); min-width: 38px; text-align: right; margin-right: 10px; }

.fish-remove-btn {
  background: none;
  border: none;
  color: var(--tx-lo);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 4px;
  border-radius: var(--r-sm);
  line-height: 1;
  transition: color var(--t), background var(--t);
}
.fish-remove-btn:hover { color: var(--red); background: var(--red-lo); }

.fish-list-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: var(--accent-lo);
  border: 1px solid rgba(0,200,150,0.18);
  border-radius: var(--r-sm);
  font-size: var(--sz-12);
  font-weight: 600;
  color: var(--tx);
}

.fish-total-val {
  color: var(--accent);
  font-size: var(--sz-15);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── STOCKING GAUGE ──────────────────────────── */
.stocking-gauge { margin-bottom: 18px; }

.gauge-track {
  height: 8px;
  background: var(--bg-2);
  border-radius: 100px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
}

/* 80% marker = "full" threshold */
.gauge-track::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 80%;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

.gauge-fill {
  height: 100%;
  border-radius: 100px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.4s;
}

.gauge-fill--under    { background: linear-gradient(90deg, var(--blue), #60a5fa); }
.gauge-fill--balanced { background: linear-gradient(90deg, var(--accent), #34d399); }
.gauge-fill--full     { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.gauge-fill--light    { background: linear-gradient(90deg, var(--gold), #fb923c); }
.gauge-fill--danger   { background: linear-gradient(90deg, #f97316, var(--red)); }

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--sz-10);
  color: var(--tx-lo);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0 1px;
}

/* ── RATING BADGE ────────────────────────────── */
.stocking-rating { text-align: center; margin-bottom: 18px; }

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: var(--sz-14);
  letter-spacing: -0.01em;
}

.rating-badge--under    { background: var(--blue-lo);               border: 1px solid rgba(59,130,246,0.22);  color: var(--blue); }
.rating-badge--balanced { background: var(--accent-lo);             border: 1px solid rgba(0,200,150,0.22);   color: var(--accent); }
.rating-badge--full     { background: rgba(34,197,94,0.07);         border: 1px solid rgba(34,197,94,0.2);    color: #4ade80; }
.rating-badge--light    { background: rgba(251,146,60,0.07);        border: 1px solid rgba(251,146,60,0.22);  color: #fb923c; }
.rating-badge--danger   { background: rgba(239,68,68,0.07);         border: 1px solid rgba(239,68,68,0.22);   color: var(--red); }

/* ── METHOD CARDS ────────────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.method-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
}

.method-name {
  font-size: var(--sz-10);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tx);
  margin-bottom: 8px;
}

.method-values {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}

.method-used { font-size: 1.4rem; font-weight: 800; color: var(--tx-hi); letter-spacing: -0.03em; }
.method-sep  { color: var(--tx-xlo); font-size: 0.9rem; }
.method-max  { font-size: 1rem; font-weight: 600; color: var(--tx); letter-spacing: -0.02em; }
.method-sub  { font-size: var(--sz-11); color: var(--tx-lo); }

/* ── FISH SUMMARY TABLE ──────────────────────── */
.fish-summary {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.fish-summary table { width: 100%; border-collapse: collapse; font-size: var(--sz-12); }
.fish-summary th {
  background: var(--bg-2);
  padding: 9px 12px;
  text-align: left;
  font-size: var(--sz-10);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tx-lo);
  border-bottom: 1px solid var(--border);
}
.fish-summary td { padding: 9px 12px; color: var(--tx); border-bottom: 1px solid var(--border); vertical-align: top; }
.fish-summary tr:last-child td { border-bottom: none; }
.fish-summary tr:hover td { background: rgba(255,255,255,0.015); }

/* ── BEGINNER WARNINGS ───────────────────────── */
.stocking-warning {
  padding: 10px 13px;
  background: rgba(251,146,60,0.06);
  border: 1px solid rgba(251,146,60,0.18);
  border-radius: var(--r-md);
  font-size: var(--sz-12);
  color: #fdba74;
  line-height: 1.6;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 560px) {
  .custom-fish-row { grid-template-columns: 1fr 1fr; }
  .custom-fish-row .input-group:first-child { grid-column: 1 / -1; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .stocking-unit-bar { gap: 6px; }
}

/* ════════════════════════════════════════════════
   PHASE 1 READABILITY — stocking-calculator.css
   ════════════════════════════════════════════════ */

.fish-list-header  { font-size: var(--sz-11); color: var(--tx); font-weight: 700; }
.fish-item-name    { font-size: var(--sz-14); color: var(--tx-hi); font-weight: 600; }
.fish-item-calc    { font-size: var(--sz-13); color: var(--tx-lo); }
.fish-item-total   { font-size: var(--sz-14); color: var(--accent); font-weight: 700; }
.fish-total-val    { font-size: var(--sz-16); color: var(--accent); font-weight: 700; }
.fish-list-total   { font-size: var(--sz-13); color: var(--tx); font-weight: 600; }

.method-name       { font-size: var(--sz-11); color: var(--tx); }
.method-used       { font-size: 1.5rem; color: var(--tx-hi); font-weight: 700; }
.method-max        { font-size: 1.05rem; color: var(--tx); }
.method-sub        { font-size: var(--sz-11); color: var(--tx-lo); }
.method-sep        { color: var(--tx-lo); }

.stocking-advice   { font-size: var(--sz-13); color: var(--tx); line-height: 1.65; }
.stocking-advice strong { color: var(--blue); }

.custom-fish-row .input-label { font-size: var(--sz-13); color: var(--tx); }

/* ════════════════════════════════════════════════
   READABILITY PATCH — stocking-calculator.css
   ════════════════════════════════════════════════ */

/* Method cards */
.method-max  { color: var(--tx); font-size: 1.05rem; }
.method-sub  { font-size: var(--sz-12); color: var(--tx-lo); }
.method-sep  { color: var(--tx-lo); }
.method-name { color: var(--tx); }

/* Gauge labels */
.gauge-labels { font-size: var(--sz-11); color: var(--tx-lo); }

/* Fish list */
.fish-list-header { color: var(--tx); }
.fish-item-calc   { color: var(--tx-lo); }

/* Stocking advice */
#stockingAdvice   { font-size: var(--sz-14); color: var(--tx); line-height: 1.68; }

/* Filter type */
.filter-type-label, .filter-modifier-label { color: var(--tx); font-size: var(--sz-13); }

/* Toggle buttons */
.stocking-toggle-btn        { color: var(--tx-lo); }
.stocking-toggle-btn.active { color: #021a12; }

/* Warning text */
.stocking-warning-text { font-size: var(--sz-13); color: var(--tx); line-height: 1.65; }

/* ════════════════════════════════════════════════
   PHASE 1 — READABILITY FIXES (stocking-calculator.css)
   ════════════════════════════════════════════════ */

/* Fish list */
.fish-item-name     { font-size: var(--sz-14); }
.fish-item-calc     { font-size: var(--sz-13); color: var(--tx-lo); }
.fish-list-total    { font-size: var(--sz-14); }
.fish-total-val     { font-size: var(--sz-16); }
.fish-list-header   { font-size: var(--sz-12); }

/* Method cards */
.method-name        { font-size: var(--sz-12); color: var(--tx); }
.method-sub         { font-size: var(--sz-12); color: var(--tx-lo); }
.method-used        { font-size: 1.5rem; }
.method-max         { font-size: 1.1rem; color: var(--tx); }

/* Advice text */
#stockingAdvice     { font-size: var(--sz-14); line-height: 1.7; }

/* Filter modifier */
.filter-modifier-label  { font-size: var(--sz-13); color: var(--tx); }
.filter-modifier-bonus  { font-size: var(--sz-13); }

/* Unit bar */
.stocking-unit-bar__label { font-size: var(--sz-12); color: var(--tx-lo); }

/* Fish table */
.fish-summary table { font-size: var(--sz-13); }
