/* FotMob-style fixtures & match detail on public site */

.bp-date-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bp-date-bar::-webkit-scrollbar { display: none; }
.bp-date-chip {
  flex: 0 0 auto;
  border: none;
  background: #f0f2f6;
  color: var(--bp-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.bp-date-chip.active {
  background: var(--bp-navy);
  color: #fff;
}

.fm-today-list,
.fm-league-body {
  display: flex;
  flex-direction: column;
}

#bpTodayCard {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#bpToday {
  flex: 1 1 auto;
  min-height: 320px;
  max-height: min(calc(100vh - var(--bp-header-h) - 240px), 880px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fm-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px minmax(0, 1fr);
  gap: 4px 6px;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--bp-border);
  background: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.fm-row:hover { background: #f8fafc; }
.fm-row-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--bp-muted);
  white-space: nowrap;
}
.fm-row-team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}
.fm-row-team--home {
  justify-content: flex-end;
  flex-direction: row-reverse;
  text-align: right;
}
.fm-row-team--away {
  justify-content: flex-start;
  text-align: left;
}
.fm-row-team img {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.fm-row-mid {
  justify-self: center;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--bp-muted);
  padding: 0 2px;
}
.fm-row-home,
.fm-row-away {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}
.fm-row-home { justify-content: flex-end; text-align: right; }
.fm-row-home span,
.fm-row-away span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-row-home img,
.fm-row-away img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.fm-row-score { font-size: 14px; font-weight: 800; color: var(--bp-navy); padding: 0 4px; }
.fm-team-name,
.fm-team-btn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.fm-league-card {
  border-bottom: 8px solid var(--bp-page-bg);
}
.fm-league-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: none;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  color: var(--bp-navy);
}
.fm-league-chev { color: var(--bp-muted); transform: rotate(90deg); transition: transform 0.15s; }
.fm-league-head.collapsed .fm-league-chev { transform: rotate(0deg); }
.fm-league-body.collapsed { display: none; }

/* Match detail modal */
.bp-match-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: grid;
  place-items: center;
  padding: 12px;
}
.bp-match-modal[hidden] { display: none !important; }
.bp-match-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(6, 20, 40, 0.65);
  backdrop-filter: blur(3px);
}
.bp-match-panel {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.bp-match-top {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, #e8f4fc, #fff 70%);
  padding: 12px 14px 0;
}
.bp-match-close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 18px;
}
.bp-match-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 28px 8px 16px;
}
.bp-match-scorers {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  font-size: 11px;
  color: var(--bp-muted);
  padding: 0 8px 8px;
  text-align: center;
}
.bp-match-scorers span:first-child { text-align: right; }
.bp-match-scorers span:last-child { text-align: left; }
.bp-match-scorers-ico { font-size: 10px; opacity: 0.7; }
.bp-match-time--score { font-size: 28px; letter-spacing: 0.02em; }
.bp-match-countdown {
  font-size: 13px;
  font-weight: 800;
  color: var(--bp-navy);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.bp-match-hero--upcoming .bp-match-time { font-size: 20px; }

.fm-lineup-filters {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
}
.fm-lineup-filters[hidden] { display: none !important; }
.fm-lov-btn {
  flex: 1;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--bp-border);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--bp-muted);
}
.fm-lov-btn.active {
  background: var(--bp-navy);
  color: #fff;
  border-color: var(--bp-navy);
}

.fm-pitch--dark {
  background: linear-gradient(180deg, #3a4049 0%, #2b3038 100%);
  border-color: rgba(255,255,255,0.12);
}
.fm-pitch--dark::before { border-color: rgba(255,255,255,0.18); }
.fm-lineup-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}
.fm-p-ov--club { font-size: 8px; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; margin: 0 auto; }

.bp-date-bar--scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px 12px;
  padding: 0 4px 4px;
}
.bp-date-bar-inner {
  display: flex;
  gap: 8px;
  min-width: min-content;
  padding-bottom: 2px;
}
.bp-league-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--bp-border);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.bp-league-pick:hover { background: #f8fafc; }
.bp-league-pick img { width: 28px; height: 28px; object-fit: contain; }
.bp-league-pick span { font-size: 14px; font-weight: 700; color: var(--bp-navy); flex: 1; }
.bp-league-pick-chev { color: var(--bp-muted); font-size: 18px; }
.bp-hl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 12px;
}
.bp-match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.bp-match-team--away { justify-content: flex-end; text-align: right; }
.bp-match-team img { width: 44px; height: 44px; object-fit: contain; }
.bp-match-team strong { display: block; font-size: 14px; color: var(--bp-navy); }
.bp-match-team span { font-size: 11px; color: var(--bp-muted); }
.bp-match-center { text-align: center; }
.bp-match-time { font-size: 22px; font-weight: 800; color: var(--bp-navy); }
.bp-match-score { font-size: 16px; font-weight: 800; margin-top: 4px; }
.bp-match-status { font-size: 12px; color: var(--bp-live); font-weight: 700; margin-top: 4px; }

.bp-match-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bp-border);
  padding: 0 8px;
}
.bp-match-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bp-muted);
  cursor: pointer;
  font-family: inherit;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.bp-match-tab.active {
  color: var(--bp-navy);
  border-bottom-color: var(--bp-navy);
}
.bp-match-tab[hidden] { display: none; }

.bp-match-body { padding: 16px; min-height: 280px; }
.bp-match-watch {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--bp-gold);
  color: var(--bp-navy-deep);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.bp-match-watch[hidden] { display: none; }
body.bp-match-open { overflow: hidden; }

.fm-preview-list { display: flex; flex-direction: column; gap: 8px; }
.fm-preview-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
}
.fm-preview-min { font-weight: 800; color: var(--bp-navy); min-width: 36px; }
.fm-preview-item--goal { border-left: 3px solid #22c55e; }
.fm-preview-item--card { border-left: 3px solid #eab308; }
.fm-preview-item--sub { border-left: 3px solid #3b82f6; }

.fm-lineup-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.fm-side-tab {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--bp-border);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.fm-side-tab.active { background: var(--bp-navy); color: #fff; border-color: var(--bp-navy); }

.fm-lineup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1b1f26;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.fm-lineup-bar img { width: 22px; height: 22px; object-fit: contain; }
.fm-lineup-bar strong { margin-left: auto; color: #7dd3a8; font-weight: 800; }
.fm-lineup-sub { font-size: 12px; color: var(--bp-muted); margin: 8px 0; }

.fm-pitch {
  position: relative;
  aspect-ratio: 0.72;
  border-radius: 12px;
  background: linear-gradient(180deg, #2ead5f, #248f4e);
  border: 2px solid rgba(255,255,255,0.25);
  overflow: hidden;
}
.fm-pitch::before {
  content: "";
  position: absolute;
  inset: 8% 10%;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 4px;
  pointer-events: none;
}
.fm-p-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 64px;
  text-align: center;
  z-index: 2;
}
.fm-p-photo {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid #fff;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  display: grid;
  place-items: center;
}
.fm-p-photo img { width: 100%; height: 100%; object-fit: cover; }
.fm-p-name {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fm-lineup-list { display: flex; flex-direction: column; gap: 6px; }
.fm-lineup-row { padding: 8px 0; border-bottom: 1px solid var(--bp-border); font-size: 13px; }

.fm-table-card { margin-bottom: 18px; overflow-x: auto; }
.fm-table-card h4 { font-size: 13px; margin-bottom: 8px; color: var(--bp-navy); }
.fm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fm-table th,
.fm-table td { padding: 8px 6px; border-bottom: 1px solid var(--bp-border); text-align: center; }
.fm-table th { color: var(--bp-muted); font-size: 10px; text-transform: uppercase; }
.fm-table-team { text-align: left !important; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.fm-table-team img { width: 18px; height: 18px; object-fit: contain; }

.fm-stats { display: flex; flex-direction: column; gap: 14px; }
.fm-stat-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.fm-stat-top span:first-child { text-align: right; }
.fm-stat-label { color: var(--bp-muted); font-size: 11px; font-weight: 600; }
.fm-stat-bar {
  height: 6px;
  border-radius: 999px;
  background: #e8edf3;
  overflow: hidden;
}
.fm-stat-bar span {
  display: block;
  height: 100%;
  background: var(--bp-navy);
  border-radius: 999px;
}

/* Highlights video modal */
.bp-hl-modal {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: grid;
  place-items: center;
  padding: 16px;
}
.bp-hl-modal[hidden] { display: none !important; }
.bp-hl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
}
.bp-hl-panel {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  background: #0a1628;
  border-radius: 14px;
  overflow: hidden;
}
.bp-hl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #fff;
}
.bp-hl-head h3 { font-size: 14px; font-weight: 700; padding-right: 12px; }
.bp-hl-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
}
.bp-hl-video-wrap {
  aspect-ratio: 16/9;
  background: #000;
}
.bp-hl-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}
.bp-hl-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  background: rgba(0,0,0,0.45);
  pointer-events: none;
}
.bp-hl-status.hidden { display: none; }
.bp-hl-video-wrap { position: relative; }
.bp-hl-item--lg .bp-hl-thumb { width: 120px; height: 72px; }
body.bp-hl-open { overflow: hidden; }

.fm-team-btn {
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: inherit;
}
.fm-team-btn:hover { color: var(--bp-gold); text-decoration: underline; }
.fm-team-btn--hero {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-align: left;
}
.bp-match-team--away .fm-team-btn--hero { flex-direction: row; text-align: right; }

.bp-team-modal,
.bp-scorers-modal,
.bp-tg-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 16px;
}
.bp-team-modal[hidden],
.bp-scorers-modal[hidden],
.bp-tg-modal[hidden] { display: none !important; }
.bp-team-backdrop,
.bp-scorers-backdrop,
.bp-tg-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 40, 0.55);
  backdrop-filter: blur(2px);
}
.bp-team-panel,
.bp-scorers-panel {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(10, 30, 63, 0.25);
}
.bp-team-close,
.bp-scorers-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  cursor: pointer;
  font-size: 18px;
}
.bp-team-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px 12px;
  border-bottom: 1px solid var(--bp-border);
}
.bp-team-head img { width: 56px; height: 56px; object-fit: contain; }
.bp-team-head h2 { font-size: 20px; color: var(--bp-navy); margin: 0; }
.bp-team-head p { font-size: 12px; color: var(--bp-muted); margin: 4px 0 0; }
.bp-team-body { padding: 16px 20px 22px; }
.fm-team-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bp-border);
  font-size: 13px;
}
.fm-team-info-row span { color: var(--bp-muted); }
.fm-team-section { margin-top: 18px; }
.fm-team-section h4 { font-size: 14px; color: var(--bp-navy); margin-bottom: 10px; }
.fm-team-form { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-team-form-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.fm-team-form-chip--w { background: #1a9b4a; }
.fm-team-form-chip--d { background: #8a94a6; }
.fm-team-form-chip--l { background: #d63b3b; }
.fm-team-fixture {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bp-border);
  font-size: 13px;
}
.fm-team-fixture-score { font-weight: 800; min-width: 48px; color: var(--bp-navy); }
.fm-team-squad-group { margin-bottom: 14px; }
.fm-team-squad-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--bp-border);
  font-size: 13px;
}
.fm-team-squad-row img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.fm-team-squad-row small { color: var(--bp-muted); font-size: 11px; }

.bp-scorers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--bp-border);
}
.bp-scorers-head h3 { font-size: 16px; color: var(--bp-navy); margin: 0; }
.bp-scorers-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 8px;
  border-bottom: 1px solid var(--bp-border);
}
.bp-scorers-tab {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--bp-muted);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.bp-scorers-tab.active {
  color: var(--bp-navy);
  background: rgba(10, 30, 63, 0.06);
}
.bp-scorers-panel .bp-scorer-list { padding: 8px 16px 16px; max-height: 60vh; overflow: auto; }

.bp-tg-panel {
  position: relative;
  z-index: 2;
  width: min(380px, 100%);
  background: linear-gradient(155deg, var(--bp-navy), #152f5c);
  color: #fff;
  border-radius: 16px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(10, 30, 63, 0.35);
}
.bp-tg-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
}
.bp-tg-ico { font-size: 36px; margin-bottom: 8px; }
.bp-tg-panel h3 { font-size: 18px; margin-bottom: 8px; }
.bp-tg-panel p { font-size: 13px; opacity: 0.9; margin-bottom: 12px; line-height: 1.5; }
.bp-tg-list {
  list-style: none;
  text-align: left;
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 16px;
  padding: 0 8px;
}
.bp-tg-list li::before { content: "✓ "; color: var(--bp-gold); }
.bp-tg-join { width: 100%; justify-content: center; margin-bottom: 10px; }
.bp-tg-later {
  border: none;
  background: none;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
body.bp-team-open,
body.bp-scorers-open,
body.bp-tg-open { overflow: hidden; }

@media (max-width: 767px) {
  .bp-match-hero { grid-template-columns: 1fr; text-align: center; }
  .bp-match-team,
  .bp-match-team--away { justify-content: center; text-align: center; }
  .fm-row { grid-template-columns: 36px 1fr auto 1fr; padding: 10px 12px; }
}
