/* ==========================================================================
   Dziś — design-handoff/design/Dzis.dc.html i Desktop-Dzis.dc.html
   Telefon: jedna kolumna w kolejności z HANDOFF (faza 3).
   Od 1024 px: trzy kolumny (gotowość + trening | tydzień + wniosek | waga + siła).
   ========================================================================== */

.td {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.td-col {
  display: contents;
}

.td-card {
  background: var(--vt-surface);
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--vt-text);
  text-decoration: none;
}

a.td-card:hover {
  border-color: var(--vt-muted);
}

a.td-card:focus-visible {
  outline: 2px solid var(--vt-accent);
  outline-offset: 2px;
}

.td-small { font-size: 12px; }
.td-muted { color: var(--vt-muted); }
.td-good { color: var(--vt-accent); }
.td-warn { color: var(--vt-warn); }
.td-cardio { color: var(--vt-cardio); }

.td-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.td-sec-title {
  margin: 0;
  font-family: var(--vt-font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.td-link {
  color: var(--vt-accent);
  font-size: 13px;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.td-link:hover { color: var(--vt-accent-hover); }

.td-eyebrow {
  font-family: var(--vt-font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vt-muted);
}

.td-eyebrow--good { color: var(--vt-accent); }
.td-eyebrow--warn { color: var(--vt-warn); }

/* ── Gotowość ────────────────────────────────────────────────────────── */
.td-ready {
  border-radius: var(--vt-radius-xl);
  padding: 18px;
  gap: 14px;
}

.td-ready-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.td-ring {
  position: relative;
  flex: none;
}

.td-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 24px;
}

.td-ready-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.td-ready-title {
  font-family: var(--vt-font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.td-ready-line {
  font-size: 13px;
  color: var(--vt-muted);
}

.td-weak {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--vt-bg);
  border-radius: 12px;
  padding: 10px 12px;
}

.td-weak-label {
  flex: 1;
  font-size: 12px;
  color: var(--vt-muted);
}

.td-weak-val { font-size: 12px; }

/* Składniki: na telefonie ukryte (wystarczy najsłabszy), na desktopie lista */
.td-comps {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.td-comp {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vt-bg);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.td-comp-name {
  flex: 1;
  font-size: 12px;
  color: var(--vt-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-comp-val { font-size: 12px; }

/* ── Dzisiejszy trening ──────────────────────────────────────────────── */
.td-plan {
  border-radius: var(--vt-radius-xl);
  padding: 18px;
  gap: 14px;
}

.td-plan-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.td-plan-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.td-plan-name {
  font-family: var(--vt-font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.td-plan-line { font-size: 12px; color: var(--vt-muted); }
.td-plan-line.td-cardio { color: var(--vt-cardio); }

.td-plan-last {
  font-size: 12px;
  color: var(--vt-muted);
  text-align: right;
  flex-shrink: 0;
}

.td-plan-last .num { color: var(--vt-text); }

/* ── Tydzień: pasek na telefonie, lista na desktopie ─────────────────── */
.td-week {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.td-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.td-day {
  height: 58px;
  border-radius: 12px;
  background: var(--vt-surface);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.td-day--empty {
  background: transparent;
  border-color: var(--vt-line);
}

.td-day--today {
  background: var(--vt-surface-2);
  border-color: var(--vt-accent);
}

.td-day:focus-visible {
  outline: 2px solid var(--vt-accent);
  outline-offset: 2px;
}

.td-day-l {
  font-size: 11px;
  color: var(--vt-muted);
}

.td-day--today .td-day-l { color: var(--vt-text); }

.td-day-bar {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: transparent;
}

.td-bar--strength { background: var(--vt-accent); }
.td-bar--cardio { background: var(--vt-cardio); }
.td-bar--strength-planned { background: repeating-linear-gradient(90deg, var(--vt-accent) 0 3px, transparent 3px 5px); }
.td-bar--cardio-planned { background: repeating-linear-gradient(90deg, var(--vt-cardio) 0 3px, transparent 3px 5px); }

.td-wlist { display: none; }

.td-wrows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.td-wrow {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vt-line);
  font-size: 14px;
}

.td-wrow-day { font-size: 12px; color: var(--vt-muted); }
.td-wrow-name { font-weight: 500; }
.td-state { font-size: 12px; color: var(--vt-muted); }
.td-state--done { color: var(--vt-accent); }
.td-state--today { color: var(--vt-text); font-weight: 600; }
.td-state--missed { color: var(--vt-warn); }

/* ── Waga ────────────────────────────────────────────────────────────── */
.td-weight-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.td-weight-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.td-weight-col--end { align-items: flex-end; }

.td-weight-val {
  font-weight: 600;
  font-size: 20px;
}

.td-weight-d7 { font-size: 12px; }

.td-weight-desk { display: none; }

.td-weight-big {
  font-weight: 600;
  font-size: 34px;
}

.td-weight-big .td-muted { font-size: 16px; }

/* ── Siła (desktop) ──────────────────────────────────────────────────── */
.td-lift {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--vt-line);
  color: var(--vt-text);
  text-decoration: none;
  font-size: 14px;
}

.td-lift:hover .td-lift-name { color: var(--vt-accent); }
.td-lift-val { font-size: 13px; white-space: nowrap; }

.td-only-desk { display: none; }

/* ── Desktop: trzy kolumny ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  .td {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }

  .td-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }

  .td-comps { display: grid; }
  .td-strip, .td-week > .td-sec-head { display: none; }
  .td-wlist { display: flex; }
  .td-weight-mobile { display: none; }
  .td-weight-desk { display: flex; flex-direction: column; gap: 12px; }
  .td-only-desk { display: flex; }
  .td-only-mobile { display: none; }
  .td-lifts { flex-direction: column; gap: 0; }
  .td-lifts .td-sec-title { margin-bottom: 4px; }
  .td-lifts .td-small { margin-top: 10px; }
}
