/* Past Sessions (design/v5/V5FocusHistory.dc.html): the week card, a card per day, each session's
   time, task and timeline; Select's sliding ticks and the toolbar's selection capsule. Then
   Settings › Focus's presets list (V5Settings). */

.f-past { position: absolute; inset: 0; overflow: auto; }
/* the scroll edge under the bar */
.f-past::before {
  position: sticky;
  z-index: 3;
  top: 0;
  display: block;
  height: 72px;
  margin-bottom: -72px;
  background: linear-gradient(to bottom, var(--bg) 40%, var(--bg-0));
  content: "";
  pointer-events: none;
}
.f-past-col { max-width: 720px; margin: 0 auto; padding: 72px 24px 96px; }
.f-h1 { margin: 0 0 16px; padding: 0 4px; color: var(--fg-strong); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.f-card { border-radius: 18px; background: var(--card); }

/* the week */
.f-wk { display: flex; align-items: center; gap: 32px; padding: 20px 24px; }
.f-wk-words { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.f-wk-range { margin: 0; color: var(--muted); font-size: 12px; }
.f-wk-hero { margin: 6px 0 0; color: var(--fg-strong); font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.f-wk-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.f-up { color: var(--good-text); }
.f-down { color: var(--drift-text); }
.f-wk-chart { display: flex; flex: none; align-items: flex-end; gap: 10px; height: 96px; }
.f-wk-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 30px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  font: inherit;
  transition: opacity 200ms var(--ease), background-color 120ms var(--ease);
}
button.b.f-wk-day[aria-pressed="true"] { background-color: transparent; }
.f-wk-day:disabled { opacity: .35; }
.f-wk-day.dim { opacity: .5; }
.f-wk-bar {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  width: 20px;
  overflow: hidden;
  border-radius: 5px;
  transition: height 380ms var(--sp-smooth), box-shadow 200ms var(--ease);
}
.f-wk-bar.zero { background: var(--bar-zero); }
.f-wk-bar > i { flex: 1 1 0; min-height: 2px; background: var(--mc); }
.f-wk-day[aria-pressed="true"] .f-wk-bar { box-shadow: 0 0 0 2px var(--accent-ring-strong); }
.f-wk-d { color: var(--muted); font-size: 11px; font-weight: 500; }
.f-wk-day.today .f-wk-d { color: var(--fg-strong); font-weight: 600; }

/* one day only */
.f-filter-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.f-filter-row .f-chip-r { height: 24px; padding: 0 10px; }

.f-past-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 80px 0; color: var(--muted); }
.f-past-empty p { margin: 0; }
.f-past-empty[hidden] { display: none; }

/* the days */
.f-day { margin-top: 28px; }
.f-day-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; padding: 0 56px 0 16px; color: var(--fg); font-size: 13px; font-weight: 600; line-height: 18px; }
.f-day-sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.f-day-card { padding: 4px; }
.f-srow-w { position: relative; border-top: 1px solid var(--sep); }
.f-srow-w:first-child { border-top-color: transparent; }
.f-srow {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 12px 52px 12px 12px;
  border: 0;
  border-radius: 14px;
  color: var(--fg);
  font: 400 13px var(--font-ui);
  text-align: left;
}
.f-tickw { flex: none; width: 0; margin-right: -14px; overflow: hidden; opacity: 0; transition: width 300ms var(--sp-smooth), margin-right 300ms var(--sp-smooth), opacity 200ms var(--ease); }
.f-past.selecting .f-tickw { width: 16px; margin-right: 0; opacity: 1; }
.f-tick {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1.5px solid var(--faint);
  border-radius: 8px;
  color: var(--on-accent);
}
.f-tick svg { opacity: 0; }
.f-srow-w.picked .f-tick { border-color: var(--accent); background: var(--accent); }
.f-srow-w.picked .f-tick svg { opacity: 1; }
.f-when { flex: none; width: 92px; color: var(--muted); font-size: 12px; line-height: 18px; }
.f-what { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.f-what-task { overflow: hidden; color: var(--fg-strong); font-weight: 500; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.f-srow-del {
  position: absolute;
  top: 7px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 120ms var(--ease), background-color 120ms var(--ease);
}
.f-srow-w:hover .f-srow-del,
.f-srow-w:focus-within .f-srow-del { opacity: 1; }
@media (hover: none) { .f-srow-del { opacity: 1; } }
.f-past.selecting .f-srow-del { display: none; }

/* the toolbar: Select, or "N selected · Delete · Done" */
.f-tools { display: flex; }
.f-selbar { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 4px 0 14px; border-radius: 18px; font-size: 12px; }
.f-seln { margin-right: 6px; color: var(--muted); }
.f-cap-in { height: 28px; padding: 0 10px; border: 0; border-radius: 14px; color: var(--fg); font: 500 12px var(--font-ui); }
.f-cap-in.danger { color: var(--drift-text); }
.f-cap-in.strong { color: var(--fg-strong); font-weight: 600; }
.f-cap-in:disabled { opacity: .35; }

@media (max-width: 640px) {
  .f-wk { flex-direction: column; align-items: flex-start; gap: 16px; }
  .f-past-col { padding: 64px 16px 96px; }
  .f-when { width: auto; }
  .f-srow { flex-wrap: wrap; gap: 4px 14px; }
}

/* ---- Settings › Focus: the presets, dragged to reorder */
.f-set-presets { padding: 0 8px 0 4px; }
.f-set-row { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--sep); }
.f-set-row:first-child { border-top-color: transparent; }
.f-set-row.drop-on { box-shadow: inset 0 2px 0 var(--accent); }
.f-set-grip { display: grid; flex: none; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 14px; color: var(--faint); cursor: grab; }
.f-set-name { display: flex; flex: 1; align-items: baseline; gap: 8px; min-width: 0; margin: 0; color: var(--fg); font-size: 13px; }
.f-set-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-set-def { flex: none; color: var(--muted); font-size: 11px; }
.f-set-split { flex: none; font-size: 12px; white-space: nowrap; }
.f-set-sl { color: var(--muted); }
.f-set-del { display: grid; flex: none; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 14px; color: var(--muted); }
.f-set-del:disabled { opacity: .35; }
.f-set-add { padding-left: 4px; }
