#tipsengine-sicbo-game {
    max-width: 600px;
    margin: 0 auto;
}
#tipsengine-sicbo-game h2 {
    margin-top: 20px;
}
#sicbo-config, #sicbo-stake-tracker, #sicbo-round-results {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 10px;
    overflow-x: auto;
}
table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
#round-input label {
    margin-right: 10px;
}
.bet-config-row {
    margin-bottom: 5px;
}
.bet-config-row select,
.bet-config-row input {
    margin-right: 5px;
}
@media (max-width: 600px) {
    table, th, td {
        font-size: 12px;
    }
    #tipsengine-sicbo-game {
        width: 100%;
        padding: 0 5px;
    }
    .bet-config-row input, .bet-config-row select {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
}

/* compact log look-and-feel */
#round-log tbody tr:nth-child(even) { background:#f8f9fa; }
#round-log td { padding:4px; font-size:13px; }
#stake-tracker-table td:nth-child(4) { font-weight:bold; }
#diceRoll { width:80px; text-align:center; }

#summary-table, #summary-table th, #summary-table td {
    border: 1px solid #ddd;
    border-collapse: collapse;
}
#summary-table th,
#summary-table td {
    padding: 4px;
    text-align: center;
    font-size: 13px;
}
#summary-body tr.inactive { opacity: 0.5; }
#summary-head th { background: #f0f0f0; }

/* ── Config grid ───────────────────────────── */
.bet-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(330px,1fr));
  gap:12px;
  margin-top:1rem
}
.bet-group{border:1px solid #d0d7dd;border-radius:6px;padding:8px}
.bet-title{font-weight:600;margin-bottom:4px}
.bet-row{display:flex;align-items:center;gap:4px 6px;margin:2px 0;font-size:.88rem}
.bet-row input[type="checkbox"]{margin:0}
.bet-row .sel{min-width:28px;text-align:center}
.bet-row .odds{min-width:38px;color:#555;text-align:right}
.bet-row .bet-base,
.bet-row .bet-target{width:60px;font-size:.8rem}
@media(max-width:380px){
  .bet-row{flex-wrap:wrap}
}

/* hide per-item inputs when body has united-mode class */
body.united-mode .bet-row .bet-base,
body.united-mode .bet-row .bet-target{
  display:none !important;
}

.summary-table td.negative { color:#c62828; }
.summary-table td.positive { color:#2e7d32; }

/* upcoming-round suggestion column */
th.next-stake,
td.next-stake {
  background: #fffbe7;   /* soft yellow */
  font-weight: 600;
  min-width: 60px;       /* ensures the cell is visible */
  text-align: center;
}

.stats-table td.max {
  background: lightgreen;
  color: white;
  font-weight: bold;
}
.stats-table td.min {
  background: lightcoral;
  color: yellow;
  opacity:75%;
}
.stats-table th, .stats-table td {
  padding: 2px 4px;
  text-align: center;
}


/* make the stake‐tracker and stats tables scrollable horizontally */
#sicbo-stake-tracker,
#session-stats {
  overflow-x: auto;       /* enable horizontal scroll */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
}

/* force the tables to size to their content, not container */
#stake-tracker-table,
#session-stats {
  width: max-content;     /* allow the table to be wider than its container */
}

/* Round Summary horizontally scrollable */
#sicbo-round-summary {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#sicbo-round-summary table {
  width: max-content;     /* allow it to grow to content width */
}
#sicbo-round-summary th,
#sicbo-round-summary td {
  white-space: nowrap;    /* no wrapping */
}

/* ───── Scrollable wrappers ───── */
#sicbo-round-summary,
#session-stats {
  overflow-x: auto;       /* horizontal scrolling */
  -webkit-overflow-scrolling: touch;
}

/* prevent wrapping so table grows wide */
#sicbo-round-summary table th,
#sicbo-round-summary table td,
#session-stats th,
#session-stats td {
  white-space: nowrap;
}

/* allow the table itself to size to its content */
#sicbo-round-summary table,
#session-stats {
  width: max-content;
  table-layout: auto;
}

/* ───── Sticky first column ───── */
/* Round Summary */
#sicbo-round-summary table th:first-child,
#sicbo-round-summary table td:first-child {
  position: sticky;
  left: 0;
  background: #f0f0f0;
  font-weight: 600;
  z-index: 2;
}

/* Session Statistics */
#session-stats th:first-child,
#session-stats td:first-child {
  position: sticky;
  left: 0;
  background: #f0f0f0;
  font-weight: 600;
  z-index: 2;
}

#sessions-list ul {
  list-style: none;
  padding: 0;
}
#sessions-list li {
  margin: .3em 0;
}
#sessions-list .load-session {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: .4em .8em;
  cursor: pointer;
}
#sessions-list .load-session:hover {
  background: #005177;
}


.session-summary {
  font-size: 0.9em;
  color: #555;
  margin-left: 1.5em;
}
.loaded-banner {
  background: #ffeeba;
  padding: 0.5em;
  margin: 1em 0;
  border-left: 4px solid #f0ad4e;
}


.session-summary {
  font-size: 0.9em;
  color: #555;
  margin-left: 1.5em;
}
.loaded-banner {
  background: #ffeeba;
  padding: 0.5em;
  margin: 1em 0;
  border-left: 4px solid #f0ad4e;
}

