/* ==========================================================================
   My Profile modal — the weight card and its chart. Split from profile-modal.css to keep both files
   under 500 lines; the same rules apply: every rule is under .pm-modal, because App.razor loads
   Bootstrap AFTER this file, and the one verdict colour is --fs-error ("behind your goal pace").
   ========================================================================== */

/* --- Weight card ---------------------------------------------------------- */

.pm-modal .pm-weight {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--fs-border-default);
  border-radius: var(--fs-radius-lg);
  background: var(--fs-bg-primary);
  box-shadow: var(--fs-shadow-primary-subtle);
  /* The verdict: dark on or ahead of pace, red behind. Nothing to judge reads as on pace. */
  --pm-pace-line: var(--fs-text-primary);
  --pm-pace-fill: var(--fs-bg-tertiary);
  --pm-pace-pill-bg: var(--fs-bg-tertiary);
  --pm-pace-pill-text: var(--fs-text-primary);
}

.pm-modal .pm-weight.pm-pace-behind {
  --pm-pace-line: var(--fs-error);
  --pm-pace-fill: var(--fs-error-light);
  --pm-pace-pill-bg: var(--fs-error-light);
  --pm-pace-pill-text: var(--fs-error-text);
}

.pm-modal .pm-weight-goal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--fs-radius-md);
  background: var(--fs-bg-selected);
  color: var(--fs-primary);
}

.pm-modal .pm-weight-goal > div {
  display: flex;
  flex-direction: column;
}

.pm-modal .pm-weight-goal-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pm-modal .pm-weight-goal-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fs-primary-active);
}

.pm-modal .pm-weight-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 20px 8px;
  border: 1px dashed var(--fs-border-hover);
  border-radius: var(--fs-radius-md);
  text-align: center;
  color: var(--fs-text-secondary);
  font-size: 13px;
}

.pm-modal .pm-weight-empty strong {
  font-size: 16px;
  color: var(--fs-text-primary);
}

.pm-modal .pm-weight-hint {
  margin: 0;
  font-size: 13px;
  color: var(--fs-text-secondary);
}

.pm-modal .pm-chart {
  margin: 0;
}

.pm-modal .pm-chart svg {
  display: block;
  width: 100%;
  height: 88px;
  overflow: visible;
}

.pm-modal .pm-chart-area {
  fill: var(--pm-pace-fill);
}

.pm-modal .pm-chart-pace {
  stroke: var(--fs-primary);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.pm-modal .pm-chart-line {
  fill: none;
  stroke: var(--pm-pace-line);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.pm-modal .pm-chart-axis {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  color: var(--fs-text-secondary);
}

.pm-modal .pm-chart-legend {
  display: flex;
  gap: 12px;
}

.pm-modal .pm-chart-legend > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pm-modal .pm-legend-you {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--pm-pace-line);
}

.pm-modal .pm-legend-pace {
  width: 14px;
  border-top: 2px dashed var(--fs-primary);
}

.pm-modal .pm-readout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pm-modal .pm-readout-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fs-text-secondary);
}

.pm-modal .pm-readout-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
}

.pm-modal .pm-readout-unit {
  font-size: 15px;
  font-weight: 600;
  color: var(--fs-macro-kcal);
}

.pm-modal .pm-readout-stats {
  display: flex;
  gap: 6px;
}

.pm-modal .pm-stat {
  display: flex;
  flex-direction: column;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: var(--fs-radius-md);
  text-align: center;
}

.pm-modal .pm-stat-value {
  font-size: 16px;
  font-weight: 700;
}

.pm-modal .pm-stat-label {
  font-size: 11px;
  color: var(--fs-macro-kcal);
}

.pm-modal .pm-stat-total {
  background: var(--fs-bg-selected);
  color: var(--fs-primary-active);
}

.pm-modal .pm-stat-weekly {
  background: var(--pm-pace-pill-bg);
  color: var(--pm-pace-pill-text);
}

.pm-modal .pm-fat-free {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -4px;
  font-size: 12px;
  color: var(--fs-text-secondary);
}

.pm-modal .pm-fat-free-value {
  padding: 2px 8px;
  border-radius: var(--fs-radius-pill);
  background: var(--fs-bg-tertiary);
  font-weight: 700;
  color: var(--fs-macro-kcal);
}

.pm-modal .pm-log-weight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-top: auto;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--fs-shadow-primary);
}

