/* Weekly Planner Styles - Mobile First Approach */

/* Main Container */
.weekly-planner-container {
  width: 100%;
}

/* Content Layout - Two Columns */
.weekly-planner-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .weekly-planner-content {
    flex-direction: row;
    gap: 1rem;
  }
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.session-name {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--dark-gray);
}

/* --- Day card internal grid (redesign 2026-04-08) --- */

/* Reusable drop-target affordance: dashed outline + min-height so empty
   panes still read as "drop something here." Apply alongside any pane
   that should accept a drag-drop. The active highlight (`day-card-drop-
   target` class, toggled by Stimulus controllers on dragover) layers on
   top — see rule below. */
.drop-target {
  min-height: 3rem;
  padding: 0.5rem;
  border: 1px dashed oklch(80% 0.005 255);
  border-radius: 0.375rem;
  background: transparent;
  transition: border-color 0.1s, background-color 0.1s;
}

.drop-target.day-card-drop-target {
  border-color: var(--primary-color, #3b82f6);
  background-color: oklch(97% 0.02 255);
}

.day-card-auto-plan-stimulus-form {
  margin: 0;
}

/* Template Selector */
.template-select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--medium-gray);
  background-color: white;
  color: var(--dark-gray);
  font-size: 0.8125rem;
  cursor: pointer;
}

.template-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

/* --- Element catalog (inside a day's Select Elements panel) --- */
.element-catalog {
  display: flex;
  flex-direction: column;
}

/* The panel's three tabs (Suggested / Ready / Not used). Each tab pane is
   capped and scrolls on its own so the day card above, with its drop
   target and planned elements, stays in reach however long the list. */
.day-card-suggestions .tab-pane:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 24rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.drawer-element-chip.usage-type-hidden {
  display: none;
}

/* Stale buckets: one collapsible row each on the Not used tab */
.drawer-bucket-empty {
  opacity: 0.5;
}

.drawer-bucket-empty .section-title {
  cursor: default;
}

/* Collapsible catalog section (cycles, recovery ready, recently used, Closes) */
.drawer-section {
  margin-bottom: 0.75rem;
}

.day-card-suggestions .section-title {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.35rem 0;
  color: var(--dark-gray, #1f2937);
  background: none;
  list-style: none;
}

.day-card-suggestions .section-title::-webkit-details-marker {
  display: none;
}

/* A rotating disclosure caret so a collapsed row reads as expandable. */
.day-card-suggestions .section-title::before {
  content: "\25B8";
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
  transition: transform 0.15s;
}

.day-card-suggestions details[open] > .section-title::before {
  transform: rotate(90deg);
}

.day-card-suggestions .drawer-bucket-empty .section-title::before {
  visibility: hidden;
}

.day-card-suggestions .drawer-section {
  margin-bottom: 0.25rem;
}

.day-card-suggestions .section-count {
  font-size: 0.8rem;
}

.section-elements {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.5rem;
}

.drawer-element-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--surface-raised, #f9fafb);
  cursor: grab;
  font-size: 0.8rem;
  transition: background 0.15s;
}

.drawer-element-chip:hover {
  background: var(--surface-hover, #f3f4f6);
}

.drawer-element-chip.dragging {
  opacity: 0.5;
}

/* Reset the global .element-name background inside drawer chips so the
   tile color shows through cleanly. Dark text is readable on every
   usage_type tile background. */
.drawer-element-chip .element-name {
  background: transparent;
  margin: 0;
  color: var(--dark-gray);
}

/* Element chip backgrounds by usage_type — tile color identifies type at a glance.
   Color tokens live in base.css under :root. */
.drawer-element-chip-workout-partner {
  background: var(--chip-partner-bg);
}
.drawer-element-chip-workout-partner:hover {
  background: var(--chip-partner-bg-hover);
}

.drawer-element-chip-activation {
  background: var(--chip-activation-bg);
}
.drawer-element-chip-activation:hover {
  background: var(--chip-activation-bg-hover);
}

.drawer-element-chip-stretching {
  background: var(--chip-stretching-bg);
}
.drawer-element-chip-stretching:hover {
  background: var(--chip-stretching-bg-hover);
}

.drawer-element-chip-accessory {
  background: var(--chip-accessory-bg);
}
.drawer-element-chip-accessory:hover {
  background: var(--chip-accessory-bg-hover);
}

/* Recovery baseline tint on element chips. Replaces the former recovery-dot
   indicator — the chip's own background now carries the recovery status,
   which saves horizontal space and is readable at a glance. Softened with
   white so the default dark element-name text stays legible.
   The fatigue-load classes in planner_chip.css, linked after this file,
   override these when a candidate would land on muscles that are heavily
   loaded already. */
.drawer-element-chip--recovery-ready {
  background-color: color-mix(in oklch, var(--load-rest) 25%, white);
}

.drawer-element-chip--recovery-partial {
  background-color: color-mix(in oklch, var(--load-light) 55%, white);
}

.drawer-element-chip--recovery-fatigued {
  background-color: color-mix(in oklch, var(--load-heavy) 40%, white);
}

/* --- Element Chips on Day Cards --- */
.planned-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.element-chip-cycle {
  background: color-mix(in oklch, var(--accent-cycle) 18%, white);
  color: var(--accent-ink);
}

.element-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
}

.element-chip-remove:hover {
  opacity: 1;
}

.chip-badge {
  font-size: 0.6rem;
  padding: 0 0.25rem;
  border-radius: 0.25rem;
}

.chip-badge-cycle {
  background: color-mix(in oklch, var(--accent-cycle) 18%, white);
  color: var(--accent-ink);
}

/* --- Stimulus Type Selector --- */
.stimulus-type-selector {
  padding: 0.5rem 0;
}

.stimulus-chips {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* One row per energy system so chips of the same color cluster together,
   reducing color-bouncing when scanning the palette. */
.stimulus-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* A pill auto-adopts a dark outline when its stimulus type appears in any
   block of the day's plan. The pill stays draggable in this state — drop
   to add another block of the same type. */
.stimulus-chip-in-plan {
  outline: 2px solid var(--dark-gray, #1f2937);
  outline-offset: 1px;
}

.template-shortcut {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

/* Heads-up rendered when the user opens the "Use template..." dropdown.
   Reminds them that picking a template wipes any stimulus chips / block
   times they've already configured for this day. */
.template-shortcut-warning {
  margin: 0.375rem 0;
  font-size: 0.7rem;
  line-height: 1.35;
  padding: 0.375rem 0.5rem;
  background-color: oklch(95% 0.02 85);
  border-radius: 0.25rem;
}

/* --- Drop Target Highlight --- */
.day-card-drop-target {
  outline: 2px dashed var(--primary-color);
  outline-offset: -2px;
  background: color-mix(in oklch, var(--primary-color) 8%, white);
}

/* --- Search Results (replace the panel body while a query is typed) --- */
.drawer-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 24rem;
  overflow-y: auto;
}

.drawer-search-results.hidden {
  display: none;
}

.hidden {
  display: none;
}

.plan-block-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.plan-element-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.7rem;
}

.plan-element-planned {
  background: color-mix(in oklch, var(--accent-cycle) 18%, white);
  color: var(--accent-cycle);
}

.plan-element-extra {
  background: oklch(92% 0.02 200);
  color: oklch(50% 0.02 200);
}

.plan-element-pending {
  background: oklch(88% 0.06 250);
  color: oklch(30% 0.08 250);
  font-weight: 500;
}

/* Suggestions panel sits flush beneath the day card as a sibling so it persists
   through day-card re-renders (drop → Turbo Stream replace of the card only).
   Visually tied to the card above: no top margin, no top border, only bottom
   corners rounded. Left border stripe marks it as day-specific. */
.day-card-suggestions {
  /* The elements drawer opens inside the day's panel, under its card,
     set apart by a hairline rather than as a box of its own. */
  padding: 0.75rem 1rem;
  background: var(--surface-raised, #f9fafb);
  border-top: 1px solid var(--border, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.day-card-suggestions--collapsed {
  display: none;
}

.suggestion-tier {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.suggestion-tier-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, oklch(55% 0 0));
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle, #eef0f3);
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Suggestion chip variant of the shared drawer chip. Only tweaks the size
   and adds a subtle border — no background override, so the recovery and
   fatigue tints set on the chip root flow through unmolested. */
.suggestion-chip {
  border: 1px solid var(--border, #e5e7eb);
  font-size: 0.75rem;
  padding: 0.3125rem 0.5rem;
}

/* Tap-to-add affordance: a small +/✓ pill on the right of an addable chip.
   The glyph and fill flip on the --added state class (toggled optimistically
   in JS) so the feedback is instant, no re-render needed. */
.suggestion-chip-toggle {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--accent-cycle, #007bff);
  color: var(--accent-cycle, #007bff);
  font-size: 0.95rem;
  line-height: 1;
}

.suggestion-chip-toggle::before {
  content: "+";
}

.drawer-element-chip--added .suggestion-chip-toggle {
  color: white;
  background: var(--accent-cycle, #007bff);
  border-color: var(--accent-cycle, #007bff);
}

.drawer-element-chip--added .suggestion-chip-toggle::before {
  content: "✓";
}

/* Added chips read as committed to the plan. */
.suggestion-chip.drawer-element-chip--added {
  outline: 2px solid var(--accent-cycle, #007bff);
  outline-offset: -2px;
}

/* Mobile: stack suggestion chips one per row, single-line with the name
   truncating, so tap-to-add replaces drag-and-drop. The reasons sit behind
   each chip's "i" popover at every width (planner_chip.css). */
@media (max-width: 899px) {
  .suggestion-chips {
    flex-direction: column;
  }

  .suggestion-chip {
    width: 100%;
    padding: 0.5rem;
  }

  .suggestion-chip .element-name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Desktop: one-line pills at their own width, flowing in rows, the
   reasons behind each chip's "i" popover rather than a second line.
   Scoped to the main tier list so the narrow sidebar chips are untouched. */
@media (min-width: 900px) {
  .day-card-suggestions-main .suggestion-chip {
    flex: 0 1 auto;
    max-width: 24rem;
  }
}

/* Two-column layout inside the suggestions panel: main tiers on the left,
   narrow "Already in this week" sidebar on the right. Stacks on mobile. */
.day-card-suggestions-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .day-card-suggestions-layout {
    grid-template-columns: 1fr minmax(200px, 28%);
  }
}

.day-card-suggestions-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.day-card-suggestions-sidebar {
  padding: 0.5rem 0.75rem;
  background-color: rgba(0, 0, 0, 0.04);
  border-left: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.already-in-week-header h4 {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, oklch(55% 0 0));
}

.already-in-week-hint {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  line-height: 1.35;
}

/* Sidebar list flexes to fill the remaining space in its grid cell, which
   is sized by the taller main-tiers column. When many elements are scheduled
   across the week the list scrolls instead of pushing the panel taller. */
.already-in-week-elements {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Loading state shown while the suggestion panel is fetching from the server. */
.suggestion-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.8rem;
  color: var(--text-muted, oklch(55% 0 0));
}

.suggestion-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border, #e5e7eb);
  border-top-color: var(--primary, #3b82f6);
  border-radius: 50%;
  animation: suggestion-spin 0.9s linear infinite;
}

@keyframes suggestion-spin {
  to {
    transform: rotate(360deg);
  }
}

.suggestion-loading-text {
  font-variant-numeric: tabular-nums;
}

/* Recommendation chip affordances: inline checkbox + reveal-on-select multiplier */
.drawer-element-chip .chip-checkbox {
  margin-right: 0.4rem;
}
.drawer-element-chip .chip-multiplier {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.drawer-element-chip:has(input[type="checkbox"]:checked) .chip-multiplier {
  display: inline-flex;
}
.drawer-element-chip--used-today {
  opacity: 0.6;
}

/* In the recommendation/template modal, chips sit in a fixed-width grid
   (.element-list). Keep the revealed multiplier inside the cell: let the name
   truncate, pin the control, and drop the redundant "Multiplier:" label (the
   options already read "1.0x"). Scoped to .element-list so the day panel's
   catalog (which uses .drawer-bucket) is unaffected. */
.element-list .drawer-element-chip {
  overflow: hidden;
}
.element-list .drawer-element-chip .element-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.element-list .chip-multiplier {
  flex: 0 0 auto;
}
.element-list .chip-multiplier .multiplier-label {
  display: none;
}
.element-list .chip-multiplier select {
  width: auto;
  min-width: 3.25rem;
  padding-block: 0.1rem;
}

/* Workout template picker modal (block-level WorkoutTemplate attachment).
   Rows: expandable details (name + badges as the summary, description and
   template text in the body) with the attach button outside the toggle. */
.template-picker-detach {
  margin-bottom: 0.75rem;
}

.template-picker-list {
  display: flex;
  flex-direction: column;
}

.template-picker-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid oklch(92% 0 0);
}

.template-picker-row:last-child {
  border-bottom: none;
}

.template-picker-info {
  min-width: 0;
  flex: 1 1 auto;
}

/* Neutralize the legacy global summary/summary:hover rules from
   utilities.css (white pill + dark-gray invert), which turn the row into
   an unreadable dark slab on hover. */
.template-picker-summary {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  /* Each line starts at the left in this column layout. */
  align-items: flex-start;
  text-align: left;
  gap: 0.25rem;
  background-color: transparent;
  padding: 0;
  border-radius: 0.375rem;
}

.template-picker-summary:hover {
  background-color: oklch(96% 0 0);
  color: inherit;
}

.template-picker-summary:hover .template-picker-name {
  color: var(--dark-gray);
}

.template-picker-summary:hover .template-picker-detail {
  color: var(--medium-gray-dark);
}

.template-picker-name {
  font-weight: 600;
  color: var(--dark-gray);
}

.template-picker-detail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--medium-gray-dark);
}

.template-picker-fit {
  font-weight: 600;
}

.template-picker-duration {
  font-variant-numeric: tabular-nums;
}

.template-picker-duration-fit {
  font-weight: 600;
}

.template-picker-duration-fit--over {
  color: var(--color-warning, #b45309);
}

.template-picker-duration-fit--under {
  color: var(--medium-gray-dark);
}

.template-picker-duration-fit--fit {
  color: var(--dark-gray);
}

.template-picker-body {
  margin-top: 0.5rem;
}

.template-picker-description {
  font-size: 0.8rem;
  color: var(--medium-gray-dark);
  margin-bottom: 0.375rem;
}

.template-picker-text {
  font-size: 0.75rem;
  white-space: pre-wrap;
  background-color: oklch(97% 0 0);
  border-radius: 0.375rem;
  padding: 0.5rem;
  margin: 0;
  color: var(--dark-gray);
}

/* Attached workout-template name inside the planned-intent banner block chip */
.planned-intent-workout-template {
  font-size: 0.7rem;
  font-weight: 600;
}

/* Programming mix guidance: what the block is short on, above the gap bar. */

.mix-pane-loading {
  padding: 1rem;
  color: var(--color-text-muted);
}

/* How to read the mix panes, above the window tabs. */
.mix-modal-intro {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* Week brief -- the weekly planner's top strip: where the week sits, the
   three spend bars, and the ranked headline chips. Its layout is
   `.planner-brief` in day.css. */
.week-brief {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.week-brief-where {
  display: flex;
  gap: 0.875rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.week-brief-title {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.week-brief-cycle {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.week-brief-next {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  border-left: 1px solid var(--border);
  padding-left: 0.875rem;
}

.week-brief-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.week-brief-chips-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
  text-decoration: none;
}

.week-brief-clear {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-style: italic;
}

.brief-chip-verb {
  flex: none;
  font-weight: 600;
}

/* An inline <details>: opening it must not knock the "+N more" chip and the
   hidden chips it reveals onto their own line, so the disclosure itself
   flexes and wraps like the chip row around it. */
.week-brief-more {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

/* The browser's own `details:not([open]) > *:not(summary) { display: none }`
   rule is a real, overridable CSS rule (not a hard "hidden" mechanism) --
   `.chip` (a class selector) beats its specificity, so every closed
   headline chip kept computing display: inline-flex and generating a real,
   positioned box that could push scrollWidth past the viewport (confirmed
   via getComputedStyle/getBoundingClientRect on the live page). This rule
   is specific enough to win back the closed state regardless of what
   display the hidden content's own class sets. Open state is untouched:
   the chips fall back to .chip's inline-flex and wrap into the same
   row as the summary, since .week-brief-more is already flex-wrap: wrap. */
details.week-brief-more:not([open]) > *:not(summary) {
  display: none;
}

.week-brief-more summary {
  list-style: none;
  cursor: pointer;
}

.week-brief-more summary::-webkit-details-marker {
  display: none;
}

/* Week spend -- the three compact StackedBars (energy, stimulus minutes,
   equipment) rendered inside #week-spend. */
.week-spend {
  display: flex;
  gap: 1.125rem;
  flex-wrap: wrap;
}

.stacked-bar {
  /* 150px where there is room (the week brief's spend bars); never wider
     than its box, so a narrow planner column's muscle bar fits inside it. */
  min-width: min(150px, 100%);
}

.stacked-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.1875rem;
}

.stacked-bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-muted);
  display: flex;
  overflow: hidden;
}

.stacked-bar-segment {
  display: block;
  height: 100%;
}

/* Energy-system tones (energy bar): the same blue-to-purple fills as the
   energy chips, kept clear of the red-to-green readiness ladder. */
.stacked-bar-segment-phosphagen { background-color: var(--energy-phosphagen); }
.stacked-bar-segment-glycolytic { background-color: var(--energy-glycolytic); }
.stacked-bar-segment-oxidative { background-color: var(--energy-oxidative); }
.stacked-bar-segment-skill { background-color: var(--energy-skill); }

/* Stimulus-type tones (stimulus-minutes bar): same colors
   Components::Stimulus::Badge uses, grouped by each type's energy system. */
.stacked-bar-segment-strength,
.stacked-bar-segment-power_output,
.stacked-bar-segment-barbell_technique,
.stacked-bar-segment-hypertrophy,
.stacked-bar-segment-accessory_work {
  background-color: var(--energy-phosphagen);
}

.stacked-bar-segment-anaerobic_capacity,
.stacked-bar-segment-lactate_threshold,
.stacked-bar-segment-mixed_modal,
.stacked-bar-segment-muscular_endurance,
.stacked-bar-segment-aerobic_power {
  background-color: var(--energy-glycolytic);
}

.stacked-bar-segment-aerobic_capacity,
.stacked-bar-segment-endurance,
.stacked-bar-segment-recovery,
.stacked-bar-segment-warmup {
  background-color: var(--energy-oxidative);
}

.stacked-bar-segment-skill_practice,
.stacked-bar-segment-gymnastics {
  background-color: var(--energy-skill);
}

/* Neutral grey ramp (equipment bar): most-used equipment reads darkest,
   the "everything else" segment fades into the track. */
.stacked-bar-segment-equipment-1 { background-color: var(--blueish-gray); }
.stacked-bar-segment-equipment-2 { background-color: var(--medium-gray); }
.stacked-bar-segment-equipment-3 { background-color: var(--medium-gray-light); }
.stacked-bar-segment-equipment-more { background-color: var(--border); }

/* Day board: seven columns of lanes, DayColumn and DayBoard (see
   app/views/weekly_planners); the layout of the days themselves is
   .planner-lanes-grid in day.css. */
.day-board {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.day-column-bar-today {
  box-shadow: inset 0 3px 0 var(--primary-color);
}

.day-column-today .day-column-name {
  color: var(--primary-color);
}

.day-column-rest {
  background-color: var(--surface-muted);
  color: var(--text-muted);
}

.day-column-past {
  opacity: 0.7;
}

/* The day's head bar (Components::DayColumnHead): the head -- the
   planner's expand button, the week's or the month's link -- and the day's
   weather beside it. The bar carries the tint and bleeds to the column's
   edges; the head fills it and tints on hover. */
.day-column-bar {
  display: flex;
  /* In a narrow column the weather drops to its own line in the bar
     rather than running into the name, date and status. */
  flex-wrap: wrap;
  align-items: stretch;
  /* Full bleed: cancel the column's padding so the tint reaches its edges. */
  margin: calc(-1 * var(--day-column-pad-y)) calc(-1 * var(--day-column-pad-x)) 0;
  border-radius: calc(var(--day-column-radius) - 2px) calc(var(--day-column-radius) - 2px) 0 0;
  /* The darkest of a day's strata (Components::DayStrata), on every day
     head: the planner, the calendar week and the month. */
  background-color: var(--stratum-head);
}

.day-column-bar-expanded {
  background-color: color-mix(in oklab, var(--primary-color) 18%, var(--surface-white));
}

.day-column-head {
  /* Sized by its contents first, so the bar knows when to wrap. */
  flex: var(--day-column-head-grow, 1 1 auto);
  min-width: 0;
  display: flex;
  /* Name, date and status read together from the left; the weather sits
     at the bar's far end, beside the head. */
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.375rem;
  cursor: pointer;
  /* A bar with chips after its head sets --day-column-head-pad-end to 0, so
     the chips carry the space between. */
  padding: var(--day-column-pad-y) var(--day-column-head-pad-end, var(--day-column-pad-x)) var(--day-column-pad-y) var(--day-column-pad-x);
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.day-column-head:hover {
  background-color: color-mix(in oklab, var(--text-primary) 5%, transparent);
}

.day-column-head:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.day-column-head-expanded:hover {
  background-color: color-mix(in oklab, var(--primary-color) 8%, transparent);
}

/* The weather beside the head: its own link to the hourly forecast. */
.day-column-weather {
  /* A narrow month cell sets --day-column-weather-display to hide it. */
  display: var(--day-column-weather-display, flex);
  align-items: center;
  padding: 0 var(--day-column-pad-x) 0 0.25rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.day-column-weather:hover {
  background-color: color-mix(in oklab, var(--text-primary) 5%, transparent);
}

.day-column-name {
  font-weight: 600;
}

.day-column-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.day-column-rest-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.day-column-primary {
  flex: 1;
  /* The kit button keeps its label on one line; in a column narrower than
     "Scheduled · Open" it wraps, centred, instead of pushing the column
     wider. */
  min-width: 0;
  white-space: normal;
  text-align: center;
}
