/* =========================================================================
   session.css — training session view (planned / evaluation / target-vs-actual).
   ========================================================================= */

.session-hero {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.session-hero__body { flex: 1; min-width: 0; }
.session-hero__type { font-size: 0.78rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.03em; }
.session-hero__title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.session-hero__date { color: var(--text-2); font-size: 0.88rem; margin-top: 2px; }

.session-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 0.76rem; font-weight: 700;
}
.session-status--geplant { background: var(--accent-soft); color: var(--accent-strong); }
.session-status--erledigt { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good-text); }
.session-status--verpasst { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad-text); }
.session-status--verschoben { background: color-mix(in srgb, var(--warn) 18%, transparent); color: color-mix(in srgb, var(--warn) 80%, #000); }
.session-status--ueberfaellig { background: color-mix(in srgb, #f5a623 20%, transparent); color: color-mix(in srgb, #f5a623 78%, #000); }

/* Target values (planned) – content-adaptive: fills the row (2 tiles side by side
   on the iPhone, more on wide screens), without a few tiles sticking to the left. */
.target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.target {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.target__label { font-size: 0.72rem; color: var(--text-2); font-weight: 650; }
.target__val { font-family: var(--font-num); font-size: 1.2rem; font-weight: 750; margin-top: 2px; }

/* Big start button */
.start-cta { margin-top: var(--sp-5); }

/* RPE scale: two rows of five, targets ≥ 44 px, the anchors below (UI-25) */
.rpe-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rpe-dot {
  min-height: 44px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; color: var(--text-2);
  border: 1px solid var(--border);
}
.rpe-dot.is-active { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.rpe-hint { grid-column: 1 / -1; font-size: 0.78rem; color: var(--text-2); text-align: center; }

/* Duration: [45] min [30] s */
.dur-fields { display: flex; align-items: center; gap: var(--sp-2); }
.dur-fields .input--dur { flex: 1 1 0; min-width: 0; text-align: center; }
.dur-unit { font-size: 0.86rem; color: var(--text-2); flex: 0 0 auto; }

/* Feeling selection */
.feeling-row { display: flex; gap: var(--sp-2); }
.feeling-opt {
  flex: 1; min-height: 56px; padding: var(--sp-2) 0;
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center; font-size: 1.5rem;
  border: 1px solid var(--border);
}
.feeling-opt.is-active { background: var(--accent-soft); border-color: var(--accent); }
.feeling-opt small { display: block; font-size: 0.68rem; color: var(--text-2); margin-top: 2px; }

/* Splits table */
.splits { width: 100%; border-collapse: collapse; font-family: var(--font-num); }
.splits th, .splits td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.splits th { font-family: var(--font); font-size: 0.72rem; color: var(--text-2); font-weight: 650; text-transform: uppercase; }
.splits td:first-child, .splits th:first-child { text-align: left; }
.splits__bar { height: 6px; background: var(--accent-soft); border-radius: var(--r-pill); }
.splits__bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }

/* Time-in-zones bars */
.zones-bar { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; }
.zones-bar > span { height: 100%; }
.zones-legend { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-3); }
.zones-legend__item { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--text-2); }
.zones-legend__sw { width: 10px; height: 10px; border-radius: 3px; }

/* Target-vs-actual result banner */
.result-banner {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
}
.result-banner--hit { background: color-mix(in srgb, var(--good) 14%, transparent); }
.result-banner--miss { background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* Sticky action bar of the session: above the tab bar, on iPad/Mac at the bottom edge –
   "Start" and "Log as done" are reachable without scrolling (UI-09). */
.action-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--sp-2));
  z-index: 20;
  display: flex; gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: var(--sp-2);
  border-radius: var(--r-lg);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.action-bar .btn { min-height: 48px; }
@media (min-width: 820px) { .action-bar { bottom: var(--sp-4); } }

/* Exercise suggestions for runs: collapsed */
.unit-exercises > summary { cursor: pointer; margin-bottom: var(--sp-2); }
.unit-exercises > summary::marker { color: var(--text-3); }
