/* ============================================================================
   Bad Bets — Open Tickets floating widget
   Sits bottom-left (the bet slip is bottom-right). Pulses red when any
   ticket is live.
   ========================================================================== */

#bb-open-tickets-root {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 998;
  font-family: var(--font-sans);
}

.bb-ot-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,170,0,0.14);
  color: var(--amber);
  border: 1px solid rgba(255,170,0,0.45);
  border-radius: 12px;
  padding: 8px 14px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 12px; letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transition: background 0.15s, transform 0.15s;
}
.bb-ot-btn:hover { background: rgba(255,170,0,0.22); transform: translateY(-1px); }
.bb-ot-btn .bb-ot-icon { font-size: 16px; }
.bb-ot-btn .bb-ot-count {
  background: var(--amber); color: #18120a;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 12px;
  padding: 2px 7px; border-radius: 999px;
  min-width: 22px; text-align: center;
}
.bb-ot-btn .bb-ot-label { letter-spacing: 1px; text-transform: uppercase; }
.bb-ot-btn.is-pulsing { animation: bb-ot-pulse 1.6s ease-in-out infinite; }
@keyframes bb-ot-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 0 rgba(255,80,80,0.45); }
  50%      { box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 8px rgba(255,80,80,0); }
}

/* ----- Popover panel ----- */
.bb-ot-panel {
  position: absolute;
  bottom: 100%; left: 0;
  margin-bottom: 10px;
  background: #11141a;
  border: 1px solid rgba(255,170,0,0.30);
  border-radius: 14px;
  width: min(360px, 92vw);
  max-height: 60vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,170,0,0.08);
  padding: 14px;
}
.bb-ot-panel[hidden] { display: none; }

.bb-ot-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.bb-ot-head-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: 1.6px; color: var(--text);
  text-transform: uppercase;
}
.bb-ot-link {
  font-size: 11px; color: var(--amber);
  text-decoration: none; font-weight: 700;
}
.bb-ot-link:hover { text-decoration: underline; }

/* ----- List + rows ----- */
.bb-ot-list { display: flex; flex-direction: column; gap: 8px; }
.bb-ot-empty {
  text-align: center; padding: 20px 12px;
  color: var(--muted); font-size: 13px;
}

.bb-ot-row {
  display: flex; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, transform 0.12s;
}
.bb-ot-row:hover { border-color: rgba(255,170,0,0.35); transform: translateY(-1px); }
.bb-ot-row.is-live   { border-color: rgba(255,80,80,0.30); }
.bb-ot-row.is-almost { border-color: rgba(255,170,0,0.35); }
.bb-ot-row.is-dead   { opacity: 0.55; }

.bb-ot-row-icon { font-size: 18px; flex-shrink: 0; padding-top: 1px; }

.bb-ot-row-body { flex: 1; min-width: 0; }
.bb-ot-row-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}
.bb-ot-row-type {
  font-family: var(--font-display); font-weight: 800;
  font-size: 11px; letter-spacing: 0.6px;
  color: var(--text); text-transform: uppercase;
}
.bb-ot-row-prob {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 13px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: var(--text);
}
.bb-ot-row-prob.pos { background: rgba(0,200,90,0.16); color: var(--green); }
.bb-ot-row-prob.low { background: rgba(255,80,80,0.12); color: var(--red); }

.bb-ot-row-legs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 4px;
  font-family: var(--font-mono); font-size: 10px;
}
.bb-ot-leg {
  padding: 1px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.05); color: var(--text-2);
  letter-spacing: 0.3px;
}
.bb-ot-leg.s-won  { background: rgba(0,200,90,0.18);  color: var(--green); }
.bb-ot-leg.s-lost { background: rgba(255,80,80,0.18); color: var(--red); }
.bb-ot-leg.s-open { background: rgba(255,170,0,0.18); color: var(--amber); animation: pulse 1.5s infinite; }

.bb-ot-row-payout {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 11px; color: var(--muted);
}
.bb-ot-row-payout b { color: var(--text); }

/* ----- Footer summary ----- */
.bb-ot-foot {
  display: grid; grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 10px; align-items: baseline;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.bb-ot-foot-k {
  font-family: var(--font-display); font-weight: 800;
  font-size: 9px; letter-spacing: 1.4px;
  color: var(--text-2); text-transform: uppercase;
}
.bb-ot-foot-v {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 14px; color: var(--text);
}
.bb-ot-foot-v.pos { color: var(--green); }

/* ----- Mobile adjustments ----- */
@media (max-width: 480px) {
  #bb-open-tickets-root { left: 12px; bottom: 12px; }
  .bb-ot-btn { padding: 6px 10px; }
  .bb-ot-btn .bb-ot-label { display: none; }
  .bb-ot-panel { width: calc(100vw - 24px); max-height: 70vh; }
}
