/* ==========================================================================
   Superior Gym – schedule.css
   Trainingsplan section (#trainingsplan), rendered by js/schedule.js from
   content/schedule.js. Ported verbatim from
   superior-gym-handoff/reference/onepager-v1.html (.plan-*, .session*).
   Shared classes (.container, .label, .h2, .section-head*, .chips, .chip,
   .tag, .tag--kinder, .tag--frauen, .btn) live in css/base.css.
   ========================================================================== */

/* ---------- Mobile: list of days, 1px seams inside one outer frame ---------- */
.plan-mobile { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.plan-day { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 1px; background: var(--border); }
.plan-day__name { background: var(--surface-1); padding: 16px 0 0 12px; font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.plan-day__sessions { display: flex; flex-direction: column; gap: 1px; background: var(--border); }

.session { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 12px; border: 0; background: var(--bg); color: var(--text); text-align: left; cursor: pointer; }
.session:hover { background: var(--surface-1); }
.session__time { width: 46px; flex-shrink: 0; font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.session__name { flex: 1; font-size: 15px; font-weight: 600; }
.session__chev { color: var(--text-3); flex-shrink: 0; }
.session--empty { cursor: default; color: var(--text-3); }
.session--empty:hover { background: var(--bg); }
.session--empty .session__name { color: var(--text-3); font-weight: 500; }

.plan-desktop { display: none; }

.plan-foot { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.plan-foot p { margin: 0; font-size: 14px; color: var(--text-3); }

@media (min-width: 1024px) {
  .plan-mobile { display: none; }

  /* ---------- Desktop: 7-column week grid, 1px seams ---------- */
  .plan-desktop { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .plan-col { display: flex; flex-direction: column; gap: 1px; background: var(--border); }
  .plan-col__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 16px; background: var(--surface-1); }
  .plan-col__head b { font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
  .plan-col__head span { font-size: 13px; color: var(--text-3); }
  .plan-col__body { flex: 1; display: flex; flex-direction: column; gap: 1px; background: var(--border); }
  .plan-col__fill { flex: 1; background: var(--bg); min-height: 24px; }

  .session--card { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 112px; padding: 16px; }
  .session--card .session__time { width: auto; font-size: 14px; font-weight: 500; color: var(--text-2); }
  /* align-items:flex-start above means .session__name shrink-wraps instead of stretching to the
     tile width, so long uppercase names (e.g. "Boxen Wettkämpfer") can overflow into the next
     column. max-width caps it at the tile's own outer edge (100% of the content box + the two
     16px paddings above = the full tile width) so overflow-wrap/hyphens can act as a fallback —
     calc(100% + 32px) intentionally matches .session--card's padding so names that already fit
     within the tile (including into its own padding, which was always harmless) render exactly
     as before; only names wider than the tile itself are affected. */
  .session--card .session__name { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.05; text-transform: uppercase; max-width: calc(100% + 32px); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .session--card .session__cta { margin-top: auto; font-family: var(--font-mono); font-size: 11px; color: var(--red-text); opacity: 0; }
  .session--card:hover .session__cta, .session--card:focus-visible .session__cta { opacity: 1; }
  .session--card.session--empty .session__name { font-family: var(--font-body); font-size: 15px; font-weight: 500; text-transform: none; }

  .plan-foot { flex-direction: row; align-items: center; justify-content: space-between; margin-top: 24px; }
}
