/* common/parlay-pill.css — v7
 * Floating Parlay Pill styling
 * v7:
 *   • Expandable leg list — click pill body to expand upward
 *   • No‑jiggle pulse (translate & scale combined via CSS var)
 *   • Removed empty state (pill hidden when 0 legs)
 *   • Mobile bottom‑center layout with Odds + "To Win …"
 */

.parlay-pill {
  position: fixed;
  left: 50%;
  bottom: calc(var(--pb-bottom-nav-height, 64px) + 12px);
  z-index: 10050;
  display: none;

  /* "glass" */
  background-image: linear-gradient(180deg, rgba(var(--theme-accent-rgb, 0, 211, 189),.4), rgba(var(--theme-accent-rgb, 0, 211, 189),.25));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);

  color: #fff;
  font: 500 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  /* Layout (desktop) */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  user-select: none;

  /* Center horizontally via translate */
  --pp-translate-x: -50%;
  transform: translateX(var(--pp-translate-x));
}

/* Pill bar: holds button + stats in a row (never changes layout) */
.parlay-pill .pp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.parlay-pill .pp-bar .pp-goto { order: 1; }
.parlay-pill .pp-bar .pp-right { order: 2; }

.parlay-pill .pp-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  text-align: right;
}

.parlay-pill .pp-sum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.parlay-pill .pp-count-num { font-weight: 700; }
.parlay-pill .pp-dot { opacity: 0.6; }
.parlay-pill .pp-odds { opacity: 0.9; }
.parlay-pill .pp-odds .pp-odds-val { font-weight: 600; }

.parlay-pill .pp-returns {
  display: none;     /* shown on mobile */
  margin-top: 2px;
  font-weight: 600;
  opacity: 0.95;
}


/* Button */
.parlay-pill .pp-goto {
  appearance: none;
  -webkit-appearance: none;

  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: var(--theme-accent, #00D3BD);

  color: var(--theme-text-on-accent, #0a1628);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
}
.parlay-pill .pp-goto:hover {
  background: var(--theme-accent-bright, #00F5D4);
  border-color: rgba(255,255,255,0.24);
}
.parlay-pill .pp-goto:active { transform: translateY(1px); }


/* No‑jiggle pulse: combine translate & scale via CSS var */
@keyframes parlay-pill-pulse {
  0%   { transform: translateX(var(--pp-translate-x)) scale(1); }
  40%  { transform: translateX(var(--pp-translate-x)) scale(1.04); }
  100% { transform: translateX(var(--pp-translate-x)) scale(1); }
}
.parlay-pill.parlay-pill--pulse {
  animation: parlay-pill-pulse 320ms ease-out;
}

/* Pill body cursor — hint that it's clickable */
.parlay-pill { cursor: pointer; }
.parlay-pill .pp-goto { cursor: pointer; }

/* ─────────────────────────────────────────
   Expanded state — leg list
   ───────────────────────────────────────── */

/* Collapsed: legs container fully removed from flow */
.parlay-pill .pp-legs {
  display: none;
  width: 100%;
}

/* Expanded pill: column layout, rounded corners */
.parlay-pill.parlay-pill--expanded {
  flex-direction: column;
  border-radius: 20px;
  width: min(420px, calc(100vw - 32px));
}

/* Legs list opens up */
.parlay-pill.parlay-pill--expanded .pp-legs {
  max-height: 300px;
  overflow: hidden auto;          /* clip horizontal swipe, scroll vertical */
  transition: max-height 250ms ease;
  display: flex;
  flex-direction: column;
  border-bottom: 0px solid rgba(255,255,255,0.15);
  margin-bottom: 4px;
  padding-bottom: 4px;
}

/* Individual leg row */
.parlay-pill .pp-leg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  transition: background 120ms ease;
}
.parlay-pill .pp-leg:hover {
  background: rgba(255,255,255,0.06);
}
.parlay-pill .pp-leg:last-child {
  border-bottom: none;
}

/* Player avatar + team badge */
.parlay-pill .pp-leg-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-right: 4px;
}
.parlay-pill .pp-leg-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.parlay-pill .pp-leg-team-badge {
  position: absolute;
  bottom: -3px;
  right: -5px;
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
  padding: 1px;
}

.parlay-pill .pp-leg-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.95;
}

.parlay-pill .pp-leg-odds {
  width: 52px;
  text-align: right;
  font-weight: 600;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Over / under side colors (matches player dashboard market buttons) */
.parlay-pill .pp-side-over  { color: var(--pb-accent-bright, #00F5D4); font-weight: 600; }
.parlay-pill .pp-side-under { color: var(--pb-red, #ff6577); font-weight: 600; }

.parlay-pill .pp-leg-rm {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.9);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 120ms ease;
}
.parlay-pill .pp-leg-rm:hover {
  color: #ef4444;
}

/* Scrollbar styling for leg list */
.parlay-pill .pp-legs::-webkit-scrollbar { width: 4px; }
.parlay-pill .pp-legs::-webkit-scrollbar-track { background: transparent; }
.parlay-pill .pp-legs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

/* ─────────────────────────────────────────
   Mobile / narrow layout (≤1000px)
   Centered bottom; left = button, right = odds + "To Win …"
   ───────────────────────────────────────── */
@media (max-width: 1000px) {
  .parlay-pill {
    left: 50%;
    right: auto;
    bottom: calc(var(--pb-bottom-nav-height, 124px) + 16px);
    --pp-translate-x: -50%;
    width: min(580px, calc(100vw - 24px));
    border-radius: 999px;
    padding: 20px 32px;
  }

  .parlay-pill .pp-bar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
  }

  .parlay-pill .pp-bar .pp-goto { order: 1; }
  .parlay-pill .pp-bar .pp-right { order: 2; align-items: flex-end; font-size: 26px; font-weight: 600; }
  .parlay-pill .pp-bar .pp-right { justify-self: end; }

  .parlay-pill .pp-returns { display: block; }

  .parlay-pill .pp-goto {
    padding: 12px 18px;
    font-size: 24px;
    font-weight: 600;
  }

  /* Expanded on mobile */
  .parlay-pill.parlay-pill--expanded {
    border-radius: 20px;
    width: min(720px, calc(100vw - 24px));
    padding: 16px 20px;
  }

  .parlay-pill.parlay-pill--expanded .pp-legs {
    max-height: 360px;
  }

  .parlay-pill.parlay-pill--expanded .pp-leg {
    font-size: 28px;
    padding: 20px 4px;
    gap: 8px;
  }
  .parlay-pill.parlay-pill--expanded .pp-leg-avatar-wrap {
    width: 48px;
    height: 48px;
    margin-right: 6px;

  }
  .parlay-pill.parlay-pill--expanded .pp-leg-team-badge {
    width: 24px;
    height: 24px;
    bottom: -4px;
    right: -6px;
  }
  .parlay-pill.parlay-pill--expanded .pp-leg-odds {
    width: 80px;
    font-size: 28px;
  }
  .parlay-pill.parlay-pill--expanded .pp-leg-rm {
    color: rgba(216, 38, 38, 0.9);
    font-weight: bold;
    font-size: 36px;
    padding: 4px 6px;
    margin-top: -5px;
    margin-left: 2px;
  }
}



