/* team-picker.css — the "pick up to three programs" list, used by the first-run
   gate and by the Change teams panel on the Account screen.

   Themed through local custom properties so ONE stylesheet serves both hosts:
   the first-run gate is always dark (it sits over the sign-in screen), while the
   Account screen follows the app's light/dark tokens. Each host sets the four
   --tp-* values; the defaults below are the app tokens. */

.tp-host{
  --tp-bg:var(--surface-input,#15171B);
  --tp-line:var(--border-hair,rgba(255,255,255,0.12));
  --tp-text:var(--text-body,#f0eee9);
  --tp-dim:var(--text-muted,#8a8e96);
  --tp-accent:#B68A4E;
  display:block;
}

/* ── selected chips ───────────────────────────────────────────────── */
.tp-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.tp-chip{
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(182,138,78,0.14); border:1px solid rgba(182,138,78,0.45);
  color:var(--tp-text); border-radius:999px; padding:4px 6px 4px 11px;
  font-size:12.5px; line-height:1.2; max-width:100%;
}
.tp-chip-x{
  background:none; border:none; cursor:pointer; color:var(--tp-dim);
  font-size:16px; line-height:1; padding:0 3px; border-radius:50%;
}
.tp-chip-x:hover{ color:var(--tp-accent); }
.tp-chip-x:focus-visible{ outline:2px solid var(--tp-accent); outline-offset:1px; }

/* ── search ───────────────────────────────────────────────────────── */
.tp-searchwrap{ position:relative; display:flex; align-items:center; }
.tp-searchwrap svg{
  position:absolute; left:11px; color:var(--tp-dim); pointer-events:none;
}
.tp-search{
  width:100%; box-sizing:border-box; background:var(--tp-bg);
  border:1px solid var(--tp-line); border-radius:8px;
  padding:10px 12px 10px 32px; color:var(--tp-text); font-size:14px;
  font-family:"Inter",system-ui,sans-serif;
}
.tp-search::placeholder{ color:var(--tp-dim); }
.tp-search:focus{ outline:none; border-color:var(--tp-accent); }

.tp-cap{ font-size:11.5px; color:var(--tp-dim); min-height:15px; margin:6px 2px 4px; }
.tp-cap.is-warn{ color:#e8825f; }

/* ── the list ─────────────────────────────────────────────────────── */
.tp-list{
  max-height:236px; overflow-y:auto; overscroll-behavior:contain;
  border:1px solid var(--tp-line); border-radius:8px; background:var(--tp-bg);
}
.tp-grp{
  position:sticky; top:0; z-index:1;
  background:var(--tp-bg); color:var(--tp-dim);
  font-size:10.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  padding:8px 12px 5px; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--tp-line);
}
.tp-grp-n{ font-weight:600; letter-spacing:0; opacity:.7; }

.tp-row{
  width:100%; display:flex; align-items:center; gap:8px;
  background:none; border:none; cursor:pointer; text-align:left;
  padding:8px 12px; color:var(--tp-text); font-size:13.5px;
  font-family:"Inter",system-ui,sans-serif;
}
.tp-row:hover, .tp-row.is-active{ background:rgba(182,138,78,0.10); }
.tp-row.is-active{ box-shadow:inset 2px 0 0 var(--tp-accent); }
.tp-row.is-on{ color:var(--tp-accent); font-weight:600; }
.tp-row-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tp-row-sub{ color:var(--tp-dim); font-size:11.5px; flex-shrink:0; font-weight:400; }
.tp-row-tick{ width:12px; flex-shrink:0; color:var(--tp-accent); }

.tp-note{ padding:16px 12px; font-size:12.5px; color:var(--tp-dim); text-align:center; }
.tp-retry{
  display:block; margin:9px auto 0; background:none; cursor:pointer;
  border:1px solid var(--tp-line); border-radius:7px; padding:6px 14px;
  color:var(--tp-text); font-size:12.5px; font-family:"Inter",system-ui,sans-serif;
}
.tp-retry:hover{ border-color:var(--tp-accent); color:var(--tp-accent); }

/* ── Change teams panel (Account screen) ──────────────────────────── */
.tp-ov{
  position:fixed; inset:0; z-index:2147483645;
  background:rgba(6,7,9,0.72);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:24px;
  font-family:"Inter",system-ui,-apple-system,sans-serif;
}
.tp-ov-card{
  position:relative; overflow:hidden;
  width:440px; max-width:100%; max-height:calc(100vh - 48px);
  overflow-y:auto; box-sizing:border-box;
  background:linear-gradient(165deg,var(--surface-raised,#15181D) 0%,var(--surface-card,#181B21) 55%);
  border:1px solid var(--border-strong,rgba(182,138,78,0.30));
  border-radius:14px; padding:28px 26px 26px;
  box-shadow:0 24px 64px rgba(0,0,0,0.55);
}
.tp-ov-card::before{
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg,var(--heat-300,#E6C892),var(--heat-500,#B68A4E),var(--heat-600,#95743C));
}
.tp-ov-h{
  font-family:"Saira Condensed",system-ui,sans-serif; font-weight:700;
  font-size:22px; color:var(--text-strong,#f5f3ef); margin-bottom:6px; letter-spacing:.005em;
}
.tp-ov-sub{ font-size:12.5px; color:var(--text-muted,#9a9ea6); line-height:1.5; margin-bottom:16px; }
.tp-ov-err{ color:#e8825f; font-size:12.5px; margin:10px 0 0; }
.tp-ov-ok{ color:var(--grn-500,#5fbf7f); font-size:12.5px; margin:10px 0 0; }
.tp-ov-actions{ display:flex; gap:9px; margin-top:16px; }
.tp-ov-btn{
  flex:1; background:#B68A4E; border:none; border-radius:8px; padding:11px;
  color:#1a1407; font-family:"Saira Condensed",system-ui,sans-serif;
  font-weight:700; font-size:15px; letter-spacing:.05em; cursor:pointer;
}
.tp-ov-btn:hover{ filter:brightness(1.06); }
.tp-ov-btn:disabled{ opacity:.6; cursor:default; }
.tp-ov-cancel{
  flex:0 0 auto; background:none; border:1px solid var(--border-strong,rgba(255,255,255,0.18));
  border-radius:8px; padding:11px 18px; cursor:pointer;
  color:var(--text-muted,#9a9ea6); font-size:13.5px;
  font-family:"Inter",system-ui,sans-serif;
}
.tp-ov-cancel:hover{ color:var(--text-strong,#e8e6e1); }

@media(max-width:520px){
  .tp-list{ max-height:200px; }
}
