/* Weekly digest — the seven-day strip (views/digest.js). Uses the shared
   tokens/components (.btn*, --radius-*, --shadow-*) so it inherits the glow
   theme automatically; only the calendar's own layout lives here. */

.digest-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.digest-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.digest-week-label {
  margin: 0;
  font-size: 1.15rem;
}

.digest-lede {
  margin: 0;
  color: var(--text-muted);
}

.digest-today {
  align-self: flex-start;
}

/* --- Summary tiles --- */

.digest-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.digest-summary-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 130px;
  padding: var(--space-3);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
}

.digest-summary-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.digest-summary-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Brand-scoped attention feed --- */

.attention-panel {
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-sunken);
}

.attention-panel h2 { margin: 0 0 var(--space-3); font-size: 1.05rem; }
.attention-list { display: grid; gap: var(--space-2); }
.attention-empty { margin: 0; color: var(--text-muted); }

.attention-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  padding: var(--space-3);
  text-align: left;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.attention-item:hover,
.attention-item:focus-visible { border-color: var(--focus-ring); }
.attention-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attention-copy .muted-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-open { color: var(--violet-ink); font-weight: 700; }

/* --- The week strip --- */

.digest-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.digest-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 160px;
  padding: var(--space-3);
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: box-shadow 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.digest-day:hover,
.digest-day:focus-visible {
  border-color: var(--focus-ring);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.digest-day.is-today {
  border-color: var(--focus-ring);
  box-shadow: var(--shadow-sm);
}

.digest-day.is-empty {
  border-style: dashed;
}

.digest-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.digest-day-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.digest-day-num {
  font-size: 1.1rem;
  font-weight: 700;
}

.digest-day-count {
  margin: 0;
  font-size: 0.85rem;
}

.digest-day-empty,
.digest-day-more {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.digest-day-hint {
  margin: auto 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 120ms ease;
}

.digest-day:hover .digest-day-hint,
.digest-day:focus-visible .digest-day-hint,
.digest-day.is-empty .digest-day-hint {
  opacity: 1;
}

.digest-brand-chips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.digest-brand-chip {
  font-size: 0.72rem;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digest-day-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.digest-post {
  display: flex;
  gap: var(--space-2);
  font-size: 0.78rem;
  line-height: 1.3;
}

.digest-post-time {
  flex: none;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.digest-post-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digest-post.posted .digest-post-title {
  color: var(--text-muted);
}

.digest-loading {
  color: var(--text-muted);
}

/* Seven narrow columns stop being readable well before phone width, so the
   strip becomes a vertical list of full-width days rather than shrinking. */
@media (max-width: 900px) {
  .digest-week {
    grid-template-columns: 1fr;
  }

  .digest-day {
    min-height: 0;
  }

  .digest-day-hint {
    opacity: 1;
  }
}

/* Campaign name on a day's post line (S5). */
.digest-post-campaign {
  font-size: 11px;
  color: var(--violet-ink);
  margin-left: 6px;
}
.repurpose-panel {
  margin: 1rem 0;
}

.repurpose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.weekly-learning {
  margin: 1rem 0;
}
