/* Stream B: Trainings-Rechner und Gewichtstrend.
   Nur seitenspezifische Styles; gemeinsame Bausteine und Tokens stehen in
   style.css (Abschnitt "Ratgeber-Portal"). Farben nur über die Tokens, damit
   hell und dunkel funktionieren. */

/* --- Gemeinsam ------------------------------------------------------ */
.tool-page fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.tool-page fieldset > legend {
  float: none;
  width: auto;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
}
.table-scroll:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
.result-table caption {
  caption-side: top;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  padding: 0 0 8px;
}
.result-table td,
.result-table th {
  color: var(--text);
}
.result-table thead th {
  color: var(--text-2);
}
.tool-page .result-item .result-note {
  margin-top: 6px;
  font-size: 13px;
}
.tool-page .btn-sm {
  font-size: 14px;
  padding: 0.35rem 0.9rem;
}

/* --- One-Rep-Max ---------------------------------------------------- */
.orm-table tr.is-max th,
.orm-table tr.is-max td {
  font-weight: 700;
}

/* --- Hantelscheiben ------------------------------------------------- */
.plate-choice label {
  min-width: 3.4rem;
  text-align: center;
}
.plate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.plate-list li {
  background: var(--card-2);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.plate-svg {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin-top: 16px;
}
.plate-svg .bar-shaft,
.plate-svg .bar-sleeve {
  fill: var(--text-2);
}
.plate-svg .bar-collar {
  fill: var(--text);
}
.plate-svg .plate-disc {
  fill: var(--card-2);
  stroke: var(--text);
  stroke-width: 1.5;
}

/* --- Volumen -------------------------------------------------------- */
.vol-legend {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
}
.vol-head,
.vol-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem;
  gap: 6px 12px;
  align-items: center;
}
.vol-head {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.vol-head span:last-child {
  display: none;
}
.vol-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.vol-row {
  padding: 12px 0;
  border-bottom: 0.5px solid var(--separator);
}
.vol-row:last-child {
  border-bottom: none;
}
.vol-name {
  font-weight: 500;
  margin: 0;
}
.vol-input.calc-input {
  text-align: center;
  padding: 0.5rem 0.6rem;
}
.vol-input[aria-invalid="true"] {
  border-color: var(--red);
}
.vol-input:focus {
  outline: none;
  border-color: var(--accent-text);
}
.vol-band {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-2);
}
.vol-meter {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: var(--card-2);
  overflow: hidden;
}
.vol-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--text-2);
  transition: width 0.2s ease;
}
@media (min-width: 576px) {
  .vol-head,
  .vol-row {
    grid-template-columns: minmax(0, 1fr) 5.5rem 11rem;
  }
  .vol-head span:last-child {
    display: block;
  }
  .vol-band {
    grid-column: auto;
  }
}
/* Farben der Bänder: grau (nichts), orange (niedrig), blau (moderat),
   grün (üblicher Bereich), rot (hoch). */
.vol-row[data-band="low"] .vol-meter-fill,
.vol-legend-list [data-band="low"] .vol-dot { background: var(--orange); }
.vol-row[data-band="moderate"] .vol-meter-fill,
.vol-legend-list [data-band="moderate"] .vol-dot { background: var(--blue); }
.vol-row[data-band="target"] .vol-meter-fill,
.vol-legend-list [data-band="target"] .vol-dot { background: var(--green); }
.vol-row[data-band="high"] .vol-meter-fill,
.vol-legend-list [data-band="high"] .vol-dot { background: var(--red); }
.vol-row[data-band="target"] .vol-band {
  color: var(--text);
  font-weight: 600;
}
.vol-actions {
  margin-top: 12px;
}
.vol-legend-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.vol-legend-list li {
  padding: 6px 0;
}
.vol-legend-list strong {
  color: var(--text);
  font-weight: 600;
}
.vol-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 0;
}
@media (prefers-reduced-motion: reduce) {
  .vol-meter-fill {
    transition: none;
  }
}

/* --- RPE ------------------------------------------------------------ */
.rpe-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rpe-subhead,
.wt-subhead {
  margin: 4px 0 -4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.rpe-table {
  min-width: 640px;
  font-size: 14px;
}
.rpe-table th,
.rpe-table td {
  padding: 8px 6px;
  text-align: center;
}
.rpe-table tbody th {
  text-align: left;
  white-space: nowrap;
}
.rpe-rir {
  color: var(--text-2);
  font-weight: 400;
}
.rpe-table td.is-input,
.rpe-table td.is-target {
  border-radius: 8px;
  font-weight: 700;
}
.rpe-table td.is-input {
  background: var(--card-2);
  box-shadow: inset 0 0 0 2px var(--text-2);
}
.rpe-table td.is-target {
  background: var(--card-2);
  box-shadow: inset 0 0 0 2px var(--accent-text);
}

/* --- Gewichtstrend -------------------------------------------------- */
.wt-paste {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 0.5px solid var(--separator);
}
.wt-paste textarea {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  resize: vertical;
}
.wt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wt-storage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 0.5px solid var(--separator);
}
.wt-storage .form-check {
  margin: 0;
}
.wt-storage .form-check-input {
  background-color: var(--card-2);
  border-color: var(--separator);
}
.wt-storage .form-check-input:checked {
  background-color: var(--volt);
  border-color: var(--volt);
}
.wt-status:empty {
  display: none;
}
.wt-example-badge {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 12px;
}
.wt-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 6px;
  background: var(--card-2);
  color: var(--text);
}
.wt-class {
  color: var(--text);
  font-weight: 500;
}
.wt-chart-wrap {
  margin: 18px 0 0;
}
.wt-chart {
  width: 100%;
  margin-top: 6px;
}
.wt-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.wt-grid line {
  stroke: var(--separator);
  stroke-width: 0.5;
}
.wt-grid text {
  fill: var(--text-2);
  font-size: 12px;
  font-family: var(--font-text);
  font-variant-numeric: tabular-nums;
}
.wt-dots circle {
  fill: var(--chart-dot);
}
.wt-trend-line {
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-2);
}
.wt-key {
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.wt-key-raw {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chart-dot);
}
.wt-key-trend {
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-text);
}
.wt-entries {
  margin-top: 18px;
}
.wt-entries summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.wt-entries-scroll {
  max-height: 320px;
  overflow-y: auto;
}
.wt-remove-cell {
  text-align: right;
  width: 1%;
}
.wt-remove-cell .btn {
  padding: 0.2rem 0.6rem;
}
