/* ============================================================
   VegasBet — Betslip CSS  (v4 — pill + arrow + separate chat)
   ============================================================ */

/* ── Floating Pill ──────────────────────────────────────── */
.floating-pill {
  position: fixed; bottom: 32px; right: 80px;
  display: flex; align-items: stretch;
  width: 340px;
  height: 60px; padding: 0;
  background: linear-gradient(135deg, #4a1d96, #2c1063);
  border: 1px solid rgba(168, 58, 237, 0.4);
  border-radius: 18px; overflow: hidden;
  z-index: 1200;
  box-shadow: 0 16px 46px rgba(124, 58, 237, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  user-select: none;
}

.fp-tab {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  flex: 1; cursor: pointer;
  transition: background 0.2s ease;
}
.fp-tab:hover  { background: rgba(255, 255, 255, 0.05); }
.fp-tab.active { background: rgba(255, 255, 255, 0.09); }

.fp-tab-label {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: 14.5px; color: #fff; white-space: nowrap; letter-spacing: 0.3px;
}

.fp-badge {
  background: rgba(255, 255, 255, 0.16); color: #fff;
  border-radius: 20px; height: 22px; min-width: 22px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 12px;
  flex-shrink: 0;
}
.fp-badge.has-bets { background: #fff; color: #4a1d96; }
.fp-badge-loading { opacity: 0; }

.fp-live-dot {
  width: 8px; height: 8px; background: #34d399;
  border-radius: 50%; animation: wg-emerald 1.8s infinite; flex-shrink: 0;
}
@keyframes wg-emerald {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
}

.fp-divider {
  width: 1px; background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0; margin: 14px 0;
}

.fp-arrow-btn {
  display: flex; align-items: center; justify-content: center;
  width: 48px; cursor: pointer;
  font-size: 13px; color: #e9dcff;
  background: none; border: none;
  flex-shrink: 0; transition: background 0.2s ease;
}
.fp-arrow-btn:hover { background: rgba(255, 255, 255, 0.05); }

/* ── Separate Chat Circle Button ────────────────────────── */
.fp-chat-circle {
  position: fixed; bottom: 32px; right: 14px; /* rightmost */
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: 1px solid rgba(168, 85, 247, 0.45);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  z-index: 1200; transition: transform 0.2s ease;
}
.fp-chat-circle:hover { transform: translateY(-3px); }

/* ── Popups (shared base) ───────────────────────────────── */
.fp-popup {
  position: fixed;
  background: linear-gradient(180deg, #1a1a20, #131317);
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 22px;
  display: flex; flex-direction: column;
  z-index: 1150;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(10px); opacity: 0; pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.fp-popup.open {
  transform: translateY(0); opacity: 1; pointer-events: all;
}

/* Main popups (betslip / inplay) — aligned above pill */
.fp-popup-main {
  bottom: 104px; right: 80px; /* above pill */
  width: 340px; max-height: calc(100vh - 420px); overflow: hidden;
}

/* Chat popup — aligned above chat circle */
.fp-popup-chat {
  bottom: 104px; right: 14px; /* above chat circle */
  width: 340px; height: 520px; max-height: calc(100vh - 130px);
}

/* Chat SVG icon inside circle button */
.chat-svg-icon {
  width: 24px; height: 24px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.fp-popup-close {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.06); border: none; color: #c9c3d8;
  font-size: 1.15rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.fp-popup-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ── Popup header ───────────────────────────────────────── */
.bp-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px;
  flex-shrink: 0;
}
.bp-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 0.94rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: #fff;
}

/* SINGLE / MULTI segmented toggle */
.bp-tabs {
  display: flex; gap: 0; margin-left: auto; padding: 3px;
  border-radius: 11px;
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.2);
}
.bp-tab {
  padding: 6px 13px; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em;
  color: #8f88a3; cursor: pointer; background: none;
  border: none; transition: all 0.2s ease;
}
.bp-tab:hover  { color: #c9c3d8; }
.bp-tab.active {
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.5);
}
.bp-clear {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  display: flex; align-items: center; justify-content: center;
  color: #8f88a3; cursor: pointer; padding: 0;
  transition: all 0.2s ease;
}
.bp-clear:hover { color: var(--red); border-color: rgba(239, 68, 68, 0.4); }
.bp-clear-icon { width: 15px; height: 15px; vertical-align: middle; filter: invert(60%); transition: filter var(--transition); }
.bp-clear:hover .bp-clear-icon { filter: invert(45%) sepia(90%) saturate(3000%) hue-rotate(330deg) brightness(0.95); }

/* Popup content */
.bp-content { flex: 1; overflow-y: auto; min-height: 60px; max-height: 300px; padding: 0 14px; }

/* Empty state */
.bp-empty { padding: 40px 30px 48px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.bp-empty-icon {
  width: 74px; height: 74px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: radial-gradient(circle at 50% 35%, rgba(124, 58, 237, 0.28), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.28);
  margin-bottom: 20px; animation: wg-float 4s ease-in-out infinite;
}
@keyframes wg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.bp-empty-text { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.95rem; color: #fff; margin-bottom: 8px; }
.bp-empty-hint { font-size: 0.8rem; color: #8f88a3; line-height: 1.5; max-width: 230px; }

/* Bet items — selection cards */
#bpItems { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 2px; }
.bet-item {
  padding: 14px; border-radius: 14px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.16);
  animation: fade-in 0.2s ease forwards;
}
.bet-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bet-item-match { font-weight: 700; font-size: 0.87rem; color: #fff; line-height: 1.3; flex: 1; }
.bet-item-remove { background: none; border: none; color: #7a7488; cursor: pointer; font-size: 0.9rem; padding: 0 2px; transition: color var(--transition); flex-shrink: 0; line-height: 1; }
.bet-item-remove:hover { color: var(--red); }
.bet-item-selection { font-weight: 500; font-size: 0.8rem; color: #8f88a3; }
.bet-item-odds { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.95rem; color: #c084fc; }

/* Single mode — per-bet stake row */
.bet-item-single-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 10px;
}
.bet-item-stake-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.bet-item-win { font-size: 0.7rem; font-weight: 700; color: #34d399; }
.bet-item-stake-wrap { position: relative; }
.bet-item-stake-currency {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  font-size: 0.75rem; font-weight: 700; color: #7a7488; pointer-events: none;
}
.bet-item-stake {
  width: 118px; background: #0e0e12; border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 10px; padding: 7px 8px 7px 20px;
  color: #fff; font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 0.82rem; transition: border-color var(--transition);
}
.bet-item-stake:focus { border-color: #a855f7; outline: none; }
.bet-item-stake::placeholder { color: #615c70; font-weight: 400; }

/* Stake section */
.bp-stake {
  padding: 16px 16px 6px; margin-top: 8px;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
  flex-shrink: 0;
}
.stake-label { font-size: 0.72rem; font-weight: 700; color: #8f88a3; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 9px; }
.stake-input-wrap {
  position: relative; display: flex; align-items: center;
  height: 48px; border-radius: 13px;
  background: #0e0e12; border: 1px solid rgba(124, 58, 237, 0.28);
  margin-bottom: 12px;
}
.stake-currency { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1rem; font-weight: 700; color: #7a7488; pointer-events: none; }
.stake-input {
  width: 100%; height: 100%; background: none; border: none;
  padding: 0 14px 0 30px;
  color: #fff; font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 1.05rem;
}
.stake-input:focus { outline: none; }
.stake-input:focus ~ .stake-currency,
.stake-input-wrap:focus-within { border-color: #a855f7; }
.stake-input::placeholder { color: #615c70; font-weight: 500; }

.quick-stakes { display: flex; gap: 8px; margin-bottom: 16px; }
.qs-btn {
  flex: 1; padding: 9px 2px; text-align: center;
  background: rgba(124, 58, 237, 0.10); border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px; color: #c9c3d8;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.78rem;
  cursor: pointer; transition: all 0.2s ease;
}
.qs-btn:hover { background: rgba(124, 58, 237, 0.2); }

.potential-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.potential-label { font-size: 0.82rem; color: #8f88a3; }
.potential-amount { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: #34d399; }
/* the first potential-row (Total Odds) shows a neutral white value */
.potential-row:first-of-type .potential-amount { font-size: 0.95rem; color: #fff; }

/* Place bet */
.bp-footer { padding: 4px 16px 16px; flex-shrink: 0; }
.place-bet-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none; border-radius: 13px;
  color: #fff; font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5); position: relative; overflow: hidden;
}
.place-bet-btn::before { content: ''; position: absolute; top: -50%; left: -60%; width: 60%; height: 200%; background: rgba(255,255,255,.12); transform: skewX(-20deg); transition: left 0.4s ease; }
.place-bet-btn:hover::before { left: 120%; }
.place-bet-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(124, 58, 237, 0.6); }
.place-bet-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.bp-terms { font-size: 0.68rem; color: #615c70; text-align: center; margin-top: 12px; }

/* ── Chat popup internals ───────────────────────────────── */
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-msg-system {
  align-self: flex-start; max-width: 88%;
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px 14px 14px 4px;
  padding: 11px 14px; font-size: 0.85rem;
  color: #e9e6f0; line-height: 1.5;
}
.chat-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border-radius: 14px 14px 4px 14px;
  padding: 11px 14px; font-size: 0.85rem; color: #fff; line-height: 1.5;
  max-width: 80%;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}
.chat-input-row {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
  flex-shrink: 0;
}
.chat-input {
  flex: 1; height: 46px;
  background: #0e0e12;
  border: 1px solid rgba(124, 58, 237, 0.24); border-radius: 13px;
  padding: 0 15px; font-size: 0.85rem; font-family: 'Inter', sans-serif;
  color: #fff; transition: border-color var(--transition);
}
.chat-input:focus { border-color: #a855f7; outline: none; }
.chat-input::placeholder { color: #615c70; }
.chat-send-btn {
  width: 46px; height: 46px; flex-shrink: 0;
  background: linear-gradient(135deg, #a855f7, #7c3aed); border: none; border-radius: 13px;
  color: #fff; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.45);
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.82rem;
}
.chat-send-btn:hover { transform: translateY(-2px); }

/* ── Mobile: floating pill + chat circle ────────────────────── */
@media (max-width: 768px) {
  .floating-pill {
    position: fixed;
    bottom: 8px;
    left: 12px;
    right: 70px;   /* 60px circle + 10px gap */
    width: auto;
    height: 56px;
    transform: none;
    margin: 0;
    border-radius: 16px;
    box-sizing: border-box;
    font-size: 13px;
  }
  .fp-tab-label {
    font-size: 13px;
  }
  .fp-chat-circle {
    bottom: 8px;
    right: 8px;
    width: 56px; height: 56px;
  }
  .fp-popup-main {
    left: 12px;
    right: 70px;
    width: auto;
    bottom: 74px; /* above the pill bar — aligns with pill edges */
    margin: 0;
    border-radius: 18px 18px 0 0;
    box-sizing: border-box;
  }
  .fp-popup-chat {
    left: 12px;
    right: 12px;
    width: auto;
    height: auto;
    top: 70px;
    bottom: 74px;
    max-height: none;
    border-radius: 18px;
    box-sizing: border-box;
  }
}

/* ── Right-column Widgets ───────────────────────────────── */
/* .right-widgets is no longer fixed — the right-column in the grid
   (sidebar.css) handles sticky positioning. This block kept for
   any legacy references only. */
.right-widgets {
  display: contents;
}

/* Shared card base */
.rw-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.rw-card-hdr {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}
.rw-hdr-icon {
  width: 14px; height: 14px;
  color: rgba(255,255,255,0.6); flex-shrink: 0;
}
.rw-hdr-title { flex: 1; }
.rw-card-toggle {
  background: none; border: none;
  color: rgba(255,255,255,0.5); font-size: 0.65rem;
  cursor: pointer; padding: 2px 4px; line-height: 1;
  transition: color 0.18s;
}
.rw-card-toggle:hover { color: rgba(255,255,255,0.9); }

/* Promotion card — height matches hero carousel (200px). */
.rw-promotion {
  height: 200px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  /* Override .rw-card base border with neon purple */
  border: 1.5px solid #7c3aed !important;
  border-radius: 14px !important;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3),
              0 0 20px rgba(124, 58, 237, 0.12) !important;
  background-image: url('/static/img/promotion-ronaldo.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
/* Non-interactive positioning wrapper for the bottom stripe */
.promo-stripe {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 1px;
  justify-content: center;
  pointer-events: none;
  background-color: #7c3aed;
}
/* Clickable text link — only this element responds to hover */
.promo-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  pointer-events: all;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
  transition: color 0.35s ease, text-shadow 0.6s ease;
}
.promo-card-btn:hover {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255,255,255,0.95), 0 0 4px rgba(255,255,255,0.8);
}
.rw-promo-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex: 1;
  height: 100%;
}
.rw-promo-text { flex: 1; }
.rw-promo-headline {
  font-family: 'Inter', sans-serif; font-weight: 900;
  font-size: 0.78rem; line-height: 1.35;
  color: #fff; text-transform: uppercase;
  margin: 0 0 10px;
}
.rw-promo-btn {
  display: inline-block;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff; border-radius: 6px;
  padding: 5px 13px; font-size: 0.72rem; font-weight: 700;
  text-decoration: none; font-family: 'Inter', sans-serif;
  transition: background 0.18s;
}
.rw-promo-btn:hover { background: rgba(0,0,0,0.55); color: #fff; }
.rw-promo-crown {
  font-size: 2.8rem; line-height: 1; flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  margin-right: 2px;
}

/* Live Streams card — flex column: video top, purple strip bottom */
.rw-live-streams {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 14px !important;
  border: 1.5px solid rgba(124, 58, 237, 0.4) !important;
  overflow: hidden;
  background: #0d0d0d;
}
.rw-live-video {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
}
.rw-live-footer {
  padding: 4px 12px;
  text-align: center;
  border-radius: 0 0 14px 14px;
  display: block;
  text-decoration: none;
  background-color: #7c3aed;
}
.rw-live-label {
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255,255,255,0.3);
  transition: color 0.35s ease, text-shadow 0.6s ease;
}
.rw-live-label:hover {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255,255,255,0.95), 0 0 4px rgba(255,255,255,0.8);
}

/* Narrow-screen hide handled by sidebar.css .right-column rules */

/* Loading state */
.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after { content: ''; position: absolute; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; top: 50%; left: 50%; margin: -6.5px 0 0 -6.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
