
/*
 * THE BET GENERATOR
 * Shared Results Page Styling
 *
 * Updated mobile table column widths
 * to accommodate P/W-Ins insurance bets.
 */

:root {
  --tbg-blue: #183651;
  --tbg-orange: #f15523;
  --tbg-green: #168047;
}

.tbg-results {
  box-sizing: border-box;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #d9dee5;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  font-family: inherit;
}

.tbg-results *,
.tbg-results *::before,
.tbg-results *::after {
  box-sizing: border-box;
}

.tbg-results h2 {
  margin: 0;
  color: var(--tbg-blue);
  font-size: 26px;
  line-height: 1.25;
}

.tbg-results .tbg-branded-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.tbg-results .tbg-branded-header h2 {
  flex: 1;
  min-width: 0;
}

.tbg-results .tbg-brand-logo {
  display: block;
  width: 140px;
  max-width: 32%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.tbg-results .tbg-race-summary {
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: #f5f7f9;
}

.tbg-results .tbg-race-track {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tbg-results .tbg-race-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
}

.tbg-results .tbg-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tbg-results .tbg-bet-footer {
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid #d9dee5;
  text-align: center;
  color: #586373;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.tbg-results .tbg-bet-footer a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* BET TABLE */

.tbg-results .tbg-bet-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  line-height: 1.4;
}

/* Desktop column widths */

.tbg-results .tbg-col-wager {
  width: 17%;
}

.tbg-results .tbg-col-type {
  width: 15%;
}

.tbg-results .tbg-col-combo {
  width: 49%;
}

.tbg-results .tbg-col-cost {
  width: 19%;
}

.tbg-results .tbg-bet-table th,
.tbg-results .tbg-bet-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #d9dee5;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.2;
}

.tbg-results .tbg-bet-table thead {
  background: var(--tbg-blue);
  color: #fff;
}

.tbg-results .tbg-bet-table thead th {
  color: #fff;
  font-weight: 700;
}

.tbg-results .tbg-bet-table tbody tr:nth-child(even) {
  background: #f2f5f7;
}

.tbg-results .tbg-bet-table tbody td:first-child {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tbg-results .tbg-combo {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.tbg-results .tbg-bet-table td:last-child,
.tbg-results .tbg-bet-table th:last-child {
  text-align: right;
}

.tbg-results .tbg-bet-table tfoot {
  background: #e4f3ea;
  font-weight: 700;
}

.tbg-results .tbg-bet-table tfoot th {
  color: #07582d;
  font-size: 18px;
}

/* ACTION BUTTONS */

.tbg-results .tbg-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.tbg-results .tbg-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 9px;
  padding: 13px 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: filter .15s ease;
}

.tbg-results .tbg-action-button:hover {
  filter: brightness(.94);
}

.tbg-results .tbg-action-button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tbg-results #tbg-save-image {
  background: var(--tbg-orange);
  color: #fff;
}

.tbg-results #tbg-print-bet {
  background: var(--tbg-blue);
  color: #fff;
}

.tbg-results #tbg-spk-start-over {
  margin-top: 10px;
  background: #e8edf0;
  color: var(--tbg-blue);
}

.tbg-results #tbg-different-bet {
  margin-top: 10px;
  background: var(--tbg-green);
  color: #fff;
}

.tbg-results #tbg-action-status {
  margin: 10px 0 0;
  font-size: 14px;
}

.tbg-results button:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

.tbg-results button:disabled {
  opacity: .6;
  cursor: wait;
}

/* MOBILE */

@media (max-width: 600px) {

  .tbg-results {
    padding: 8px;
    border-radius: 10px;
  }

  .tbg-results h2 {
    font-size: 22px;
  }

  .tbg-results .tbg-branded-header {
    gap: 8px;
    margin: 6px 4px 15px;
  }

  .tbg-results .tbg-brand-logo {
    width: 100px;
    max-width: 30%;
  }

  .tbg-results .tbg-race-summary {
    padding: 12px;
    margin-bottom: 12px;
  }

  .tbg-results .tbg-race-track {
    font-size: 19px;
  }

  .tbg-results .tbg-race-details {
    font-size: 14px;
    gap: 6px 12px;
  }

  .tbg-results .tbg-bet-table {
    font-size: 15px;
    line-height: 1.35;
  }

  /*
   * Updated mobile column widths:
   * Wager 14%
   * Type  21%
   * Combo 48%
   * Cost  17%
   *
   * Type now accommodates P/W-Ins.
   */

  .tbg-results .tbg-col-wager {
    width: 14%;
  }

  .tbg-results .tbg-col-type {
    width: 21%;
  }

  .tbg-results .tbg-col-combo {
    width: 48%;
  }

  .tbg-results .tbg-col-cost {
    width: 17%;
  }

  .tbg-results .tbg-bet-table th,
  .tbg-results .tbg-bet-table td {
    padding: 5px 2px;
  }

  .tbg-results .tbg-bet-table thead th {
    font-size: 12px;
    letter-spacing: -.2px;
  }

  .tbg-results .tbg-bet-table tbody td:first-child {
    font-size: 19px;
  }

  .tbg-results .tbg-combo {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.5px;
  }

  .tbg-results .tbg-bet-table tfoot th {
    font-size: 15px;
  }

  .tbg-results .tbg-action-button {
    font-size: 14px;
    padding: 13px 5px;
    gap: 6px;
  }

  .tbg-results .tbg-action-button svg {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

}

/* SMALL PHONES */

@media (max-width: 360px) {

  .tbg-results .tbg-bet-table {
    font-size: 14px;
  }

  .tbg-results .tbg-bet-table tbody td:first-child {
    font-size: 18px;
  }

  .tbg-results .tbg-combo {
    font-size: 18px;
  }

  .tbg-results .tbg-bet-table thead th {
    font-size: 11px;
  }

  .tbg-results .tbg-bet-table th,
  .tbg-results .tbg-bet-table td {
    padding-left: 2px;
    padding-right: 2px;
  }

}

/* PRINT */

@media print {

  body * {
    visibility: hidden !important;
  }

  .tbg-results,
  .tbg-results .tbg-capture-area,
  .tbg-results .tbg-capture-area * {
    visibility: visible !important;
  }

  .tbg-results {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .tbg-results .tbg-result-actions {
    display: none !important;
  }

  .tbg-results .tbg-table-wrap {
    overflow: visible;
  }

  .tbg-results .tbg-bet-table thead {
    background: #183651 !important;
    color: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .tbg-results .tbg-bet-table tfoot {
    background: #e4f3ea !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

}

/* NO SELECTIONS MESSAGE */

.tbg-results .tbg-no-selections {
  text-align: center;
  padding: 25px 15px 30px;
}

.tbg-results .tbg-no-selections h3 {
  margin: 0 0 12px;
  color: #183651;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.tbg-results .tbg-no-selections p {
  margin: 0 0 22px;
  color: #586373;
  font-size: 17px;
  line-height: 1.5;
}

.tbg-results .tbg-no-selections-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: 9px;
  background: #168047;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.tbg-results .tbg-no-selections-button:hover {
  background: #116a3a;
  color: #ffffff;
}

@media (max-width: 600px) {

  .tbg-results .tbg-no-selections h3 {
    font-size: 21px;
  }

  .tbg-results .tbg-no-selections-button {
    width: 100%;
  }

}
