/*
  🔒 The picker before a share (web/household.js openPicker, hh-pv- classes): which of my tasks stay
  private before 🏡 Share my schedule goes out (Settings → 🏡 Household, 👥 Friends). choreboy.css's
  tokens, so it follows the device's light or dark; the dimmed page behind it has its own pair. Phone
  first: 16 px from each edge, the header, search and buttons stay put while the list scrolls inside,
  nothing goes sideways. The only motion, its fade in, is off with reduced motion.
*/

/* Shown with showModal() (the top layer, the page behind inert), or with [open] where a browser has
   no <dialog> (the same box, fixed in the middle). */
.hh-pv { display: none; }
.hh-pv[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 1000;
  box-sizing: border-box;
  width: min(36rem, calc(100% - 32px));
  max-width: none;
  height: fit-content;
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: var(--radius-lg, 14px);
  background: var(--surface, #ffffff);
  color: var(--text, #101828);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(16, 24, 40, .14));
  animation: hh-pv-in .16s ease-out;
}
.hh-pv::backdrop { background: rgba(16, 24, 40, .45); }
@media (prefers-color-scheme: dark) {
  .hh-pv::backdrop { background: rgba(0, 0, 0, .62); }
}
@keyframes hh-pv-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .hh-pv[open] { animation: none; }
}
.hh-pv *, .hh-pv *::before, .hh-pv *::after { box-sizing: border-box; }
.hh-pv :focus-visible { outline: 2px solid var(--accent, #15803d); outline-offset: 2px; }
.hh-pv [hidden] { display: none !important; }

.hh-pv-box { display: flex; flex-direction: column; min-height: 0; max-height: calc(100dvh - 32px); margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hh-pv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 0; }
.hh-pv-h { margin: 0; padding-top: 4px; font-size: 1.15rem; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; min-width: 0; }
.hh-pv-x { flex-shrink: 0; width: 40px; height: 40px; margin: -4px -6px 0 0; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius, 10px); background: transparent; color: var(--text-2, #475467); font: 600 1.05rem/1 var(--font, system-ui, sans-serif); cursor: pointer; }
.hh-pv-x:hover { background: var(--surface-2, #f2f4f7); }
.hh-pv-intro { margin: 6px 16px 10px; color: var(--text-2, #475467); font-size: .9rem; line-height: 1.4; }

.hh-pv-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.hh-pv-q { flex: 1 1 12rem; min-width: 0; }
.hh-pv-bulk { display: flex; flex-wrap: wrap; gap: 6px; }
.hh-pv-count { margin: 10px 16px 6px; font-size: .88rem; font-weight: 650; color: var(--text-2, #475467); font-variant-numeric: tabular-nums; }

/* The list: the only part that scrolls. */
.hh-pv-scroll { flex: 1 1 auto; min-height: 6rem; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 8px; border-top: 1px solid var(--border, #e4e7ec); border-bottom: 1px solid var(--border, #e4e7ec); }
.hh-pv-scroll:focus { outline: none; }
.hh-pv-group { margin: 0; }
.hh-pv-ghead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 6px; background: var(--surface, #ffffff); }
.hh-pv-gname { margin: 0; font-size: .92rem; font-weight: 700; min-width: 0; }
.hh-pv-gn { margin-left: .25rem; color: var(--text-3, #667085); font-weight: 600; font-size: .8rem; }
.hh-pv-gall { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 36px; padding: 0 4px; font-size: .82rem; font-weight: 650; color: var(--text-2, #475467); cursor: pointer; }
.hh-pv-list { list-style: none; margin: 0; padding: 0; }
.hh-pv-item + .hh-pv-item { border-top: 1px solid var(--border, #e4e7ec); }
.hh-pv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 0; cursor: pointer; }
.hh-pv-what { display: flex; flex-direction: column; min-width: 0; }
.hh-pv-title { font-weight: 550; overflow-wrap: anywhere; }
.hh-pv-meta { font-size: .78rem; color: var(--text-3, #667085); }
.hh-pv-keep { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: .8rem; color: var(--text-2, #475467); white-space: nowrap; }
.hh-pv input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent, #15803d); cursor: pointer; }
.hh-pv-none { margin: 14px 0; }

.hh-pv-msg { margin: 0; padding: 0 16px; color: var(--bad, #b42318); font-size: .88rem; font-weight: 600; }
.hh-pv-msg:not(:empty) { padding-top: 8px; }
.hh-pv-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; }
.hh-pv-foot .btn { min-height: 44px; }

@media (max-width: 420px) {
  .hh-pv-bulk { width: 100%; }
  .hh-pv-bulk .btn { flex: 1; }
  .hh-pv-keep > span { font-size: .76rem; }
  .hh-pv-foot .btn { flex: 1; }
}
