/* =========================================================
   Today Betting Tips — match rows (homepage board + every match list)
   Time | League | Home  VS  Away | Tips | Odds | Confidence
   Rendered by components/betting-card.blade.php and public/js/ninety.js.
   ========================================================= */

.board .matches.tr-list,
.matches.tr-list {
  display: block !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}

.board .table-wrap { overflow: visible !important; }

.tr-head,
.tr-row {
  display: grid;
  grid-template-columns: 64px minmax(140px, 1.25fr) minmax(300px, 3fr) 96px 72px 104px;
  column-gap: 14px;
  align-items: center;
}

.tr-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.tr-head .tr-h-match,
.tr-head .tr-h-tip,
.tr-head .tr-h-odds,
.tr-head .tr-h-conf { text-align: center; }

.tr-row {
  position: relative;
  min-height: 64px;
  padding: 10px 16px;
  cursor: pointer;
  background: #FFFFFF;
  transition: background-color 140ms ease;
}

.tr-list > .tr-row:nth-child(even) { background: #F1F2F5; }
.tr-list > .tr-row:hover { background: var(--c-f1f9f4, #F1F9F4); }

.tr-row > .tr-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tr-time {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
}

.tr-time.is-live { color: #DC2626; font-weight: 700; }
.tr-time small { display: block; font-size: 11px; color: #9CA3AF; font-weight: 500; }

.tr-league {
  font-size: 14px;
  color: #4B5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tr-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-width: 0;
}

.tr-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tr-side.home { justify-content: flex-end; }
.tr-side.away { justify-content: flex-start; }

.tr-team {
  font-family: var(--display, "Outfit", sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tr-crest {
  width: 26px;
  height: 26px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--c-06301f, #06301F);
}

.tr-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tr-crest.has-logo { background: transparent; border-radius: 0; }

.tr-vs {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #6B7280;
}

.tr-vs.is-score {
  font-family: var(--display, "Outfit", sans-serif);
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0;
}

.tr-tip {
  text-align: center;
  font-family: var(--display, "Outfit", sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.tr-odds {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #16A34A;
}

.tr-conf { display: flex; justify-content: center; }

.tr-conf span {
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 9px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  background: #DCFCE7;
  color: #16A34A;
}

.tr-conf span.is-mid { background: #FEF3C7; color: #B45309; }
.tr-conf span.is-low { background: #F3F4F6; color: #6B7280; }
.tr-conf span.is-won { background: #16A34A; color: #FFFFFF; letter-spacing: 0.04em; }
.tr-conf span.is-lost { background: #DC2626; color: #FFFFFF; letter-spacing: 0.04em; }
.tr-conf span.is-void { background: #E5E7EB; color: #6B7280; letter-spacing: 0.04em; }

.tr-list > li.empty {
  padding: 28px 16px;
  text-align: center;
  color: #6B7280;
}

/* ---------- tablets: tighter columns ---------- */
@media (max-width: 1100px) {
  .tr-head,
  .tr-row {
    grid-template-columns: 54px minmax(110px, 1fr) minmax(250px, 2.6fr) 80px 58px 82px;
    column-gap: 10px;
  }
  .tr-team, .tr-tip, .tr-odds { font-size: 14px; }
  .tr-conf span { min-width: 54px; padding: 6px 8px; font-size: 13px; }
}

.tr-h-short { display: none; }
.tr-ko, .tr-ft { display: none; }
.tr-ft { font-style: normal; margin-right: 6px; }

/* ---------- phones: time, score + league on top, teams stacked, Tips | Odds | Prob. on the right ---------- */
@media (max-width: 760px) {
  .tr-head,
  .tr-row {
    grid-template-columns: auto auto minmax(0, 1fr) 58px 34px 46px;
    column-gap: 8px;
  }

  .tr-head {
    grid-template-areas: "match match match tip odds conf";
    padding: 8px 10px 6px;
    font-size: 10px;
  }
  .tr-h-time, .tr-h-league { display: none; }
  .tr-h-match { grid-area: match; text-align: left !important; }
  .tr-h-tip { grid-area: tip; }
  .tr-h-odds { grid-area: odds; }
  .tr-h-conf { grid-area: conf; }
  .tr-h-full { display: none; }
  .tr-h-short { display: inline; }

  .tr-row {
    grid-template-areas:
      "time league league league score score"
      "home home home tip odds conf"
      "away away away tip odds conf";
    row-gap: 4px;
    padding: 8px 10px;
  }

  .tr-time { grid-area: time; font-size: 10px; }
  .tr-time small { display: inline; margin-left: 4px; }
  .tr-league { grid-area: league; font-size: 10px; }

  /* Home on one line, away under it, crest before the name */
  .tr-match { display: contents; }
  .tr-side.home { grid-area: home; flex-direction: row-reverse; justify-content: flex-end; }
  .tr-side.away { grid-area: away; justify-content: flex-start; }
  .tr-side { gap: 5px; }
  .tr-vs { display: none; }
  .tr-vs.is-score { display: block; grid-area: score; justify-self: end; font-size: 10.5px; white-space: nowrap; }
  .tr-ko, .tr-ft { display: inline; }
  .tr-ft-label { display: none; }

  /* Settled results: light pills on phones */
  .tr-conf span.is-won { background: #DCFCE7; color: #16A34A; letter-spacing: 0; }
  .tr-conf span.is-lost { background: #FEE2E2; color: #DC2626; letter-spacing: 0; }
  .tr-team {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .tr-crest { width: 15px; height: 15px; font-size: 6px; }

  .tr-tip, .tr-odds, .tr-conf { align-self: center; }
  .tr-tip { grid-area: tip; grid-row: 2 / 4; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: visible; }
  .tr-odds { grid-area: odds; grid-row: 2 / 4; font-size: 11px; }
  .tr-conf { grid-area: conf; grid-row: 2 / 4; }
  .tr-conf span { min-width: 0; width: 100%; padding: 4px 3px; font-size: 10px; }
}

@media (max-width: 360px) {
  .tr-head,
  .tr-row { grid-template-columns: auto auto minmax(0, 1fr) 54px 32px 44px; column-gap: 6px; }
  .tr-team, .tr-tip, .tr-odds { font-size: 10.5px; }
}

/* ---------- dark mode ---------- */
html[data-theme="dark"] .tr-head { border-bottom-color: rgba(255, 255, 255, 0.08); color: var(--c-9bb0a5, #9BB0A5); }
html[data-theme="dark"] .tr-row { background: var(--c-112018, #112018); }
html[data-theme="dark"] .tr-list > .tr-row:nth-child(even) { background: var(--c-16291f, #16291F); }
html[data-theme="dark"] .tr-list > .tr-row:hover { background: var(--c-193325, #193325); }
html[data-theme="dark"] .tr-time,
html[data-theme="dark"] .tr-league,
html[data-theme="dark"] .tr-vs { color: var(--c-9bb0a5, #9BB0A5); }
html[data-theme="dark"] .tr-team,
html[data-theme="dark"] .tr-tip,
html[data-theme="dark"] .tr-vs.is-score { color: var(--c-f1f5f2, #F1F5F2); }
html[data-theme="dark"] .tr-odds { color: #4ADE80; }
html[data-theme="dark"] .tr-conf span { background: rgba(74, 222, 128, 0.15); color: #4ADE80; }
html[data-theme="dark"] .tr-conf span.is-mid { background: rgba(251, 191, 36, 0.15); color: #FBBF24; }
html[data-theme="dark"] .tr-conf span.is-low { background: rgba(255, 255, 255, 0.06); color: #9CA3AF; }
html[data-theme="dark"] .tr-conf span.is-won { background: #16A34A; color: #FFFFFF; }
html[data-theme="dark"] .tr-conf span.is-lost { background: #DC2626; color: #FFFFFF; }
html[data-theme="dark"] .tr-conf span.is-void { background: rgba(255, 255, 255, 0.08); color: #9CA3AF; }

/* Phones: time, teams, score, tips and odds in bold */
@media (max-width: 760px) {
  .tr-time, .tr-team, .tr-vs.is-score, .tr-tip, .tr-odds { font-weight: 700; }
}

/* Pick of the day card: hidden on phones */
@media (max-width: 760px) {
  .pick-card#pick-of-the-day { display: none !important; }
}
