/* BASIC STRIP LAYOUT (you can merge with your existing) */
.roam-scoreboard-strip {
  position: relative;
  z-index: 9999;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.rsb-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

/* League button & dropdown */
.rsb-league-button {
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.2);
  background: #fff;
  padding: 4px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.rsb-league-dropdown {
  position: absolute;
  left: 16px;
  top: 36px;
  width: 240px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 4px 0;
  display: none;
  z-index: 99999;
}
.rsb-league-dropdown.rsb-open { display:block; }

.rsb-league-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
.rsb-league-item:hover { background:#f3f3f3; }

.rsb-league-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* Matches strip */
.rsb-matches {
  flex: 1;
  overflow-x: auto;
}
.rsb-matches-track {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}

/* Each match tile */
.rsb-match {
  min-width: 110px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  text-decoration: none;
  color: #000;
  cursor: pointer;           /* ✅ pointer on hover */
  position: relative;
}
.rsb-match:hover {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.30);
}

.rsb-match-meta {
  font-size: 10px;
  opacity: .7;
  margin-bottom: 2px;
}
.rsb-team-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
}
.rsb-team-logo {
  width:16px;
  height:16px;
}

/* Arrows */
.rsb-arrow {
  border:none;
  background:none;
  cursor:pointer;
  font-size:18px;
  opacity:.7;
}
.rsb-arrow:hover { opacity:1; }

/* Full Scoreboard link */
.rsb-full-link {
  text-decoration:none;
  font-size:13px;
  color:#111;
}

/* Calendar icon */
.rsb-calendar {
  width:30px;
  height:30px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,0.2);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.rsb-calendar-icon {
  width:17px;
  height:17px;
  stroke: var(--rb-color-primary, #111);
  fill:none;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Calendar popup */
.rsb-calendar-popup {
  position:absolute;
  background:#fff;
  border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,0.18);
  padding:8px 10px;
  z-index:99999;
}
.rsb-calendar-input {
  border:1px solid rgba(0,0,0,0.2);
  border-radius:6px;
  padding:4px 6px;
  font-size:13px;
}

/* Hover summary card */
.rsb-hover-card {
  position:absolute;
  background:#fff;
  border-radius:8px;
  box-shadow:0 8px 30px rgba(0,0,0,0.18);
  padding:8px 10px;
  font-size:12px;
  z-index:99999;
  pointer-events:none;
}
.rsb-hover-title { font-weight:600; margin-bottom:4px; }
.rsb-hover-row { opacity:.8; }

/* Page list rows */
.rsb-page-row {
  display:flex;
  justify-content:space-between;
  padding:8px 10px;
  border-bottom:1px solid #eee;
  text-decoration:none;
  color:#000;
  font-size:13px;
}
.rsb-page-row:hover { background:#fafafa; }

/* Clean match detail (when you use [roam_match]) */
.rsb-detail-clean {
  max-width:700px;
  margin:20px auto;
  padding:20px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 40px rgba(0,0,0,0.08);
}
.rsb-detail-meta {
  display:flex;
  justify-content:space-between;
  margin-bottom:12px;
  font-size:13px;
  opacity:.8;
}
.rsb-detail-scoreline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:10px;
}
.rsb-detail-team {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.rsb-detail-logo {
  width:48px;
  height:48px;
}
.rsb-detail-name { font-weight:600; }
.rsb-detail-score {
  font-size:28px;
  font-weight:700;
}
.rsb-detail-status {
  text-align:center;
  font-size:13px;
  opacity:.8;
}

/* ================================
   MATCH PAGE – ESPN CLEAN LAYOUT
   (ONLY affects [roam_match] page)
================================ */

.roam-match-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px 40px;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

/* HEADER CARD */

.rsb-match-header-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 24px 28px;
  margin-bottom: 28px;
  text-align: center;
}

.rsb-mh-league {
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
}

.rsb-mh-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.rsb-mh-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.rsb-mh-team img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.rsb-mh-score {
  font-size: 32px;
  font-weight: 800;
}

.rsb-mh-status {
  font-size: 13px;
  color: #777;
}

.rsb-mh-meta {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* MAIN GRID */

.rsb-match-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 24px;
}

.rsb-col {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.06);
  padding: 18px 18px 20px;
}

.rsb-col h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* FORMATION PITCH */

.rsb-pitch {
  background: linear-gradient(135deg, #2c8b48, #1f6b43);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.rsb-pitch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.rsb-pitch-player {
  background: rgba(255,255,255,0.16);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  color: #fff;
  cursor: pointer;
}

.rsb-pitch-player:hover {
  background: rgba(255,255,255,0.28);
}

.rsb-pitch-num {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

/* LINEUPS */

.rsb-lineup-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rsb-lineup-list td {
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
}

.rsb-l-num {
  width: 32px;
  font-weight: 600;
  color: #444;
}

.rsb-l-pos {
  width: 40px;
  text-align: right;
  color: #777;
}

.rsb-l-sub-title td {
  font-weight: 700;
  padding-top: 10px;
}

/* CENTER – TIMELINE */

.rsb-timeline {
  font-size: 13px;
  margin-bottom: 18px;
}

.rsb-timeline-bar {
  position: relative;
  height: 30px;
  background: #f3f3f3;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.rsb-timeline-track {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: #5abf4b;
  border-radius: 999px;
}

.rsb-tl-event {
  position: absolute;
  font-size: 13px;
  transform: translate(-50%, -50%);
}

.rsb-tl-event.home {
  top: 30%;
}

.rsb-tl-event.away {
  top: 70%;
}

.rsb-tl-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #777;
}

/* small icon dots */
.rsb-tl-event span {
  display: inline-block;
}

/* CENTER – STATS SUMMARY */

.rsb-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px;
}

.rsb-stats-header button.rsb-open-stats {
  border: none;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.rsb-stats-header button:hover {
  background: #e6e6e6;
}

.rsb-possession {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.rsb-pos-label {
  font-size: 11px;
  color: #777;
  text-align: center;
  flex: 0 0 80px;
}

.rsb-pos-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
}

.rsb-pos-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}

.rsb-pos-bar-inner-home {
  height: 100%;
  background: #e31a1a;
  float: left;
}

.rsb-pos-bar-inner-away {
  height: 100%;
  background: #222;
  float: right;
}

/* Per-stat rows */

.rsb-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.rsb-stat-label {
  flex: 0 0 110px;
  color: #555;
}

.rsb-stat-val-home,
.rsb-stat-val-away {
  width: 24px;
  text-align: center;
  font-weight: 600;
}

.rsb-stat-bars {
  flex: 1;
  display: flex;
  height: 8px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
}

.rsb-stat-home {
  background: #e31a1a;
}

.rsb-stat-away {
  background: #444;
}

/* MODAL */

.rsb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}

.rsb-modal-overlay.rsb-modal-open {
  display: flex;
}

.rsb-modal {
  background: #fff;
  border-radius: 16px;
  width: min(840px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.rsb-modal-close {
  position: absolute;
  right: 16px;
  top: 10px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.rsb-modal-team-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.rsb-modal-section h3 {
  margin-bottom: 6px;
}

/* keep page height normal so theme footer stays in place */
.roam-scoreboard-page,
.roam-match-wrapper {
  min-height: auto !important;
}


/* ============================================
   CORE SCOREBOARD STRIP – RESTORED VERSION
   ============================================ */
.roam-scoreboard-strip {
  position: relative;
  z-index: 9999;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(14px);
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.rsb-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
}

/* League Button */
.rsb-league-button {
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  padding: 5px 13px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Dropdown */
.rsb-league-dropdown {
  position: absolute;
  left: 18px;
  top: 40px;
  width: 240px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  padding: 6px 0;
  display: none;
  z-index: 99999;
}
.rsb-league-dropdown.rsb-open { display: block; }

.rsb-league-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.rsb-league-item:hover { background: #f3f3f3; }

.rsb-league-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ============================================
   MATCH STRIP FIX – RESTORED
   ============================================ */
.rsb-matches {
  flex: 1;
  overflow-x: auto;
}
.rsb-matches-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

/* League header (small logo above matches) */
.rsb-league-header-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 4px 6px;
  min-width: 32px;
  height: 32px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.10);
  cursor: pointer;
}
.rsb-league-header-pill img {
  width: 22px;
  height: 22px;
}

/* Match Tile */
.rsb-match {
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.10);
  text-decoration: none;
  color: #000;
  cursor: pointer;
  position: relative;
}
.rsb-match:hover {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.28);
}

.rsb-match-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rsb-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.rsb-team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Strip arrows */
.rsb-arrow {
  background: none;
  border: none;
  font-size: 20px;
  opacity: .7;
  cursor: pointer;
}
.rsb-arrow:hover { opacity: 1; }

/* ============================================
   MATCH PAGE FIX – STATS + POSSESSION LAYOUT
   ============================================ */

.rsb-possession {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 18px 0;
}

.rsb-pos-bar {
  width: 100%;
  height: 10px;
  background: #e6e6e6;
  border-radius: 999px;
  overflow: hidden;
}

.rsb-pos-home { background: #d01818; height: 100%; float: left; }
.rsb-pos-away { background: #222; height: 100%; float: right; }

/* Stat list restored */
.rsb-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.rsb-stat-bars {
  flex: 1;
  height: 8px;
  background: #d8d8d8;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 10px;
}

.rsb-stat-home { background: #e31a1a; height: 100%; }
.rsb-stat-away { background: #444; height: 100%; }

/* ============================================
   FIX FOR OVERLY LARGE LEAGUE LOGO (your screenshot)
   ============================================ */
.rsb-mh-league-logo {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
}

/* Align possession logos */
.rsb-pos-team-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

/* --- FIX POSSESSION ROW LAYOUT --- */
.rsb-possession-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 12px 0 22px;
}

/* Left + Right team blocks */
.rsb-pos-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
}

.rsb-pos-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 6px;
}

.rsb-pos-percent {
  font-size: 15px;
  font-weight: 600;
}

/* Center possession column */
.rsb-pos-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsb-pos-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Possession bar wrapper */
.rsb-pos-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e5e5e5;
  position: relative;
  overflow: hidden;
}

/* Home side possession bar */
.rsb-pos-bar-home {
  background: #e53935;
  height: 100%;
  float: left;
}

/* Away side possession bar */
.rsb-pos-bar-away {
  background: #222;
  height: 100%;
  float: right;
}

/* ===========================
   MODERN MATCH TIMELINE
=========================== */

.rsb-timeline-wrapper {
  border-left: 3px solid #e5e5e5;
  margin: 20px 0;
  padding-left: 20px;
  position: relative;
}

.rsb-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
}

.rsb-tl-time {
  font-weight: 700;
  color: #333;
  font-size: 13px;
  min-width: 40px;
  text-align: right;
}

.rsb-tl-line {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 3px solid #4a6cf7;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.rsb-tl-card {
  background: #f9f9f9;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  gap: 10px;
  max-width: 420px;
}

.rsb-tl-icon {
  font-size: 18px;
  line-height: 18px;
}

.rsb-tl-text {
  font-size: 13px;
  line-height: 1.35;
}

.rsb-assist {
  font-size: 11px;
  opacity: 0.7;
}

/* Fix oversized league icon in strip */
.rsb-league-header-pill img {
  width: 8px !important;
  height: 8px !important;
  object-fit: contain;
  display: block;
}

.rsb-league-header-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

/* Fix huge league logo in strip title area */
.rsb-league img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    margin-right: 9px;
    display: inline-block;
    vertical-align: middle;
}

.rsb-league {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* ------------------------------------------------------------------
   FORCE ALL LEAGUE LOGOS IN THE STRIP TO BE SMALL
-------------------------------------------------------------------*/

/* Any league logo sitting in the strip header area */
.roam-scoreboard-strip .rsb-league img,
.roam-scoreboard-page  .rsb-league img,
.roam-scoreboard-strip .rsb-league-header-pill img,
.roam-scoreboard-strip #rsb-center-sorter img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* Make sure the league text + icon sit on one line nicely */
.roam-scoreboard-strip .rsb-league,
.roam-scoreboard-page  .rsb-league {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Add space between league logo and league name */
.roam-scoreboard-strip .rsb-league img {
    margin-right: 12px !important;
}
.roam-scoreboard-strip .rsb-league {
    gap: 100px !important;
}

/* Remove bottom scrollbar */
.rsb-matches-track {
    overflow-x: auto;
    scrollbar-width: none;       /* Firefox */
}

.rsb-matches-track::-webkit-scrollbar {
    display: none !important;    /* Chrome, Safari */
}

/* Modern arrows */
.rsb-prev, .rsb-next {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s ease;
}

.rsb-prev:hover, .rsb-next:hover {
    background: rgba(0,0,0,0.15);
}

/* Arrow icons */
.rsb-prev::before {
    content: "❮";
    font-size: 16px;
    color: #333;
}

.rsb-next::before {
    content: "❯";
    font-size: 16px;
    color: #333;
}

/* Position arrows slightly better */
.roam-scoreboard-strip .rsb-prev,
.roam-scoreboard-strip .rsb-next {
    margin: 0 8px;
}

#rsb-center-sorter {
    display: flex;
    align-items: center;
    gap: 8px; /* <-- controls spacing */
}

#rsb-center-sorter img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
