/* Live card styles. Layout matches reference/prototype.html. Colours are neutral (white or near-black);
   the only colour is green for wins. The brand colours live on the app icon only. */
:root {
  --surface-1: #F1EFE8; --surface-2: #FFFFFF;
  --border: #D3D1C7; --border-strong: #B4B2A9; --border-accent: #18181B;
  --text-primary: #1F1F1D; --text-secondary: #5F5E5A; --text-muted: #888780;
  --text-accent: #18181B; --text-success: #15803D; --text-warning: #854F0B; --text-danger: #A32D2D;
  --bg-danger: #FCEBEB; --fill-accent: #18181B; --hover: rgba(0, 0, 0, 0.04); --radius: 8px;
}

/* Dark theme: set data-lc-theme="dark" on <html>, or "system" to follow the computer's setting. */
:root[data-lc-theme="dark"] {
  --surface-1: #0E0E10; --surface-2: #18181B;
  --border: #2C2C30; --border-strong: #3F3F46; --border-accent: #F4F4F5;
  --text-primary: #F4F4F5; --text-secondary: #D4D4D8; --text-muted: #A1A1AA;
  --text-accent: #F4F4F5; --text-success: #4ADE80; --text-warning: #FBBF24; --text-danger: #FCA5A5;
  --bg-danger: #3B1A1A; --fill-accent: #F4F4F5; --hover: rgba(255, 255, 255, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root[data-lc-theme="system"] {
    --surface-1: #0E0E10; --surface-2: #18181B;
    --border: #2C2C30; --border-strong: #3F3F46; --border-accent: #F4F4F5;
    --text-primary: #F4F4F5; --text-secondary: #D4D4D8; --text-muted: #A1A1AA;
    --text-accent: #F4F4F5; --text-success: #4ADE80; --text-warning: #FBBF24; --text-danger: #FCA5A5;
    --bg-danger: #3B1A1A; --fill-accent: #F4F4F5; --hover: rgba(255, 255, 255, 0.06);
  }
}

.lc-card, .lc-card * { box-sizing: border-box; }

.lc-card {
  position: absolute; right: 12px; top: 12px; width: 252px; z-index: 6;
  background: var(--surface-2); border: 0.5px solid var(--border-strong); border-radius: 12px; padding: 12px;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px;
}

/* Motion: fade in and slide 30px from the right over 0.6s, and leave the same way. */
.lc-card.lc-animated { transform: translateX(30px); opacity: 0; transition: transform 0.6s ease, opacity 0.6s ease; }
.lc-card.lc-animated.lc-in { transform: translateX(0); opacity: 1; }

.lc-card button {
  font: inherit; color: var(--text-primary); background: transparent; cursor: pointer;
  border: 0.5px solid var(--border-strong); border-radius: var(--radius); height: 36px; padding: 0 12px;
  display: flex; align-items: center; justify-content: center;
}
.lc-card button:hover { background: var(--hover); }
.lc-card input[type=range] { width: 100%; accent-color: var(--fill-accent); }

.lc-kbd { font-size: 11px; border: 0.5px solid var(--border-strong); border-radius: 4px; padding: 0 5px; color: var(--text-secondary); }

.lc-question { font-size: 15px; font-weight: 500; margin-bottom: 8px; }

.lc-options { display: flex; gap: 8px; }
.lc-card .lc-option { flex: 1; flex-direction: column; height: auto; padding: 8px 4px; gap: 1px; min-width: 0; }
.lc-option-name { font-size: 13px; }
/* A live price that just moved: a small arrow beside the return for a moment. */
.lc-card .lc-option { position: relative; }
.lc-card .lc-option.lc-up .lc-win::after, .lc-card .lc-option.lc-down .lc-win::after {
  content: '▲'; font-size: 9px; margin-left: 4px; vertical-align: middle; color: var(--text-success, #4ADE80);
  animation: lc-price-fade 1.6s ease-out forwards;
}
.lc-card .lc-option.lc-down .lc-win::after { content: '▼'; color: var(--text-danger, #F87171); }
@keyframes lc-price-fade { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lc-card .lc-option .lc-win::after { animation: none; } }

/* Three options (who wins, who scores next): a little smaller so long team names fit. */
.lc-card.lc-three .lc-options { gap: 6px; }
.lc-card.lc-three .lc-option-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lc-card.lc-three .lc-win { font-size: 16px; }
.lc-win { font-size: 18px; font-weight: 500; color: var(--text-primary); }

.lc-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12px; color: var(--text-secondary);
}
.lc-card .lc-more { border: none; background: transparent; height: auto; padding: 0; font-size: 12px; color: var(--text-accent); }
.lc-card .lc-more:hover { background: transparent; }

.lc-extra { margin-top: 10px; border-top: 0.5px solid var(--border); padding-top: 10px; }
.lc-extra[hidden] { display: none; }
.lc-stake-row { display: flex; align-items: baseline; justify-content: space-between; }
.lc-label { font-size: 12px; color: var(--text-secondary); }
.lc-stake { font-size: 26px; font-weight: 500; }
.lc-range-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.lc-ai-line { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
.lc-returns { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Balance, today's result and a small history line (desktop app; hidden when no history is given). */
.lc-balance-block { margin-top: 10px; border-top: 0.5px solid var(--border); padding-top: 8px; }
.lc-balance-row { display: flex; justify-content: space-between; align-items: baseline; }
.lc-balance { font-weight: 500; color: var(--text-primary); }
.lc-today { font-size: 12px; color: var(--text-secondary); }
.lc-today.lc-up { color: var(--text-success); }
.lc-spark { display: block; width: 100%; height: 28px; margin-top: 4px; color: var(--text-accent); }

/* Empty until a pick: holds "Locked in" and warnings. */
.lc-status { font-size: 12px; margin-top: 6px; min-height: 0; color: var(--text-secondary); }

/* One-line result after a pick, e.g. "+55 You called it". */
.lc-result { padding: 8px 0; }
.lc-result-num { font-size: 22px; font-weight: 500; color: var(--text-secondary); }
.lc-result-num.lc-won { color: var(--text-success); }
.lc-result-text { font-size: 13px; color: var(--text-secondary); }

/* Optional small line above the question (card.label), e.g. the match when two are on screen. */
.lc-match-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stack: a stage may hold cards in a column at one corner instead of the default top right.
   <div class="lc-stack lc-top-right|lc-top-left|lc-bottom-right|lc-bottom-left"> with cards inside.
   Without a stack a card keeps its own position above (the extension and step pages). */
.lc-stack { position: absolute; display: flex; flex-direction: column; gap: 8px; z-index: 6; }
.lc-stack.lc-top-right { top: 12px; right: 12px; align-items: flex-end; }
.lc-stack.lc-top-left { top: 12px; left: 12px; align-items: flex-start; }
.lc-stack.lc-bottom-right { bottom: 12px; right: 12px; align-items: flex-end; justify-content: flex-end; }
.lc-stack.lc-bottom-left { bottom: 12px; left: 12px; align-items: flex-start; justify-content: flex-end; }
.lc-stack > .lc-card { position: relative; top: auto; right: auto; left: auto; bottom: auto; flex: none; }
/* A card sliding out leaves the column at once, so the others close up beneath it. */
.lc-stack > .lc-card.lc-animated:not(.lc-in) { position: absolute; }
.lc-stack.lc-top-left > .lc-card.lc-animated, .lc-stack.lc-bottom-left > .lc-card.lc-animated { transform: translateX(-30px); }
.lc-stack.lc-top-left > .lc-card.lc-animated.lc-in, .lc-stack.lc-bottom-left > .lc-card.lc-animated.lc-in { transform: translateX(0); }

/* Compact size: same features, smaller card. Put lc-compact on the card or on any parent. */
.lc-compact .lc-card, .lc-card.lc-compact { width: 212px; padding: 9px; font-size: 13px; }
.lc-compact .lc-question, .lc-card.lc-compact .lc-question { font-size: 13px; margin-bottom: 6px; }
.lc-compact .lc-win, .lc-card.lc-compact .lc-win { font-size: 15px; }
.lc-compact .lc-option-name, .lc-card.lc-compact .lc-option-name { font-size: 12px; }
.lc-compact .lc-options, .lc-card.lc-compact .lc-options { gap: 6px; }
.lc-compact .lc-card .lc-option, .lc-card.lc-compact .lc-option { padding: 6px 4px; }
.lc-compact .lc-footer, .lc-card.lc-compact .lc-footer { margin-top: 6px; font-size: 11px; }
.lc-compact .lc-stake, .lc-card.lc-compact .lc-stake { font-size: 21px; }
.lc-compact .lc-extra, .lc-card.lc-compact .lc-extra { margin-top: 8px; padding-top: 8px; }
.lc-compact .lc-result-num, .lc-card.lc-compact .lc-result-num { font-size: 18px; }

/* Picking: a press you can feel, then an unmistakable "placed" state (like a bet slip confirmation). */
.lc-card .lc-option { transition: transform 0.08s ease, background 0.2s, opacity 0.2s, border-color 0.2s; }
.lc-card .lc-option:active { transform: scale(0.96); }
.lc-card .lc-option.lc-chosen { background: #8B7CF6; color: #0E0E10; border-color: #8B7CF6; position: relative;
  box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.25); }   /* your pick: the violet action colour, not a win yet */
.lc-card .lc-option.lc-chosen .lc-win { color: #0E0E10; }
.lc-card .lc-option.lc-chosen .lc-option-name::after { content: " ✓"; }
.lc-card .lc-option.lc-faded { opacity: 0.35; }
.lc-card.lc-placed { animation: lc-placed 0.45s ease; }
@keyframes lc-placed { 0% { transform: scale(1); } 40% { transform: scale(1.025); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .lc-card .lc-option, .lc-card .lc-option:active { transition: none; transform: none; }
  .lc-card.lc-placed { animation: none; }
}

/* The small "i" top right: the player's or the match's numbers, hidden until tapped (Waj, 9 Nov 2026). */
.lc-inner { position: relative; }
.lc-card .lc-info { position: absolute; top: -2px; right: -2px; width: 26px; height: 26px; padding: 0; border-radius: 50%;
  font-size: 13px; font-weight: 600; font-style: italic; font-family: Georgia, "Times New Roman", serif; color: var(--text-secondary); }
.lc-card .lc-info[aria-expanded="true"] { background: var(--fill-accent); color: var(--surface-2); border-color: var(--fill-accent); }
.lc-card .lc-question { padding-right: 28px; }
.lc-stats { font-size: 12px; color: var(--text-secondary); margin: -4px 0 8px; padding: 6px 8px; border: 0.5px dashed var(--border-strong); border-radius: var(--radius); }
.lc-stats[hidden] { display: none; }
.lc-stats div + div { margin-top: 2px; }
/* "+ Slip" beside More: the next answer goes on the slip (the card tints while that is armed). */
.lc-footer-btns { display: flex; gap: 10px; align-items: center; }
.lc-card .lc-slip { border: 0.5px solid var(--border-strong); border-radius: 999px; height: 24px; padding: 0 9px; font-size: 12px; font-weight: 600; color: var(--text-accent); }
.lc-card .lc-slip[aria-pressed="true"], .lc-card.lc-slip-mode .lc-option { border-color: #8B7CF6; }
.lc-card .lc-slip[aria-pressed="true"] { background: #8B7CF6; color: #0E0E10; }

/* A slip card: the legs it bets on (the phone's builder adds a side toggle, swap, remove and an add row), one "Place slip" button. */
.lc-legs { margin: 0 0 8px; display: flex; flex-direction: column; }
.lc-leg { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-top: 0.5px solid var(--border); }
.lc-leg:first-child { border-top: 0; }
.lc-leg-q { color: var(--text-primary); min-width: 0; flex: 1; }
.lc-leg-sub { display: block; font-size: 11px; color: var(--text-muted); }
.lc-leg-opt { color: var(--text-secondary); white-space: nowrap; }
.lc-sides { display: inline-flex; border: 0.5px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.lc-card .lc-sides button { border: 0; border-radius: 0; height: 28px; padding: 0 9px; font-size: 12px; color: var(--text-secondary); }
.lc-card .lc-sides button[aria-pressed="true"] { background: var(--fill-accent); color: var(--surface-2); font-weight: 600; }
.lc-card .lc-leg-act { border: 0; height: 28px; min-width: 28px; padding: 0 4px; font-size: 12px; color: var(--text-secondary); }
.lc-leg-add { padding: 6px 0 2px; border-top: 0.5px solid var(--border); }
.lc-leg-add-title { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.lc-leg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-card .lc-leg-chip { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 999px; color: var(--text-secondary); }
.lc-slip-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.lc-slip-head b { color: var(--text-success); font-weight: 600; }
.lc-slipcard .lc-options { display: flex; }
.lc-slipcard .lc-option { flex-direction: row; justify-content: center; gap: 10px; }

/* Boosted card: gold, so a better price stands out (green stays for wins only). */
.lc-card.lc-boost { border-color: #FBBF24; box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35), 0 0 18px rgba(251, 191, 36, 0.18); }
.lc-boost-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: #0E0E10; background: #FBBF24;
  border-radius: 999px; padding: 2px 8px; margin-bottom: 6px; }

/* Social proof line (card.crowd) */
.lc-crowd { font-size: 12px; color: #FDBA74; margin-top: 6px; }

/* Time left: a thin line along the top edge that shrinks until the card leaves on its own. */
.lc-timer { position: absolute; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; border-radius: 12px 12px 0 0; opacity: 0; transition: opacity 0.2s; }
.lc-card.lc-timed .lc-timer { opacity: 1; }
.lc-timer-fill { height: 100%; background: var(--text-info, #8B7CF6); transform-origin: left center; }
@media (prefers-reduced-motion: reduce) { .lc-timer-fill { transition: none !important; } }
