/* =========================================================
   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: 500;
  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-result {
  display: block;
  margin-top: 2px;
  font-family: var(--text, "Manrope", sans-serif);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.tr-result.is-won { color: #16A34A; }
.tr-result.is-lost { color: #DC2626; }
.tr-result.is-void { color: #9CA3AF; }

.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-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; }
}

/* ---------- phones: three short lines per match ---------- */
@media (max-width: 760px) {
  .tr-head { display: none; }

  .tr-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "time league league"
      "match match match"
      "tip odds conf";
    row-gap: 8px;
    column-gap: 10px;
    padding: 12px 14px;
  }

  .tr-time { grid-area: time; font-size: 12.5px; }
  .tr-time small { display: inline; margin-left: 6px; }
  .tr-league { grid-area: league; font-size: 12.5px; text-align: right; }
  .tr-match { grid-area: match; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .tr-team { font-size: 14px; }
  .tr-crest { width: 22px; height: 22px; }
  .tr-tip { grid-area: tip; text-align: left; font-size: 14px; }
  .tr-result { display: inline; margin: 0 0 0 6px; }
  .tr-odds { grid-area: odds; font-size: 14px; }
  .tr-conf { grid-area: conf; }
  .tr-conf span { min-width: 52px; padding: 5px 8px; font-size: 12.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; }
