/* shared/repeat.css — styles for the shared repeat picker's new pieces.
   The modal shell and wheels reuse each app's existing classes; the preset
   list, the Custom sheet layout, the "Ends" row, and the small end-date
   calendar are defined here. Colours use the apps' shared tokens (--ink,
   --faded, --line, --bg) so the picker matches both apps exactly. */

/* Custom sheet ----------------------------------------------------------- */
/* One quiet card: the "Every N unit" phrase, a fixed weekday row (dimmed
   until the unit is Week, so nothing jumps), and a summary line. */
/* All three sub-sheets (preset list, Custom, end-date calendar) share one
   height, so moving between them never resizes the sheet. The calendar's
   fixed six-week height sets the number. */
.rp-sheet { min-height: 465px; display: flex; flex-direction: column; }

.rp-custom {
  padding: 2px 2px 0; flex: 1;
  display: flex; flex-direction: column; justify-content: space-between;
}
.rp-freq-row {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.rp-freq-row__label { font-weight: 600; font-size: 16px; }
.rp-weekday-block {
  margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line);
  transition: opacity 0.15s ease;
}
.rp-weekday-block.is-disabled { opacity: 0.32; pointer-events: none; }
.rp-custom__label {
  font-size: 13px; color: var(--faded); text-align: center; margin-bottom: 10px;
}
.rp-weekday-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rp-weekday {
  aspect-ratio: 1 / 1; min-width: 0; padding: 0; border: 0; border-radius: 999px;
  background: #f1f1f1; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rp-weekday.selected { background: var(--ink); color: var(--bg); }
.rp-custom__summary {
  margin-top: 12px; text-align: center; font-size: 14px; color: var(--faded);
}

/* Preset list ------------------------------------------------------------ */
.rp-presets { display: flex; flex-direction: column; padding: 4px 0; }
.rp-preset {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 18px; border: 0; background: none;
  font: inherit; font-size: 16px; color: inherit; text-align: left;
  cursor: pointer;
}
.rp-preset:active { background: rgba(127, 127, 127, 0.12); }
.rp-preset__mark { width: 18px; text-align: center; opacity: 0; }
.rp-preset.selected .rp-preset__mark { opacity: 1; }
.rp-preset__chev { opacity: 0.5; }
/* Non-navigating rows reserve the chevron's width (invisibly) so every row's
   dot lines up in the same column as Custom's. */
.rp-preset__chev.is-spacer { visibility: hidden; }
/* Dot + chevron travel together at the row's right edge. */
.rp-preset__right { display: inline-flex; align-items: center; gap: 8px; }

.rp-divider { height: 1px; background: rgba(127, 127, 127, 0.18); margin: 4px 0; }

/* Ends row --------------------------------------------------------------- */
.rp-ends {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 18px; border: 0; background: none;
  font: inherit; font-size: 16px; color: inherit; cursor: pointer;
}
.rp-ends__val { opacity: 0.7; margin-left: auto; margin-right: 8px; }

/* Small end-date calendar ------------------------------------------------ */
.rp-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 6px 6px;
}
.rp-cal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 4px;
}
.rp-dow { text-align: center; font-size: 12px; opacity: 0.55; padding: 1px 0; }
/* Fixed row height (not width-driven) + always six weeks keeps the calendar the
   same height on every month and every screen width, so nothing jumps. */
.rp-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 44px;
  gap: 2px; padding: 0 4px;
}
.rp-cell {
  width: 42px; height: 42px; margin: 0 auto; align-self: center;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; font: inherit; font-size: 14px; color: inherit;
  border-radius: 999px; cursor: pointer;
}
.rp-cell--blank { pointer-events: none; }
.rp-cell:disabled { opacity: 0.25; cursor: default; }
.rp-cell.selected { background: var(--ink); }
.rp-cell.selected span { color: var(--bg); }
.rp-ends-actions { display: flex; gap: 10px; padding: 6px 14px 2px; }
.rp-ends-actions button {
  flex: 1; padding: 11px 0; border-radius: 12px; border: 0; font: inherit;
  font-size: 15px; cursor: pointer;
}
