/* Styles owned by the betslip agent. Loaded after style.css, so rules here win. */

/* ----- Singles / Multiple / System tabs ----- */
.bs-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: -12px -16px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.bs-types button {
  padding: 11px 4px 9px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bs-types button.on { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.bs-types button:disabled { opacity: 0.45; cursor: not-allowed; }
.bs-types button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* ----- Slip items ----- */
.bs-item-main { min-width: 0; flex: 1; }
.slip-item.suspended { opacity: 0.7; box-shadow: inset 3px 0 0 var(--muted); }
.slip-item.changed { box-shadow: inset 3px 0 0 var(--gold); }
.bs-flag { margin-top: 4px; color: var(--red); font-size: 0.78rem; font-weight: 700; }
.bs-odds-old { color: var(--muted); font-size: 0.78rem; text-decoration: line-through; }
.slip-item .odd-value.up { color: var(--win); }
.slip-item .odd-value.down { color: var(--red); }
.slip-item .odd-value.up::before { content: "\25B2 "; font-size: 0.7em; }
.slip-item .odd-value.down::before { content: "\25BC "; font-size: 0.7em; }

/* Stake box on each single */
.bs-single-stake { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.bs-single-stake input {
  width: 96px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
.bs-single-stake input:focus { outline: none; border-color: var(--green); }
.bs-single-stake input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.bs-single-stake span { color: var(--muted); font-size: 0.82rem; }
.bs-single-stake strong { color: var(--text); font-variant-numeric: tabular-nums; }

/* ----- Odds changed banner ----- */
.bs-odds-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--gold);
  background: rgba(255, 201, 60, 0.18);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}
.bs-odds-note .btn { background: var(--card); color: var(--text); }

/* ----- System X/Y picker ----- */
.bs-system { margin: 4px 0 10px; }
.bs-sys-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 6px; }
.bs-sys-list button {
  display: grid;
  gap: 2px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.bs-sys-list button small { color: var(--muted); font-size: 0.75rem; }
.bs-sys-list button.on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); color: var(--green); }

/* ----- Summary ----- */
#stake { background: var(--card); color: var(--text); }
.quick-stakes { flex-wrap: wrap; }
.quick-stakes .chip-btn { color: var(--text); cursor: pointer; }
.quick-stakes .chip-btn:hover { border-color: var(--green); color: var(--green); }
.bs-bonus-row span, .bs-bonus-row strong { color: var(--win); font-weight: 700; }
.bs-total-row span { color: var(--text); font-weight: 700; }
.bs-total-row strong { color: var(--green); font-size: 1.05rem; }
.bs-note { margin: 0 0 8px; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.bs-note:empty { display: none; }
.bs-accept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.bs-accept select {
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}
.bs-accept select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ----- Desktop: bet slip docked in the right column ----- */
@media (min-width: 1024px) {
  #slip-fab { display: none !important; }
  .sheet.bet-slip,
  .sheet.bet-slip.open {
    top: var(--desk-head-h, 64px);
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 40;
    width: var(--desk-right-w, 340px);
    max-width: none;
    max-height: none;
    transform: none;
    transition: none;
    border-radius: 0;
    border-left: 1px solid var(--line);
    box-shadow: none;
  }
  /* Always open: no close button and no dark backdrop behind it */
  .bet-slip .bs-close { display: none; }
  /* Fit inside the 340px column: no sideways scrolling */
  .sheet.bet-slip { overflow-x: hidden; }
  .bet-slip .bs-head { grid-template-columns: auto auto 1fr; }
  .bet-slip .bs-auth { justify-self: end; min-width: 0; }
  /* The header above already has Log In / Register, so the slip only shows the balance */
  .bet-slip .bs-auth:not(:has(.bs-balance)) { display: none; }
  .bet-slip .bs-mode button { padding: 3px 10px; font-size: 0.85rem; }
  .bet-slip .bs-code-row button { min-width: 76px; }
  body:has(#slip-sheet.open) #backdrop { display: none !important; }
  /* Fit the narrow column: smaller top bar and tools */
  .bet-slip .bs-head { gap: 6px; padding: 8px 10px; }
  .bet-slip .bs-balance { white-space: nowrap; font-size: 0.9rem; }
  .bet-slip .bs-tools { padding: 8px 4px; overflow: hidden; }
  .bet-slip .bs-tools button { flex: 1; min-width: 0; padding: 4px; gap: 4px; font-size: 0.82rem; white-space: nowrap; }
  .bet-slip .bs-tools .icon { width: 16px; height: 16px; flex: none; }
  /* Full screen pages (log in, deposit...) hide it, like the mobile button */
  .app.no-nav .sheet.bet-slip { display: none; }
}

/* ----- Phones and tablets: bigger taps in the slip ----- */
@media (max-width: 1023px) {
  .bs-accept select { min-height: 40px; }
  .bs-types button { min-height: 44px; }
  .quick-stakes .chip-btn { flex: 1; min-width: 0; padding-inline: 4px; }
}
