/* outreach screens: rules added by the UI pass of 25 Oct 2026; loaded after features.css so same-specificity rules here win. */

/* ---- Settings: section menu (one chip per card, sticky under the top bar, one scrollable line on phones) ---- */
.set-menu {
  position: sticky;
  top: calc(var(--topbar-h) + env(safe-area-inset-top) + 6px);
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 2px 8px;
  margin: -6px -2px 6px;
  background: linear-gradient(var(--bg) 82%, transparent);
  -webkit-overflow-scrolling: touch;
}
.set-menu::-webkit-scrollbar { display: none; }
.set-menu:empty { display: none; }
.set-menu .chip { flex: none; white-space: nowrap; }
@media (min-width: 900px) { .set-menu { flex-wrap: wrap; overflow: visible; } } /* desktop: every section visible at once */
/* Jumping to a card (a section chip, a link like #settings?section=license) or to a field with a problem stops just below
   the sticky section menu instead of under it, and a field also stays above the Save bar. settings.js keeps --set-menu-h
   at the menu's real height (one row on a phone, several on a wide Mac window, 0 while it doesn't stick) and --set-save-h
   at the Save bar's. The top bar itself is already allowed for by html's scroll-padding-top (styles.css). */
#tab-settings .card[data-card] { scroll-margin-top: calc(var(--set-menu-h, 0px) + 2px); }
#tab-settings :is(input, select, textarea) {
  scroll-margin-top: calc(var(--set-menu-h, 0px) + 12px);
  scroll-margin-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom) + var(--set-save-h, 64px) + 20px);
}
/* Phones: html's scroll-padding-bottom (people.css) already keeps the bottom bar and the safe area out of the way, so a
   field only adds the Save bar's own room — counting the bottom bar twice left it about 70px higher than needed. */
@media (max-width: 899.98px) { #tab-settings :is(input, select, textarea) { scroll-margin-bottom: calc(var(--set-save-h, 64px) + 12px); } }

/* ---- Settings: a saved key's "Remove" and "Undo" — a full-size target on touch screens (styles.css keeps them small) ---- */
@media (pointer: coarse) { .secret-state .link { min-height: 44px; padding: 0 8px; } }

/* ---- Send: a switch that cannot apply right now (Ignore the cooldown while a repeat is chosen) ---- */
.switch.is-disabled { opacity: 0.55; }
.switch.is-disabled .switch-label { text-decoration: line-through; text-decoration-color: var(--muted); }

/* ---- Send: the × on an attached poster — 44 pt target on touch screens ---- */
@media (pointer: coarse) {
  .thumb-x { width: 32px; height: 32px; line-height: 32px; top: 2px; right: 2px; }
  .thumb-x::after { content: ""; position: absolute; inset: -6px; }
}

/* ---- Analytics: the old period's numbers fade while the new period loads ---- */
.is-updating { opacity: 0.5; transition: opacity 0.15s; }
@media (prefers-reduced-motion: reduce) { .is-updating { transition: none; } }
.an-head { justify-content: flex-end; }

/* ---- Groups: optional table columns leave the phone so the row's action stays on screen ---- */
@media (max-width: 600px) { .table-wrap .opt { display: none; } }

/* ---- Destructive links look destructive everywhere (Email contact Delete) ---- */
.link.danger { color: var(--err); }

/* ---- Jobs: the "automatic retries waiting" disclosure under Scheduled ---- */
.retries { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.retries > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.retries > summary .muted { font-weight: 400; }

/* ---- Autopilot: a rotation's pacing lives one level deeper ---- */
.rot-pacing { margin-top: 0; }
.rot-pacing > summary { color: var(--text-2, var(--muted)); }
.rot-pacing[open] > summary { color: var(--text); }
