/* =============================================
   Tank Logic — tank-calculator.css
   Styles for the unit selector, smart cards,
   and Walstad / plant / water-change layouts
   ============================================= */

/* ── RESULT UNIT BADGE ── */
.result-unit-badge {
  font-size: var(--sz-11);
  font-weight: 600;
  color: var(--tx-lo);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
  letter-spacing: 0.03em;
}

.result-section-label {
  font-size: var(--sz-11);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-lo);
  margin-bottom: 8px;
}

.results-grid--2 { grid-template-columns: 1fr 1fr; }

.result-card--primary-blue {
  border-color: rgba(59,130,246,0.22);
  background: var(--blue-lo);
}
.result-card--primary-blue .result-value { color: var(--blue); }

/* ── UNIT SELECTOR ROW ── */
.unit-selector-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

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

.unit-selector-btns {
  display: flex;
  gap: 6px;
}

.unit-big-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-3);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--t) var(--ease);
  min-width: 90px;
}
.unit-big-btn:hover {
  border-color: var(--border-mid);
  background: var(--bg-2);
}
.unit-big-btn.active {
  border-color: rgba(0,200,150,0.35);
  background: var(--accent-lo);
}

.unit-big-icon { font-size: 1rem; line-height: 1; }
.unit-big-name {
  font-size: var(--sz-12);
  font-weight: 600;
  color: var(--tx);
  line-height: 1;
}
.unit-big-abbr {
  font-size: var(--sz-10);
  color: var(--tx-lo);
  font-weight: 500;
}
.unit-big-btn.active .unit-big-name { color: var(--accent); }
.unit-big-btn.active .unit-big-abbr { color: var(--accent); opacity: 0.7; }

/* ── SMART CARDS SECTION ── */
.smart-cards-section {
  margin-top: 28px;
}

.smart-cards-heading {
  font-size: var(--sz-13);
  font-weight: 600;
  color: var(--tx);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.smart-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ── SMART CARD BASE ── */
.smart-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  animation: sc-fadein 0.4s var(--ease) both;
}

@keyframes sc-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.smart-card--teal   { border-color: rgba(0,200,150,0.18); }
.smart-card--gold   { border-color: rgba(232,160,32,0.18); }
.smart-card--green  { border-color: rgba(34,197,94,0.18); }
.smart-card--blue   { border-color: rgba(59,130,246,0.18); }

.smart-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.smart-card__icon {
  font-size: 1.4rem;
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  border-radius: var(--r-md);
}

.smart-card__title {
  font-size: var(--sz-14);
  font-weight: 700;
  color: var(--tx-hi);
  letter-spacing: -0.018em;
  line-height: 1.2;
}

.smart-card__sub {
  font-size: var(--sz-11);
  color: var(--tx);
  margin-top: 2px;
}

.smart-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--sz-12);
  font-weight: 600;
  color: var(--accent);
  margin-top: 14px;
  transition: gap var(--t) var(--ease);
  text-decoration: none;
}
.smart-card__link:hover { gap: 7px; }

.smart-card__tip {
  font-size: var(--sz-12);
  color: var(--tx);
  line-height: 1.6;
  margin-top: 12px;
  padding: 10px 13px;
  background: var(--bg-2);
  border-radius: var(--r-md);
}

.smart-card__notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.smart-card__notes p {
  font-size: var(--sz-12);
  color: var(--tx);
  line-height: 1.56;
}

/* ── STOCKING IDEAS CARD ── */
.smart-ideas {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-idea {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  font-size: var(--sz-13);
}

.smart-idea__icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.smart-idea strong {
  font-size: var(--sz-13);
  color: var(--tx-hi);
  display: block;
  margin-bottom: 2px;
}

.smart-idea__note {
  font-size: var(--sz-11);
  color: var(--tx);
}

/* ── WALSTAD CARD ── */
.smart-walstad {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.walstad-layer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  border-left: 2px solid var(--border);
}

.walstad-layer--mineral {
  border-left-color: var(--gold);
  background: var(--gold-lo);
}

.walstad-layer:first-child { border-left-color: var(--blue); }
.walstad-layer:nth-child(2) { border-left-color: var(--accent); }

.walstad-layer__label {
  font-size: var(--sz-12);
  font-weight: 600;
  color: var(--tx);
}

.walstad-layer__val {
  font-size: var(--sz-12);
  color: var(--tx-lo);
  text-align: right;
}

/* ── PLANTS CARD ── */
.smart-plants {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plant-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 12px;
  background: var(--bg-2);
  border-radius: var(--r-md);
  font-size: var(--sz-12);
  color: var(--tx-lo);
  line-height: 1.5;
}

.plant-row--meta {
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.1);
}

.plant-zone {
  font-size: var(--sz-11);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tx-lo);
  padding-top: 1px;
}

/* ── WATER CHANGE TABLE ── */
.wc-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.wc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--sz-12);
  min-width: 320px;
}

.wc-table 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.07em;
  color: var(--tx-lo);
  border-bottom: 1px solid var(--border);
}

.wc-table td {
  padding: 9px 12px;
  color: var(--tx);
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.wc-table tr:last-child td { border-bottom: none; }
.wc-table tr:hover td { background: rgba(255,255,255,0.015); }

.wc-row--highlight td {
  background: var(--accent-lo) !important;
  color: var(--tx-hi);
  font-weight: 600;
}
.wc-row--highlight td:first-child { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (min-width: 700px) {
  .smart-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .plant-row { grid-template-columns: 100px 1fr; }
}

@media (min-width: 1100px) {
  .smart-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
