/* ============================================================
   WORKOUT ROTATION — scoped to .workout-rotation & .wr-* / .today-workout
   Designed to stand out from terminal theme with warm dark cards
   ============================================================ */

/* -- Variables ------------------------------------------------ */
.workout-rotation,
.today-workout {
  --wr-bg:        #0d0d0d;
  --wr-surface:   #161616;
  --wr-card:      #1c1c1c;
  --wr-border:    #2a2a2a;
  --wr-border-hi: #444444;
  --wr-text:      #f0f0f0;
  --wr-muted:     #888888;
  --wr-accent:    #e8f55a;   /* yellow — today / active */
  --wr-teal:      #5af5c8;   /* gym */
  --wr-orange:    #f5a55a;   /* hike */
  --wr-purple:    #c084fc;   /* home weights */
  --wr-green:     #4ade80;   /* hockey */
  --wr-blue:     #4a8dde;
  --wr-red:     #de4a4a;
  --wr-radius:    10px;
  --wr-radius-sm: 6px;
}

/* -- Wrapper -------------------------------------------------- */
.workout-rotation {
  background: var(--wr-bg);
  color: var(--wr-text);
  font-family: 'Barlow', 'DM Sans', system-ui, sans-serif;
  padding: 2.5rem 1.5rem 4rem;
  border-radius: 16px;
  margin: 2rem 0;
}

/* -- Header --------------------------------------------------- */
.wr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--wr-border);
}

.wr-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wr-accent);
  margin: 0 0 0.3rem;
}

.wr-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--wr-text);
  margin: 0;
}

.wr-meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--wr-muted);
  line-height: 1.8;
}

.wr-pill {
  display: inline-block;
  background: var(--wr-card);
  border: 1px solid var(--wr-accent);
  color: var(--wr-accent);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  margin-top: 0.3rem;
}

/* -- Today card (shared between template + snippet) ----------- */
.wr-today-label,
.today-workout__eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wr-muted);
  margin: 0 0 0.5rem;
}

.wr-today-card,
.today-workout {
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  border-left: 3px solid var(--wr-accent);
  border-radius: var(--wr-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.today-workout__day {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--wr-text);
  margin: 0 0 0.25rem;
  letter-spacing: 0.04em;
}

.today-workout__focus {
  font-size: 1rem;
  color: var(--wr-muted);
  margin: 0 0 0.75rem;
  font-weight: 300;
}

.today-workout__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.today-workout__preview li {
  font-size: 0.72rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--wr-border-hi);
  border-radius: 999px;
  color: var(--wr-muted);
}

/* -- Tabs ----------------------------------------------------- */
.wr-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wr-tab {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius-sm);
  cursor: pointer;
  background: transparent;
  color: var(--wr-muted);
  transition: all 0.15s;
}

.wr-tab:hover {
  border-color: var(--wr-border-hi);
  color: var(--wr-text);
}

.wr-tab.active {
  background: var(--wr-text);
  color: var(--wr-bg);
  border-color: var(--wr-text);
}

/* -- Week panels ---------------------------------------------- */
.wr-week-panel         { display: none; flex-direction: column; gap: 0.6rem; }
.wr-week-panel.active  { display: flex; }

/* -- Day rows ------------------------------------------------- */
.wr-day {
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius);
  overflow: hidden;
  transition: border-color 0.15s;
}

.wr-day:hover         { border-color: var(--wr-border-hi); }
.wr-day.is-today      { border-color: var(--wr-accent); }

.wr-day-header {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  user-select: none;
}

.wr-day.is-today .wr-day-header { background: #1f1f00; } /* very subtle yellow tint */

.wr-day-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--wr-text);
}

.wr-day-focus {
  font-size: 0.82rem;
  color: var(--wr-muted);
  font-weight: 300;
}

.wr-day-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wr-chev {
  font-size: 0.7rem;
  color: var(--wr-muted);
  transition: transform 0.2s;
  margin-left: 0.25rem;
}

.wr-day.open .wr-chev { transform: rotate(180deg); }

/* -- Day body ------------------------------------------------- */
.wr-day-body {
  display: none;
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--wr-border);
}

.wr-day.open .wr-day-body { display: block; }

/* -- Sections ------------------------------------------------- */
.wr-section-title,
.today-workout__section-title {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wr-muted);
  margin: 1rem 0 0.45rem;
}

/* -- Exercise rows -------------------------------------------- */
.wr-exercises,
.today-workout__exercises {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wr-ex,
.today-workout__ex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: var(--wr-surface);
  border-radius: var(--wr-radius-sm);
  border: 1px solid var(--wr-border);
  gap: 1rem;
}

.wr-ex-name,
.today-workout__ex span:first-child {
  font-size: 0.85rem;
  color: var(--wr-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Colored dot before exercise name via type class */
.wr-ex-name::before,
.today-workout__ex span:first-child::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--wr-muted); /* fallback */
}

.wr-ex-core   .wr-ex-name::before,
.wr-ex-core   span:first-child::before,
.today-workout__ex--core span:first-child::before   { background: #d97706; }

.wr-ex-gym   .wr-ex-name::before,
.wr-ex-gym   span:first-child::before,
.today-workout__ex--gym span:first-child::before   { background: #2563eb; }

.wr-ex-home   .wr-ex-name::before,
.wr-ex-home   span:first-child::before,
.today-workout__ex--home span:first-child::before   { background: var(--wr-purple); }

.wr-ex-hike   .wr-ex-name::before,
.wr-ex-hike   span:first-child::before,
.today-workout__ex--hike span:first-child::before   { background: var(--wr-green); }

.wr-ex-hockey .wr-ex-name::before,
.wr-ex-hockey span:first-child::before,
.today-workout__ex--hockey span:first-child::before { background: var(--wr-red); }

.wr-ex-rest   .wr-ex-name::before,
.wr-ex-rest   span:first-child::before,
.today-workout__ex--rest span:first-child::before   { background: #555; }

.wr-ex-detail,
.today-workout__ex span:last-child {
  font-size: 0.75rem;
  color: var(--wr-muted);
  white-space: nowrap;
  font-weight: 300;
}

/* -- Notes ---------------------------------------------------- */
.wr-note,
.today-workout__note {
  margin-top: 0.85rem;
  padding: 0.65rem 0.9rem;
  background: var(--wr-surface);
  border-left: 2px solid var(--wr-border-hi);
  border-radius: 0 var(--wr-radius-sm) var(--wr-radius-sm) 0;
  font-size: 0.8rem;
  color: var(--wr-muted);
  line-height: 1.6;
}

/* -- Tags ----------------------------------------------------- */
.wr-tag {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
}

.wr-tag-core   { background: #fef3c715; color: #fbbf24; border-color: #fbbf2430; }
.wr-tag-gym   { background: #3b82f615; color: #60a5fa; border-color: #60a5fa30; }
.wr-tag-hockey { background: #4ade8015; color: #de4a4a; border-color: #4ade8030; }
.wr-tag-outdoor   { background: #f5a55a15; color: #0a850a; border-color: #f5a55a30; }
.wr-tag-home   { background: #c084fc15; color: #c084fc; border-color: #c084fc30; }
.wr-tag-rest   { background: #55555515; color: #888;    border-color: #44444430; }
.wr-tag-today  { background: var(--wr-accent); color: #000; border-color: var(--wr-accent); }

/* -- Today snippet section titles ----------------------------- */
.today-workout__section { margin-bottom: 0.75rem; }

/* -- Responsive ----------------------------------------------- */
@media (max-width: 600px) {
  .wr-header              { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .wr-meta                { text-align: left; }
  .wr-day-header          { grid-template-columns: 90px 1fr auto; }
  .wr-day-tags            { display: none; }
  .wr-day-focus           { font-size: 0.76rem; }
}