/*
 * today.css — Today view: a one-tap checklist of the day's scheduled habits.
 *
 * Loaded after entry.css. Uses its own BEM block (.today) so it doesn't
 * collide with the timeline/list entry styles.
 */

.calendar__today {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px 40px;
  background: var(--bg);
}

.today__header {
  max-width: 560px;
  margin: 0 auto 16px;
}

.today__title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.today__status {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.today__progress {
  height: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.today__progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width var(--transition);
}

.today__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;

/* Longest active streak — a glanceable line under the title. */
.today__streak {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

}

.today__action-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.today__action-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.today__action-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.today__list {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--entry-color, var(--accent));
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: box-shadow var(--transition), opacity var(--transition), border-color var(--transition);
}

.today__row:hover {
  border-color: var(--entry-color, var(--accent));
  box-shadow: var(--shadow-sm);
}

.today__row:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

/* Upcoming (ghost) slots: dashed, slightly muted. */
.today__row--ghost {
  border-style: dashed;
  opacity: 0.8;
}

/* Done rows: muted, struck-through title. */
.today__row--done {
  opacity: 0.6;
}

/* Missed rows: red-tinted left border + "Missed" tag so they read as
 * "overdue" at a glance — distinct from pending (neutral) and done (struck). */
.today__row--missed {
  border-left-color: var(--danger);
}

.today__missed-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: middle;
}

/* Skipped rows: a deliberately-skipped upcoming slot. Dashed (like a ghost)
 * with a muted tint + tappable, so it reads as "planned but skipped" and can
 * be restored by tapping. Distinct from missed (red) and done (struck). */
.today__row--skipped {
  border-style: dashed;
  border-left-color: var(--text-muted);
  opacity: 0.75;
  cursor: pointer;
}

.today__skipped-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--surface-hover);
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: middle;
}

/* Restore glyph on a skipped row's check circle (accent, not the done fill). */
.today__check--restore {
  color: var(--accent);
  border-color: var(--accent);
}

/* Rows with modules: pointer cursor to signal they open a detail panel. */
.today__row--has-modules {
  cursor: pointer;
}

.today__row--done .today__name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.today__check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--entry-color, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: transparent;
  transition: background var(--transition);
}

.today__row--done .today__check {
  background: var(--entry-color, var(--accent));
}

.today__main {
  flex: 1;
  min-width: 0;
}

.today__name {
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.today__modules-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--entry-color, var(--accent));
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.7;
}

/* Chevron: the explicit "enter data" affordance for rows with modules.
 * The row body itself toggles done, so the chevron is the only path to the
 * detail overlay. */
.today__chevron {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.today__chevron:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.today__chevron:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.today__empty {
  max-width: 560px;
  margin: 32px auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Day summary card — a glanceable recap below the checklist. */
.today__summary {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.today__summary-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.today__summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.today__summary-stat {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.today__summary-spark {
  margin-top: 12px;
  height: 40px;
}
