/* ==========================================================================
   favorites-phone.css: the phone Favorites mode of Search (/<sport>/favorites)
   and the Favorites heart toggle on the Search bar. docs/favorites/LEDGER.md
   P3a (F93-); design spec section 1, the founder's mocks (favorites-1108/
   mock/kit/fav.css, S1, S2).

   Linked right after core/search.css, only while FAVORITES_ENABLED (index.html
   NFL / NBA / MLB blocks). Like search.css it has NO media query: every rule
   is under the Search view's own classes (.pb-search, the pbfav- names it
   renders), which exist only while searchCore is mounted on the phone layer,
   so these flat 980-canvas px (glass pt = px / 2.513) never paint wide.
   The tokens are search.css's (--pbs-*) and favHearts.js's heart color (--pb-fav,
   --pb-fav-rgb). Never the Questionable amber for a favorite.
   ========================================================================== */

/* ── 1. the bar: field + heart toggle (field 692, toggle 200, gap 18) ── */
.pb-search-frow { display: flex; align-items: center; gap: 18px; }
.pb-search-frow .pb-search-field { flex: 1 1 auto; min-width: 0; }
/* the narrowed field has no clear button until something is typed, so the
   placeholder may use the gutter the X keeps ("Search favorites and NFL"
   is 505 of the 578 px left at 42px) */
.pb-search-frow .pb-search-field input:placeholder-shown { padding-right: 20px; }

.pbfav-tog {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 200px;
  height: 110px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--pbs-accent);
  -webkit-tap-highlight-color: transparent;
}
.pb-search :where(button).pbfav-tog { justify-content: center; text-align: center; }
.pbfav-tog .pbfav-h { width: 40px; height: 40px; }
.pbfav-tog-n { font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pbs-fg); }
.pbfav-tog-n:empty { display: none; }
.pbfav-tog.is-on { border: 2px solid var(--pb-fav, #F04E8A); background: rgba(var(--pb-fav-rgb, 240, 78, 138), .12); color: var(--pb-fav, #F04E8A); }
.pbfav-tog.is-on .pbfav-h { fill: var(--pb-fav, #F04E8A); stroke: var(--pb-fav, #F04E8A); }
.pbfav-tog.is-on .pbfav-tog-n { color: var(--pb-fav, #F04E8A); }

/* the sport pills: always 4 on the list (All / NFL / NBA / MLB), 3 in the
   picker (NFL / NBA / MLB); a sport with no favorites stays, dimmed */
.pb-search-posrow.pbfav-sports { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pb-search-posrow.pbfav-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-search-posrow.pbfav-sports button,
.pb-search-posrow.pbfav-pick button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 29px; font-weight: 600; }
.pbfav-sports button b { font-weight: 600; color: var(--pbs-fg-mute); font-variant-numeric: tabular-nums; }
.pbfav-sports button.is-on b { color: inherit; opacity: .75; }
.pbfav-sports button.is-zero { opacity: .45; }

/* ── 2. the body: sections, blocks ──────────────────────────────────── */
.pbfav { display: flow-root; }   /* the banner's margin stays inside: no body shift when it lands */
.pbfav .pb-search-eyebrow.is-live { color: var(--pbs-live); }
.pbfav-blocks { display: flex; flex-direction: column; gap: 24px; padding: 6px var(--pbs-gut) 18px; }
.pbfav-block { border-radius: 28px; background: var(--pbs-ink-050); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; }
.pbfav-block > :last-child { border-bottom: 0; }
.pbfav :where(button).pbfav-row,
.pbfav :where(button).pbfav-team,
.pbfav :where(button).pbfav-gh,
.pbfav :where(button).pbfav-cu { width: 100%; text-align: left; }

/* sport tag chip */
.pbfav-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 11px;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  color: var(--pbs-fg-dim);
}

/* the live dot */
.pbfav-dot { flex: none; display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--pbs-live); animation: pbfav-pulse 1.6s ease-out infinite; }
@keyframes pbfav-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 71, .5); } 70% { box-shadow: 0 0 0 10px rgba(255, 59, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 71, 0); } }

/* slim game header (no favorite team): a link to the game page */
.pbfav-gh { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 0 30px; border-bottom: 1px solid var(--pbs-sep); }
.pbfav-gh .pbfav-tag { margin-right: 6px; }
.pbfav-gh img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.pbfav-gh-code { font-size: 30px; font-weight: 600; color: var(--pbs-fg); }
.pbfav-gh-at { font-size: 28px; color: var(--pbs-fg-mute); }
.pbfav-gh-sc { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pbs-fg); }
.pbfav-gh-sc.is-trail { color: var(--pbs-fg-dim); }
.pbfav-gh-st { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 600; color: var(--pbs-fg-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pbfav-gh-st.is-live { color: var(--pbs-live); }

/* the team news line ("SEA QB Darnold is out") */
.pbfav-news { display: flex; align-items: center; gap: 12px; padding: 16px 30px; border-bottom: 1px solid var(--pbs-sep); background: rgba(245, 181, 68, .05); color: var(--pbs-amber); font-size: 26px; }

/* ── 3. player rows (spec 1d) ───────────────────────────────────────── */
.pbfav-row { display: flex; align-items: center; gap: 22px; min-height: 176px; padding: 18px 30px; border-bottom: 1px solid var(--pbs-sep); user-select: none; }
.pbfav-row:active, .pbfav-team:active, .pbfav-gh:active { background: rgba(255, 255, 255, .04); }
.pbfav-row.is-short { min-height: 150px; }
.pbfav-row.is-out > * { opacity: .6; }
.pbfav-ava { position: relative; flex: none; width: 110px; height: 110px; }
.pbfav-ava .pb-search-ava { width: 110px; height: 110px; }
.pbfav-ava.is-live::after { content: ""; position: absolute; right: 2px; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--pbs-live); box-shadow: 0 0 0 4px var(--pbs-ink-050); }
.pbfav-row-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pbfav-row-n { display: flex; align-items: center; min-width: 0; font-size: 40px; font-weight: 600; color: var(--pbs-fg); }
.pbfav-row-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbfav-row-nm em { font-style: normal; color: var(--pbs-accent); }
.pbfav-row-s { margin-top: 8px; font-size: 30px; color: var(--pbs-fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbfav-row-s .is-live { color: var(--pbs-live); font-weight: 600; }
.pbfav-row-m { margin-top: 10px; font-size: 26px; color: var(--pbs-fg-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pbfav-row-r { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 220px; padding-left: 12px; text-align: right; }
.pbfav-line { font-family: var(--pbs-mono); font-size: 36px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--pbs-fg); white-space: nowrap; }
.pbfav-line.is-soft { font-family: var(--pbs-sans); font-size: 30px; }
.pbfav-line.is-out { font-family: var(--pbs-sans); font-size: 30px; font-weight: 600; color: var(--pbs-red); }
/* a fixed dummy number ("o00.0", never the real value; none is sent), in
   full digit ink, blurred: the line is for members (one banner says so) */
.pbfav-line.is-lock { filter: blur(6px); user-select: none; }
/* live (P3b, favLive.js): the headline close's progress, 6px under the right
   column; the verdicts in the meta line (green over, red under) */
.pbfav-bar { position: relative; display: block; width: 100%; min-width: 180px; height: 6px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.pbfav-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--pbs-accent); }
.pbfav-bar.is-hit i { background: var(--pbs-green); }
.pbfav-row-m .is-w { color: var(--pbs-green); font-weight: 600; }
.pbfav-row-m .is-l { color: var(--pbs-red); font-weight: 600; }
.pbfav-mkt { font-size: 26px; color: var(--pbs-fg-dim); white-space: nowrap; }
.pbfav-noline { font-size: 26px; color: var(--pbs-fg-faint); white-space: nowrap; }

/* ── 4. the team card as a block header (spec 1e) ───────────────────── */
.pbfav-team { position: relative; display: flex; align-items: center; gap: 26px; min-height: 200px; padding: 30px 30px 28px; border-bottom: 1px solid var(--pbs-sep); }
.pbfav-team.is-second { min-height: 150px; padding: 20px 30px; }
.pbfav-team-crest { flex: none; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: var(--pbs-ink-150); }
.pbfav-team-crest img { width: 88px; height: 88px; object-fit: contain; }
/* the second team: the same crest circle and name size as the first, so both rows' text starts at one edge (founder 2026-11-14) */
.pbfav-team-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pbfav-team-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pbfav-team-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 40px; font-weight: 700; color: var(--pbs-fg); }
.pbfav-team-l { display: flex; align-items: center; gap: 12px; min-width: 0; margin-top: 10px; font-size: 30px; color: var(--pbs-fg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pbfav-team-l > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pbfav-team-l.is-live { color: var(--pbs-live); font-weight: 600; }
.pbfav-team-l .is-w { color: var(--pbs-green); font-weight: 700; }
.pbfav-team-l .is-l { color: var(--pbs-red); font-weight: 700; }
.pbfav-team-m { margin-top: 8px; font-size: 26px; color: var(--pbs-fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbfav-team-m .is-out { color: var(--pbs-red); font-weight: 600; }
.pbfav-team-m .is-q { color: var(--pbs-amber); font-weight: 600; }
.pbfav-go { flex: none; display: inline-flex; color: rgba(255, 255, 255, .35); }
.pbfav-go svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── 5. the members banner, the add button, the guest note ──────────── */
.pbfav-banner { display: flex; align-items: center; gap: 18px; min-height: 96px; margin: 26px var(--pbs-gut) 0; padding: 0 30px; border-radius: 24px; background: rgba(var(--theme-accent-rgb, 0, 211, 189), .06); border: 1px solid rgba(var(--theme-accent-rgb, 0, 211, 189), .22); font-size: 28px; color: var(--pbs-fg); }
.pbfav-banner-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbfav :where(button).pbfav-banner-a { flex: none; position: relative; color: var(--pbs-accent); font-weight: 600; white-space: nowrap; }
.pbfav-banner-a::before { content: ""; position: absolute; inset: -30px -30px -30px -20px; }
.pbfav-guest { padding: 24px var(--pbs-gut) 0; font-size: 26px; color: var(--pbs-fg-mute); }
.pbfav :where(button).pbfav-guest-a { position: relative; color: var(--pbs-accent); font-weight: 600; }
/* the hit area: 35 -> 79 canvas px tall, inside the note's 24px top pad and
   short of the add button's 26px margin */
.pbfav-guest-a::before { content: ""; position: absolute; inset: -22px -20px; }
.pbfav :where(button).pbfav-add { display: flex; align-items: center; justify-content: center; gap: 14px; width: calc(100% - 2 * var(--pbs-gut)); min-height: 110px; margin: 26px var(--pbs-gut) 0; border: 1px solid var(--pbs-line-hi); border-radius: 22px; font-size: 30px; font-weight: 600; color: var(--pbs-accent); text-align: center; }
.pbfav-note { padding: 18px var(--pbs-gut) 0; font-size: 26px; color: var(--pbs-fg-mute); }

/* ── 6. COMING UP: the collapsed row, the open list (spec 1c) ────────── */
.pbfav-cu { display: flex; align-items: center; gap: 26px; min-height: 130px; padding: 0 30px; }
.pbfav-cu.is-open { min-height: 90px; border-bottom: 1px solid var(--pbs-sep); }
.pbfav-faces { flex: none; display: flex; }
.pbfav-faces > span { display: grid; place-items: center; width: 64px; height: 64px; margin-left: -18px; border-radius: 50%; overflow: hidden; background: var(--pbs-ink-150); box-shadow: 0 0 0 4px var(--pbs-ink-050); }
.pbfav-faces > span:first-child { margin-left: 0; }
.pbfav-faces img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pbfav-faces img.is-crest { object-fit: contain; padding: 18%; }
.pbfav-faces i { font-style: normal; font-size: 20px; font-weight: 700; color: var(--pbs-fg-mute); }
.pbfav-cu-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pbfav-cu-n { font-size: 36px; font-weight: 600; color: var(--pbs-fg); }
.pbfav-cu.is-open .pbfav-cu-n { font-size: 30px; color: var(--pbs-fg-dim); }
.pbfav-cu-s { margin-top: 6px; font-size: 28px; color: var(--pbs-fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbfav-cu .pbfav-go svg { transition: transform .18s ease; }
.pbfav-cu.is-open .pbfav-go svg { transform: rotate(-90deg); }
.pbfav-row.is-compact { min-height: 120px; padding: 14px 30px; }
.pbfav-row.is-compact .pbfav-ava,
.pbfav-row.is-compact .pbfav-ava .pb-search-ava { width: 80px; height: 80px; }
.pbfav-row.is-compact .pbfav-ava .pb-search-ava i { font-size: 24px; }
.pbfav-row.is-compact .pbfav-row-n { font-size: 36px; }
.pbfav-row.is-compact .pbfav-row-s { margin-top: 6px; font-size: 28px; }
.pbfav-row.is-compact .pbfav-line { font-size: 30px; }
.pbfav-row.is-compact .pbfav-line.is-soft { font-size: 28px; }
.pbfav-row.is-compact .pbfav-mkt { font-size: 24px; }
.pbfav-row.is-compact .pbfav-row-r { min-width: 0; }
.pbfav-crestava { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--pbs-ink-150); }
/* a crest, centered: search.css's .pb-search-ava img (a headshot: absolute, inset 0, cover, top) is undone here */
.pbfav-crestava img { position: static; inset: auto; width: 70%; height: 70%; object-fit: contain; object-position: center; background: none; }

/* ── 7. the offseason strip (MLB) ──────────────────────────────────── */
.pbfav-off { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 28px; min-height: 150px; padding: 26px 30px; }
.pbfav-off-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; min-width: 0; }
.pbfav-off-chip { flex: none; display: flex; align-items: center; gap: 16px; color: var(--pbs-fg); }
.pbfav-off-chip > span { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; overflow: hidden; background: var(--pbs-ink-150); }
.pbfav-off-chip img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pbfav-off-chip img.is-crest { object-fit: contain; padding: 14%; }
.pbfav-off-chip i { font-style: normal; font-size: 24px; font-weight: 700; color: var(--pbs-fg-mute); }
.pbfav-off-chip b { font-size: 28px; font-weight: 600; }
.pbfav-off-r { margin-left: auto; font-size: 28px; color: var(--pbs-fg-dim); white-space: nowrap; }

/* ── 8. the picker (spec 1f) ───────────────────────────────────────── */
.pbfav-pick-hd { padding: 40px var(--pbs-gut) 10px; }
.pbfav-pick-h { font-size: 40px; font-weight: 700; line-height: 1.2; color: var(--pbs-fg); }
.pbfav-pick-p { margin-top: 14px; font-size: 30px; line-height: 1.35; color: var(--pbs-fg-dim); }
.pbfav-chips { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: 20px; padding: 6px var(--pbs-gut) 18px; }
/* A row scrolls sideways past its first four, up to CHIPS (12) (founder
   2026-11-16: "we could still show 4, but make it horizontally scrollable"):
   four whole chips and a third of the fifth's face, so it reads as more. */
.pbfav-chips { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--pbs-gut); scrollbar-width: none; }
.pbfav-chips::-webkit-scrollbar { display: none; }
.pbfav :where(button).pbfav-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 196px; padding: 6px 0; text-align: center; scroll-snap-align: start; }
.pbfav-chip .pb-search-ava { width: 120px; height: 120px; }
.pbfav-chip.is-on .pb-search-ava { box-shadow: 0 0 0 4px var(--pb-fav, #F04E8A); }
.pbfav-chip-n { display: flex; flex-direction: column; line-height: 1.2; max-width: 100%; }
.pbfav-chip-f { font-size: 26px; color: var(--pbs-fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbfav-chip-l { font-size: 28px; font-weight: 600; color: var(--pbs-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbfav-corner { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #000; }
.pbfav-chip .pbfav-corner { top: 0; right: 27px; }
.pbfav-corner .pbfav-h { width: 30px; height: 30px; }
.pbfav-chip.is-on .pbfav-corner .pbfav-h,
.pbfav-tile.is-on .pbfav-corner .pbfav-h { fill: var(--pb-fav, #F04E8A); stroke: var(--pb-fav, #F04E8A); }
.pbfav .pb-search-teams .pbfav-tile { position: relative; justify-content: center; }
.pbfav-tile .pbfav-corner { top: 12px; right: 12px; }
.pbfav-tile.is-on { border-color: rgba(var(--pb-fav-rgb, 240, 78, 138), .6) !important; }
.pbfav-tile .pb-search-tile-n { color: var(--pbs-fg); }
.pbfav-pick-note { padding: 0 var(--pbs-gut) 18px; font-size: 28px; color: var(--pbs-fg-dim); }
/* Done: pinned 24px above the nav at every scroll position, on a black band
   with an upward fade; the list pads its end so the last tiles clear it */
.pbfav-picker { padding-bottom: 240px; }
.pbfav-done-band { position: sticky; bottom: calc(var(--pb-bottom-nav-height, 124px) + 24px); z-index: 7; margin-top: 24px; padding: 0 var(--pbs-gut); pointer-events: none; }
.pbfav-done-band::before { content: ""; position: absolute; left: 0; right: 0; top: -88px; bottom: -24px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000 88px); pointer-events: none; }
/* the picker's Done is its one action: the parlay pill steps aside while it
   is up (founder 2026-11-14) and is back once Done closes the picker */
html.pbfav-picking #parlay-pill { display: none !important; }
/* a toast while the picker is up sits above Done, never over it */
html.pbfav-picking .pbfav-toastwrap { bottom: calc(var(--pb-bottom-nav-height, 124px) + 158px); }
.pbfav :where(button).pbfav-done { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 110px; border-radius: 22px; background: var(--pbs-accent); color: #001A17; font-size: 32px; font-weight: 700; text-align: center; pointer-events: auto; }

/* ── 9. the ghost (the index.html pre-paint paints the same) ─────────── */
.pbfav-skel-block { border-radius: 28px; background: var(--pbs-ink-050); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; }
.pbfav-skel-gh { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 0 30px; border-bottom: 1px solid var(--pbs-sep); }
.pbfav-skel-gh .pb-search-skel { height: 34px; }
.pbfav-skel-block .pb-search-skel-row { min-height: 176px; padding: 18px 30px; border-bottom: 0; }

/* ── 10. the YOUR FAVORITES group (typed) ─────────────────────────────── */
.pbfav-typed .pbfav-row { min-height: 120px; padding: 14px var(--pbs-gut); }
.pbfav-typed .pbfav-ava,
.pbfav-typed .pbfav-ava .pb-search-ava { width: 88px; height: 88px; }
.pbfav-typed .pbfav-row-n { font-size: 38px; }
.pbfav-typed .pbfav-row-n .pbfav-tag { margin-left: 14px; }

@media (prefers-reduced-motion: reduce) { .pbfav-dot { animation: none; } .pbfav-cu .pbfav-go svg { transition: none; } }
