/* prefs.css -- the "What matters to you?" priorities sheet. */

.pf-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.45);
}

.pf-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  overflow-y: auto;
  background: var(--surface, #ffffff);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: var(--shadow-2, 0 8px 30px rgba(20, 24, 29, 0.18));
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.pf-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim, #5b6470);
  background: var(--surface-2, #f0f2f5);
}

.pf-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding-right: 40px;
}

.pf-sub {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-dim, #5b6470);
}

.pf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border, #e2e6ec);
  border-radius: var(--radius, 14px);
  overflow: hidden;
}

.pf-row {
  display: flex;
  align-items: stretch;
  background: var(--surface, #ffffff);
}
.pf-row + .pf-row { border-top: 1px solid var(--border, #e2e6ec); }
.pf-row.is-ranked { background: color-mix(in srgb, var(--brand, #2f6df0) 7%, var(--surface, #ffffff)); }
.pf-row.is-skipped .pf-label { text-decoration: line-through; color: var(--text-faint, #8a93a0); }

.pf-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px;
  text-align: left;
}

.pf-rank {
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--brand, #2f6df0);
  color: var(--brand-ink, #ffffff);
}
.pf-rank--empty {
  background: transparent;
  border: 2px dashed var(--border-strong, #cdd3dc);
}
.pf-rank--skip {
  background: var(--surface-2, #f0f2f5);
  color: var(--text-faint, #8a93a0);
}

.pf-ico { color: var(--text-dim, #5b6470); font-size: 1.1rem; }
.pf-label { font-weight: 600; }

.pf-skip {
  flex: none;
  align-self: center;
  margin-right: 10px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--radius-pill, 999px);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim, #5b6470);
  background: var(--surface-2, #f0f2f5);
}
.pf-skip[aria-pressed="true"] {
  color: var(--ps-tier-poor, #dc2626);
  background: var(--ps-tier-poor-bg, rgba(220, 38, 38, 0.12));
}

.pf-summary {
  margin: 12px 2px 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-dim, #5b6470);
}

.pf-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

/* Build stamp: findable when looked for, quiet otherwise. Stays empty until the
   fetch lands, so it must not reserve space or the sheet visibly shifts. */
.pf-version {
  margin: 12px 2px 0;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--text-dim, #5b6470);
  opacity: 0.65;
}
.pf-version:empty {
  display: none;
}

.pf-reset {
  min-height: var(--tap, 48px);
  padding: 0 18px;
  border-radius: var(--radius-pill, 999px);
  font-weight: 700;
  color: var(--text-dim, #5b6470);
  background: var(--surface-2, #f0f2f5);
}
.pf-done {
  flex: 1 1 auto;
  min-height: var(--tap, 48px);
  padding: 0 18px;
  border-radius: var(--radius-pill, 999px);
  font-weight: 800;
  background: var(--brand, #2f6df0);
  color: var(--brand-ink, #ffffff);
}
