[x-cloak],
.hidden {
  display: none !important;
}

.loader-circle {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #2D8EFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-fade {
  position: relative;
  min-height: 200px;
}

.loading-fade>*:not(.matches-loader-overlay) {
  opacity: 0.4;
  pointer-events: none;
  filter: blur(1px);
}

.matches-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.matches-loader-overlay .loader-circle {
  position: sticky;
  top: 150px;
  /* Stay visible at the top area while scrolling */
}

/* Header */
.matches-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.matches-title {
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  margin: 0;
}

/* Buttons */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.btn-clear {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: background 0.2s ease;
  color: #232323;
}

.btn-clear:hover {
  background: #3b82f6;
}

/* League Dropdown */
.league-dropdown,
.country-dropdown {
  position: relative;
}

.league-toggle,
.country-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 25px;
  cursor: pointer;
  color: #232323;
  box-shadow: none;
  height: 46px;
}

.league-toggle:hover,
.country-toggle:hover {
  background: #2B8FFF;
  border: 1px solid #2B8FFF;
}

.league-toggle:hover svg path,
.country-toggle:hover svg path {
  fill: #fff;
}

.league-toggle svg,
.country-toggle svg {
  width: 14px;
  position: relative;
  top: 1px;
}

.league-arrow,
.country-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.league-dropdown.is-open .league-arrow,
.country-dropdown.is-open .country-arrow {
  transform: rotate(180deg);
}

/* Menu */
.league-menu,
.country-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 300px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
  display: none;
  z-index: 20;
}

.country-menu label.country-btn,
.league-menu label.league-btn {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.country-menu label.country-btn:hover,
.league-menu label.league-btn:hover,
.country-menu label.country-btn.checked,
.league-menu label.league-btn.checked {
  background: #2B8FFF;
  color: #fff;
}

.league-dropdown.is-open .league-menu,
.country-dropdown.is-open .country-menu {
  display: block;
}

.league-grid,
.country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.league-grid.single-column,
.country-grid.single-column {
  grid-template-columns: 1fr;
}

.league-item,
.country-item {
  padding: 8px 12px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
}

.league-item:hover,
.country-item:hover {
  background: #f3f4f6;
}

.league-item.is-active,
.country-item.is-active {
  background: #f3f4f6;
  font-weight: 600;
}

/* Filters wrapper */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

/* Live button */
.btn-live {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #2563eb;
  color: #2563eb;
  cursor: pointer;
  white-space: nowrap;
  height: 45px;
}

.live-dot {
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
}

.live-text {
  font-weight: 500;
  font-size: 14px;
}

/* Right side */
.filters-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
}

/* Search */
.search-box {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  background: #f3f4f6;
  border: none;
  border-radius: 12px;
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #9ca3af;
  pointer-events: none;
}

/* Date picker */
.date-trigger {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.datepicker-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.home-football-matches-inner1 {
  background: #ffffff;
  border: 1px solid #d1d5db;
  /* gray-300 */
  border-radius: 16px;
  /* rounded-xl */
  margin-bottom: 24px;
  /* mb-6 */

  padding: 23px;

  height: fit-content;
  /* h-fit */
}

.no-live-matches {
  font-size: 18px;
  text-align: center;
  color: red;
}

.matches-list .match-main .match-score .win {
  border: 1px solid #388e3c;
}

button#prev-btn,
button#next-btn,
button#set-date {
  box-shadow: none;
  background: transparent;
}

.all-match-list,
.live-match-list,
.dates-container {
  display: none;
}

.all-match-list.active,
.live-match-list.active {
  display: block;
}

.dates-container.active {
  display: grid;
  grid-auto-flow: column;
  overflow-x: auto;
  overflow-y: hidden;
}

button#filter-live:hover,
button#filter-live:focus,
.league-toggle:focus,
.country-toggle:focus {
  background: transparent;
  color: #3b82f6;
}

.league-toggle:focus svg path,
.country-toggle:focus svg path {
  fill: #3b82f6;
}

button#filter-live.active {
  background: #3b82f6;
  color: #fff;
}

button#filter-live.active span.live-dot {
  box-shadow: 0px 0px 6px #fff;
}

.match-row.live_match .match-time,
.match-row.live_match .match-score {
  border-color: orange;
  color: orange;
}

#home-filter-form {
  flex: 1;
  display: flex;
  gap: 12px;
}

div#dates-list a.active.bg-blue-500 {
  background: #3b82f6;
}

.dates-container.mb-8 {
  margin-bottom: 2rem;
}

details.competition {
  margin-bottom: 20px;
}


.dates-wrapper {
  overflow: hidden;
  flex: 1;
}

.dates-list {
  margin: 0 2px;
  display: grid;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.dates-list::-webkit-scrollbar {
  display: none;
}

.date-item {
  scroll-snap-align: center;
  flex-shrink: 0;
}

.date-item.active {
  color: #ffffff !important;
}

@media(max-width:600px) {
  .dates-list {
    gap: .9rem;
  }

  .date-item {
    padding: 0.8rem !important;
    font-size: 14px !important;
  }
}


/* =====================
   COMPETITION
===================== */
.competition {
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  overflow: hidden;
}

.competition-header {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: #f9fafb;
  cursor: pointer;
  list-style: none;
}

.competition-header::-webkit-details-marker {
  display: none;
}

/* Header left */
.competition-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.competition-logo {
  width: 25px;
  height: 33px;
  border-radius: 50%;
  object-fit: contain;
}

.competition-title {
  font-size: 14px;
  font-weight: 600;
}

.competition-week {
  font-size: 14px;
  color: #6b7280;
}

/* Header right */
.competition-right {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
  white-space: nowrap;
}

.arrow-icon {
  width: 16px;
  height: 16px;
  color: #6b7280;
  transition: transform 0.2s ease;
}

.competition[open] .arrow-icon {
  transform: rotate(180deg);
}

/* =====================
   MATCH ROW
===================== */
.match-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  justify-content: center;
  align-items: center;
  text-decoration: none !important;
  color: #232323;
}

a.match-row:hover {
  color: #232323;
}

.match-row:last-child {
  border-bottom: none;
}


.team span {
  font-family: Manrope;
  font-weight: 700;
  font-size: 13px;
  line-height: 100%;
}

/* Time */
.match-time {
  width: 60px;
  height: 60px;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-flow: column;
  line-height: normal;
  gap: 2px;
}

/* Main */
.match-main {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  flex: 1;
}

/* Teams */
.match-teams {
  flex: 1;
  display: flex;
  flex-flow: column;
  justify-content: center;
  gap: 11px;
}

.team {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

div#dates-list a {
  text-decoration: none;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
}

.team img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

/* Score */
.match-score {
  display: grid;
  gap: 8px;
}

.match-score div {
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.match-row.live_match .match-score div {
  border-color: orange;
}

/* Odds */
.match-odds {
  width: 220px;
}

.odds-header {
  display: flex;
  font-size: 9px;
  color: #6b7280;
  margin-bottom: 4px;
}

.odds-header span {
  flex: 1;
  text-align: center;
}

.odds-grid {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  overflow: hidden;
}

.odd {
  flex: 1;
  text-align: center;
}

.odd:not(:last-child) {
  border-right: 1px solid #e5e7eb;
}

.odd-value {
  padding: 1px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
}

.odd-bookmaker {
  padding: 8px;
  background: #f3f4f6;
  text-align: center;
  display: flex;
  justify-content: center;
}

.odd-bookmaker img {
  height: 16px;
  border-radius: 10px;
}

.select2-container--default .select2-selection--single {
  background-color: #F5F5FA;
  border: none;
  border-radius: 50px !important;
  padding: 9px 35px 9px 27px !important;
  height: auto !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  font-weight: 400;
  font-size: 14px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

.select2-container--open .select2-dropdown--below {
  top: -2px;
  border-radius: 5px;
}


@media screen and (max-width: 1180px) {
  .home-football-matches-inner1 {
    padding: 15px;
  }

  .home-football-matches-inner button#filter-live {
    height: 35px;
  }

  .league-toggle,
  .country-toggle {
    height: 35px;
    padding: 8px 14px;
  }

  .select2-container--default .select2-selection--single {
    padding: 0px 22px 0px 14px !important;
    height: 35px !important;
  }

  .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 35px;
  }

  button#set-date svg {
    height: 32px;
    padding: 0 !important;
  }

  button#set-date {
    padding: 0;
  }

}




@media screen and (max-width: 998px) {

  div#dates-list {
    gap: 8px;
  }

  .team span {
    line-height: 16px;
  }


  button#prev-btn,
  button#next-btn {
    height: 36px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  button#set-date {
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
  }

  .filters-bar {
    position: relative;
    align-items: flex-start;
    flex-flow: column;
  }


  .filters-right {
    position: unset;
    width: 100%;
  }

  #home-filter-form {
    width: 100%;
    justify-content: space-between;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .search-box {
    width: 100%;
    flex: auto;
  }

  div#dates-list a {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  #home-filter-form {
    flex-flow: column;
  }
}

@media screen and (min-width: 768px) and (max-width: 850px),
screen and (max-width: 600px) {

  .match-main {
    justify-content: space-between !important;
    width: 100%;
  }

  .match-row {
    flex-flow: column;
    gap: 8px;
    padding: 12px;
  }

  .match-time {
    width: 100%;
    min-height: 25px;
    height: auto;
    padding: 3px 0;
    border-width: 1px;
    flex-flow: row;
    gap: 6px;
  }

  .match-time:not(.anwp-blinking-text) span:before {
    content: "Match Time: ";
    font-size: 13px;
    font-weight: 500;
  }

  .match-score div {
    height: 30px;
    width: 30px;
  }

  .match-time.anwp-blinking-text {
    flex-flow: nowrap;
    gap: 7px;
  }

  .match-time.anwp-blinking-text span:first-child:before {
    content: "Live: ";
  }

  .match-time.finished span:before {
    content: none;
  }

}



@media screen and (max-width: 460px) {
  .competition-week {
    font-size: 12px;
    color: #6b7280;
  }

  .team {
    gap: 10px;
  }

  .match-main {
    gap: 10px;
  }

  .match-odds {
    display: flex;
    align-items: center;
    width: auto;
    gap: 9px;
  }

  .odds-header {
    flex-flow: column;
    gap: 10px;
    align-items: center;
  }

  .odds-grid {
    flex-flow: column;
  }

  .odd {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
    background: #f3f4f6;
    padding: 0 7px;
  }

  .odd-bookmaker {
    width: 46px;
    height: auto;
    padding: 6px 0;
    height: 13px;
  }

  .odd-bookmaker img {
    height: auto;
  }

  .odd-value {
    flex: 1;
  }


  .odds-grid .odd:last-child .odd-value {
    border: none;
  }

  .competition-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 15px;
  }

  .match-count {
    font-size: 12px;
  }
}


@media screen and (max-width: 420px) {

  .header-actions {
    justify-content: space-between;
  }

  .country-menu {
    left: 0;
    right: auto;
  }
}

/* Load More button */
.btn-load-more {
  display: inline-block;
  padding: 12px 32px;
  background-color: #1a56db;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-load-more:hover {
  background-color: #1648c2;
}

.btn-load-more:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}


/* Live mode: disable country/league/date controls */
.live-disabled {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease;
}


/* =====================
   RTL & OVERFLOW FIX
===================== */
#home-football-matches {
  overflow-x: hidden;
}

/* RTL: flip prev/next arrow buttons */
[dir="rtl"] button#prev-btn svg,
[dir="rtl"] button#next-btn svg {
  transform: scaleX(-1);
}

/* RTL: fix flatpickr calendar position on mobile */
@media screen and (max-width: 998px) {
  [dir="rtl"] .flatpickr-calendar {
    left: auto !important;
    right: 0 !important;
  }
}

/* RTL: flip absolute-positioned menus */
[dir="rtl"] .country-menu,
[dir="rtl"] .league-menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .search-icon {
  right: auto;
  left: 12px;
}

[dir="rtl"] .search-input {
  padding-right: 16px;
  padding-left: 36px;
}

/* RTL: move Live button to left (end) side */
[dir="rtl"] .btn-live {
  order: 1;
}

/* RTL: mobile column layout fixes */
@media screen and (max-width: 998px) {
  /* Reset Live button order so it stays on top row (like English) */
  [dir="rtl"] .btn-live {
    order: 0;
  }
  /* Calendar on left (end in RTL), opposite side of Live button */
  [dir="rtl"] button#set-date {
    right: auto;
    left: 0;
  }
}

/* RTL: competition-right margin */
[dir="rtl"] .competition-right {
  margin-left: unset;
  margin-right: auto;
}

/* RTL: fix the 420px breakpoint override */
@media screen and (max-width: 420px) {
  [dir="rtl"] .country-menu {
    left: auto;
    right: 0;
  }
}


/* FIFA World Cup gold frame - only league 2506 / competition 178644 (frame only) */
.competition.competition-wc,
.competition[data-id="178644"] {
  border: 2px solid #D4AF37;
}


/* RO 2026-09-07: compact match rows (desktop) — denser like SofaScore/Oddspedia */
@media (min-width: 601px){
  #home-football-matches .match-row{ gap:12px !important; padding:8px 14px !important; }
  #home-football-matches .match-time{ width:48px !important; height:40px !important; min-height:0 !important;
    border-width:1px !important; border-radius:8px !important; font-size:13px !important; gap:0 !important; }
  #home-football-matches .match-main{ gap:12px !important; }
  #home-football-matches .match-teams{ gap:7px !important; }
  #home-football-matches .team{ gap:9px !important; }
  #home-football-matches .team img{ width:20px !important; height:20px !important; }
  #home-football-matches .team span{ font-size:13px !important; }
  #home-football-matches .match-odds{ width:200px !important; gap:7px !important; }
  #home-football-matches .odds-header{ font-size:9px !important; margin-bottom:2px !important; }
  #home-football-matches .odds-grid{ border-radius:12px !important; }
  #home-football-matches .odd-value{ padding:2px 1px !important; font-size:11px !important; }
  #home-football-matches .odd-bookmaker{ padding:4px !important; }
  #home-football-matches .odd-bookmaker img{ height:13px !important; }
}


/* RO 2026-09-07b: homepage rows even tighter */
@media (min-width: 601px){
  #home-football-matches .match-row{ padding:6px 14px !important; gap:10px !important; }
  #home-football-matches .match-time{ width:44px !important; height:36px !important; font-size:12px !important; }
  #home-football-matches .match-teams{ gap:5px !important; }
  #home-football-matches .team img{ width:18px !important; height:18px !important; }
  #home-football-matches .team span{ font-size:12.5px !important; }
  #home-football-matches .odd-bookmaker{ padding:3px !important; }
  #home-football-matches .odd-bookmaker img{ height:12px !important; }
  /* group header spacing */
  #home-football-matches .comp-header, #home-football-matches .competition-head,
  #home-football-matches .league-head{ padding-top:8px !important; padding-bottom:8px !important; }
}

/* RO 2026-09-07: 1/X/2 corner labels inside odds grid (replaces HOME/DRAW/AWAY header) */
#home-football-matches .odds-header{ display:none !important; }
#home-football-matches .odds-grid .odd{ position:relative; }
#home-football-matches .odds-grid .odd + .odd{ border-left:1px solid #edf0f3; }
#home-football-matches .odds-grid .odd::before{
  position:absolute; top:3px; left:5px; font-size:8px; font-weight:700; color:#b9c0c9;
  line-height:1; letter-spacing:.02em; pointer-events:none;
}
#home-football-matches .odds-grid .odd:nth-child(1)::before{ content:"1"; }
#home-football-matches .odds-grid .odd:nth-child(2)::before{ content:"X"; }
#home-football-matches .odds-grid .odd:nth-child(3)::before{ content:"2"; }


/* RO 2026-09-07: compact competition/country group header */
@media (min-width:601px){
  #home-football-matches .competition-header{ padding:4px 12px !important; gap:8px !important; }
  #home-football-matches .competition-left{ gap:9px !important; }
  #home-football-matches .competition-logo{ width:20px !important; height:20px !important; }
  #home-football-matches .competition-logo svg,
  #home-football-matches .competition-logo .fl-flag--rounded{ width:20px !important; height:20px !important; }
  #home-football-matches .competition-title{ font-size:13px !important; line-height:1.15 !important; }
  #home-football-matches .competition-week{ font-size:11px !important; line-height:1.1 !important; }
  #home-football-matches .match-count{ font-size:12px !important; }
  #home-football-matches .arrow-icon{ width:14px !important; height:14px !important; }
}


/* RO 2026-09-07: proportional finished-match score boxes (homepage compact rows) */
@media (min-width:601px){
  #home-football-matches .match-score{ gap:3px !important; }
  #home-football-matches .match-score div{ width:26px !important; height:26px !important; min-width:26px !important; font-size:12px !important; border-radius:6px !important; }
}

/* RO no-circle: never show circular loaders on homepage */
.loader-circle,.matches-loader-overlay,#ro-nav-overlay,#sidebar-loader{display:none!important;}
.loading-fade>*:not(.matches-loader-overlay){opacity:1!important;filter:none!important;pointer-events:auto!important;}

/* ===== RO My leagues (favorites): star on league headers, pinned to top, chip + panel ===== */
/* Star: real <button>, fully reset so Astra's global button styles can't leak in */
#home-football-matches button.ro-fav-star,
#home-football-matches button.ro-fav-star:hover,
#home-football-matches button.ro-fav-star:focus,
#home-football-matches button.ro-fav-star:active{
  all:unset; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; margin-right:6px; border-radius:50%; color:#c3ccd6; cursor:pointer; flex:none;
  position:relative; z-index:3; touch-action:manipulation; -webkit-tap-highlight-color:transparent; user-select:none;
  transition:color .15s ease, background-color .15s ease, transform .15s ease;
}
#home-football-matches button.ro-fav-star svg{ width:18px; height:18px; display:block; pointer-events:none; }
#home-football-matches button.ro-fav-star:hover{ color:#f5b301; background:#fff7db; }
#home-football-matches button.ro-fav-star.is-on{ color:#f5b301; }
#home-football-matches button.ro-fav-star.ro-pop{ transform:scale(1.35); }
#home-football-matches button.ro-fav-star:focus-visible{ outline:2px solid #2B8FFF; outline-offset:2px; }
#home-football-matches details.competition.ro-fav-on > summary.competition-header{ background:#fffbea; }
#home-football-matches details.competition.ro-fav-on{ border-color:#f5d97a; }

/* Chip */
.ro-fav-wrap{ position:relative; }
.ro-fav-chip{ gap:6px; }
.ro-fav-chip.has-favs{ border-color:#f5b301; color:#b07d00; background:#fffbea; }
.ro-fav-chip .ro-fav-count{ display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:#e9eef5; color:#1f2937; font-size:12px; font-weight:700; }
.ro-fav-chip.has-favs .ro-fav-count{ background:#f5b301; color:#fff; }

/* Panel */
.ro-fav-panel{ position:absolute; top:calc(100% + 8px); left:0; z-index:60; width:320px; max-width:calc(100vw - 32px); background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  box-shadow:0 12px 32px rgba(17,24,39,.14); padding:8px; cursor:default; user-select:none; text-align:left; }
.ro-fav-head{ font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#6b7280; padding:6px 10px 6px; }
.ro-fav-item{ display:flex; align-items:center; gap:10px; padding:8px 6px 8px 10px; border-radius:10px; font-size:13.5px; line-height:1.3; color:#111827; }
.ro-fav-item + .ro-fav-item{ margin-top:2px; }
.ro-fav-item:hover{ background:#f6f8fb; }
.ro-fav-item .ro-fav-flag{ flex:none; width:20px; height:14px; border-radius:2px; }
.ro-fav-item .ro-fav-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.ro-fav-panel button.ro-fav-remove,
.ro-fav-panel button.ro-fav-remove:hover,
.ro-fav-panel button.ro-fav-remove:focus,
.ro-fav-panel button.ro-fav-remove:active{
  all:unset; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:28px; height:28px; border-radius:50%; color:#9ca3af; font-size:20px; line-height:1; cursor:pointer;
  touch-action:manipulation; -webkit-tap-highlight-color:transparent; transition:background-color .15s ease, color .15s ease;
}
.ro-fav-panel button.ro-fav-remove:hover{ background:#fee2e2; color:#dc2626; }
.ro-fav-panel button.ro-fav-remove:focus-visible{ outline:2px solid #2B8FFF; outline-offset:1px; }
.ro-fav-empty{ padding:12px 10px; font-size:13px; color:#374151; line-height:1.45; }
.ro-fav-foot{ font-size:11px; color:#9ca3af; padding:8px 10px 2px; border-top:1px solid #f1f3f6; margin-top:6px; }

/* Hint */
.ro-fav-hint{ position:absolute; right:0; top:calc(100% + 8px); z-index:50; background:#111827; color:#fff; font-size:12px; font-weight:600; padding:7px 10px; border-radius:8px; white-space:nowrap;
  box-shadow:0 8px 20px rgba(0,0,0,.18); animation:ro-fav-in .25s ease both; pointer-events:none; }
.ro-fav-hint::before{ content:""; position:absolute; top:-5px; right:14px; border:5px solid transparent; border-top:0; border-bottom-color:#111827; }
.ro-fav-hint.is-out{ opacity:0; transition:opacity .4s ease; }
@keyframes ro-fav-in{ from{ opacity:0; transform:translateY(-4px);} to{ opacity:1; transform:none; } }

/* Mobile: bigger thumb target, panel fits the screen */
@media (max-width:600px){
  #home-football-matches button.ro-fav-star{ width:36px; height:36px; margin-right:0; }
  #home-football-matches button.ro-fav-star svg{ width:20px; height:20px; }
  .ro-fav-panel{ left:0; right:auto; width:min(340px, calc(100vw - 24px)); }
}

/* RO: mobile — keep "My leagues" on the same row as Live (filters-bar is a column on <=998px) */
.ro-fav-chip{ font-size:14px; font-weight:500; line-height:1; height:45px; padding:8px 14px; margin:0 !important; vertical-align:middle; box-sizing:border-box; }
.ro-fav-wrap{ display:flex; align-items:center; align-self:stretch; }
#filter-live{ align-self:center; }
@media screen and (max-width:998px){
  .filters-bar{ flex-flow:row wrap !important; align-items:center !important; gap:10px 8px; }
  #filter-live, .ro-fav-wrap{ flex:0 0 auto; }
  .filters-right{ flex:1 1 100%; width:100%; }
  .ro-fav-chip{ height:45px; padding:8px 14px; }
  .ro-fav-chip .ro-fav-count{ min-width:18px; height:18px; font-size:11px; }
  .ro-fav-panel{ left:0; right:auto; }
}

/* RO: "My leagues" chip mirrors the Live button's tablet/phone sizing exactly (same media query) */
@media screen and (max-width: 1180px) {
  .home-football-matches-inner .ro-fav-chip { height: 35px; }
}

/* ===== RO league header (2026-09-18): count as a circle, star at the far right, no "Match week" line ===== */
#home-football-matches .competition-week{ display:none !important; }
#home-football-matches .competition-right{ display:flex !important; align-items:center; gap:6px; }
#home-football-matches .match-count{ order:1; font-size:0 !important; line-height:0; display:inline-flex; align-items:center; }
#home-football-matches .match-count span{
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:24px; height:24px; padding:0 6px;
  border-radius:999px; background:#eef2f7; color:#374151; font-size:12px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums;
}
#home-football-matches details.competition.ro-fav-on .match-count span{ background:#fdf0c2; color:#6b4e00; }
#home-football-matches .competition-right .arrow-box{ order:2; }
#home-football-matches .competition-right button.ro-fav-star{ order:3; margin-right:0; margin-left:2px; }
[dir="rtl"] #home-football-matches .competition-right button.ro-fav-star{ margin-left:0; margin-right:2px; }

/* ===== RO header row (2026-09-18): Live | My leagues | date strip | calendar on one row; search + filters below ===== */
.filters-bar{ flex-flow:row wrap !important; align-items:center !important; position:relative; }
.filters-bar > #filter-live{ order:1; flex:0 0 auto; }
.filters-bar > .ro-fav-wrap{ order:2; flex:0 0 auto; }
.filters-bar > .dates-container{ order:3; flex:1 1 0; min-width:0; margin:0 !important; }
.filters-bar > .dates-container.active{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; overflow:hidden; }
.filters-bar > .dates-container #prev-btn, .filters-bar > .dates-container #next-btn{ padding:6px 8px !important; }
.filters-bar > .dates-container .date-item{ padding:8px 14px !important; font-size:14px; }
.filters-bar > button#set-date{ order:4; position:static !important; flex:0 0 auto; margin-left:auto; }
.filters-bar > .filters-right{ order:5; flex:1 1 100%; width:100%; }
@media screen and (max-width:700px){
  .filters-bar > button#set-date{ order:3; }
  .filters-bar > .dates-container{ order:4; flex:1 1 100%; }
  .filters-bar > .dates-container .date-item{ padding:7px 12px !important; font-size:13px; }
}

/* RO: never let the card be scrolled sideways (overflow:hidden is still script-scrollable; clip is not) */
#home-football-matches{ overflow-x:clip !important; }

/* ===== RO My leagues chip in the search row: Search | My leagues | Country | Leagues ===== */
#home-filter-form .header-actions .ro-fav-wrap{ flex:0 0 auto; align-self:center; }
#home-filter-form .header-actions .ro-fav-chip{ white-space:nowrap; }
#home-filter-form .search-box{ min-width:120px; }
@media screen and (max-width:998px){
  #home-filter-form .header-actions .ro-fav-wrap{ margin-inline-end:auto; }   /* chip left, Country/Leagues right */
  #home-filter-form .header-actions{ gap:8px; }
}
@media screen and (max-width:420px){
  #home-filter-form .header-actions .ro-fav-chip > span:not(.ro-fav-count){ display:none; }   /* star + count only on small phones */
}

/* RO calendar popup: keep it inside the viewport and above the sidebar cards */
.flatpickr-calendar{ z-index:100000 !important; max-width:calc(100vw - 16px); }
.filters-bar > button#set-date{ position:relative !important; }

/* ===== RO search toggle: icon next to the calendar; the field only appears on demand ===== */
#home-football-matches button.ro-search-toggle,
#home-football-matches button.ro-search-toggle:hover,
#home-football-matches button.ro-search-toggle:focus{
  all:unset; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:12px; cursor:pointer;
  -webkit-tap-highlight-color:transparent; transition:background-color .15s ease;
}
#home-football-matches button.ro-search-toggle:hover{ background:#f3f6fb; }
#home-football-matches button.ro-search-toggle:focus-visible{ outline:2px solid #2B8FFF; outline-offset:2px; }
#home-football-matches .filters-bar.ro-search-open button.ro-search-toggle{ background:#e8f2ff; }
#home-football-matches .filters-bar.ro-search-open button.ro-search-toggle svg circle,
#home-football-matches .filters-bar.ro-search-open button.ro-search-toggle svg path{ stroke:#2B8FFF; }
.filters-bar > button.ro-search-toggle{ order:4; flex:0 0 auto; margin-left:auto; }
.filters-bar > button#set-date{ order:5; margin-left:0; }
.filters-bar > .filters-right{ order:6; }
/* field hidden until opened; when open it takes its own full row above My leagues / Country / Leagues */
#home-filter-form{ flex-wrap:wrap; }
#home-filter-form .search-box{ display:none; }
.filters-bar.ro-search-open #home-filter-form .search-box{ display:block; order:-1; flex:1 1 100%; width:100%; animation:roSearchIn .16s ease-out; }
@keyframes roSearchIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
/* without the field: My leagues on the left, Country / Leagues on the right */
#home-filter-form .header-actions{ width:100%; flex:1 1 100%; }
#home-filter-form .header-actions .ro-fav-wrap{ margin-inline-end:auto; }
@media screen and (max-width:700px){
  .filters-bar > button.ro-search-toggle{ order:3; }
  .filters-bar > button#set-date{ order:3; margin-left:0; }
  #home-football-matches button.ro-search-toggle{ width:34px; height:34px; }
  #home-football-matches button.ro-search-toggle svg{ width:28px; height:28px; }
}
[dir="rtl"] .filters-bar > button.ro-search-toggle{ margin-left:0; margin-right:auto; }

/* RO search icon far right: ... date strip | calendar | search */
.filters-bar > button#set-date{ order:4 !important; margin-left:auto !important; margin-right:0 !important; }
.filters-bar > button.ro-search-toggle{ order:5 !important; margin-left:0 !important; margin-right:0 !important; }
[dir="rtl"] .filters-bar > button#set-date{ margin-left:0 !important; margin-right:auto !important; }
@media screen and (max-width:700px){
  .filters-bar > button#set-date{ order:2 !important; }
  .filters-bar > button.ro-search-toggle{ order:3 !important; }
}

/* ===== RO Live in the filters row: [dates | calendar | search]  /  [Live | My leagues ...... Country | Leagues] ===== */
#home-filter-form .header-actions > #filter-live{ flex:0 0 auto; align-self:center; margin:0; white-space:nowrap; }
.filters-bar > .dates-container{ order:1 !important; flex:1 1 0 !important; }
@media screen and (max-width:700px){
  .filters-bar > .dates-container{ order:1 !important; flex:1 1 0 !important; min-width:0; }
}
@media screen and (max-width:520px){
  #home-filter-form .header-actions{ flex-wrap:wrap; row-gap:8px; }
}

/* ===== RO mobile: one filters row (Live | My leagues | Country | Leagues) + menus as a bottom sheet ===== */
@media screen and (max-width:700px){
  #home-filter-form .header-actions{ flex-wrap:nowrap !important; gap:6px !important; justify-content:space-between; width:100%; }
  #home-filter-form .header-actions > #filter-live,
  #home-filter-form .header-actions .country-toggle,
  #home-filter-form .header-actions .league-toggle,
  #home-filter-form .header-actions .ro-fav-chip{
    height:34px !important; padding:0 10px !important; font-size:12.5px !important; line-height:1 !important; gap:5px !important; white-space:nowrap; box-sizing:border-box;
  }
  #home-filter-form .header-actions > #filter-live{ flex:1 1 auto; justify-content:center; min-width:0; }
  #home-filter-form .header-actions .ro-fav-wrap{ flex:0 0 auto; margin-inline-end:0 !important; }
  #home-filter-form .header-actions .ro-fav-chip > span:not(.ro-fav-count){ display:none; }      /* star + count */
  #home-filter-form .header-actions .country-dropdown,
  #home-filter-form .header-actions .league-dropdown{ flex:1 1 auto; min-width:0; position:static; }
  #home-filter-form .header-actions .country-toggle,
  #home-filter-form .header-actions .league-toggle{ width:100%; justify-content:center; }
  #home-filter-form .header-actions .country-toggle svg,
  #home-filter-form .header-actions .league-toggle svg{ width:10px; flex:none; }
  #home-filter-form .header-actions .live-dot{ flex:none; }

  /* menus: fixed bottom sheet -> can never be clipped by the card or hidden under the match list */
  #home-football-matches .country-menu,
  #home-football-matches .league-menu,
  #home-football-matches .ro-fav-panel{
    position:fixed !important; left:10px !important; right:10px !important; bottom:10px !important; top:auto !important;
    width:auto !important; max-width:none !important; z-index:100000 !important; border-radius:16px; border:1px solid #e5e7eb;
    box-shadow:0 -6px 40px rgba(17,24,39,.28), 0 0 0 100vmax rgba(17,24,39,.35);
  }
  #home-football-matches .country-grid,
  #home-football-matches .league-grid{ max-height:60vh; }
  #home-football-matches .ro-fav-panel{ max-height:70vh; overflow-y:auto; }
  #home-football-matches .country-menu label.country-btn,
  #home-football-matches .league-menu label.league-btn{ padding:11px 12px; font-size:15px; }
}

/* ===== RO dropdown filter: type-to-find box + close button inside the Country / Leagues menus ===== */
#home-football-matches .ro-dd-head{ display:flex; align-items:center; gap:8px; padding:8px 8px 6px; border-bottom:1px solid #f1f3f6; position:sticky; top:0; background:#fff; border-radius:8px 8px 0 0; z-index:1; }
#home-football-matches input.ro-dd-input{
  flex:1 1 auto; min-width:0; width:auto; height:38px !important; padding:0 12px !important; margin:0 !important; box-sizing:border-box;
  background:#f3f4f6 !important; border:1px solid transparent !important; border-radius:10px !important; box-shadow:none !important; font-size:14px !important; color:#111827 !important; outline:none;
}
#home-football-matches input.ro-dd-input:focus{ background:#fff !important; border-color:#2B8FFF !important; box-shadow:0 0 0 3px rgba(43,143,255,.15) !important; }
#home-football-matches button.ro-dd-close,
#home-football-matches button.ro-dd-close:hover,
#home-football-matches button.ro-dd-close:focus{
  all:unset; box-sizing:border-box; flex:none; width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  font-size:24px; line-height:1; color:#6b7280; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:background-color .15s ease, color .15s ease;
}
#home-football-matches button.ro-dd-close:hover{ background:#f3f4f6; color:#111827; }
#home-football-matches button.ro-dd-close:focus-visible{ outline:2px solid #2B8FFF; outline-offset:1px; }
#home-football-matches .ro-dd-hide{ display:none !important; }
#home-football-matches .ro-dd-empty{ padding:14px 12px 16px; text-align:center; color:#6b7280; font-size:14px; }
#home-football-matches .ro-dd-empty[hidden]{ display:none; }
@media screen and (max-width:700px){
  #home-football-matches .ro-dd-head{ padding:10px 10px 8px; border-radius:16px 16px 0 0; }
  #home-football-matches input.ro-dd-input{ height:42px !important; font-size:16px !important; }   /* 16px = no iOS zoom on focus */
  /* Country / Leagues menus have a search box: keep them docked to the TOP of the screen on phones, always.
     (Moving the sheet only when the box got focus made it jump away under the finger mid-tap, so the tap landed outside the menu and closed it;
      docked at the top it never moves and the on-screen keyboard cannot cover it.) */
  #home-football-matches .country-menu,
  #home-football-matches .league-menu{ top:10px !important; bottom:auto !important; }
  #home-football-matches .country-menu .country-grid,
  #home-football-matches .league-menu .league-grid{ max-height:44vh; }
}

/* ===== RO filters row: compact buttons, in proportion with the date pills (all widths; phones keep their own 34px rule) ===== */
@media screen and (min-width:701px){
  #home-filter-form .header-actions{ gap:8px !important; }
  #home-filter-form .header-actions > #filter-live,
  #home-filter-form .header-actions .country-toggle,
  #home-filter-form .header-actions .league-toggle,
  #home-filter-form .header-actions .ro-fav-chip{
    height:36px !important; padding:0 14px !important; font-size:13.5px !important; font-weight:600; line-height:1 !important; gap:6px !important; box-sizing:border-box; border-width:1px !important;
  }
  #home-filter-form .header-actions .ro-fav-chip svg{ width:14px; height:14px; }
  #home-filter-form .header-actions .ro-fav-chip .ro-fav-count{ min-width:18px; height:18px; font-size:11px; line-height:18px; }
  #home-filter-form .header-actions .country-toggle svg,
  #home-filter-form .header-actions .league-toggle svg{ width:11px; }
  #home-filter-form .header-actions .live-dot{ width:9px; height:9px; }
  .filters-bar{ gap:10px 12px !important; margin-bottom:18px !important; }
}

/* ===== RO icon buttons (calendar + search): same 36px bordered buttons as the filter row ===== */
#home-football-matches .filters-bar > button#set-date,
#home-football-matches .filters-bar > button.ro-search-toggle,
#home-football-matches .filters-bar > button#set-date:focus,
#home-football-matches .filters-bar > button.ro-search-toggle:focus{
  box-sizing:border-box !important; width:36px !important; height:36px !important; min-width:36px; padding:0 !important; flex:0 0 36px !important;
  display:inline-flex !important; align-items:center; justify-content:center; background:#fff !important; border:1px solid #d1d5db !important; border-radius:50% !important;
  box-shadow:none !important; cursor:pointer; transition:background-color .15s ease, border-color .15s ease;
}
#home-football-matches .filters-bar > button#set-date svg,
#home-football-matches .filters-bar > button.ro-search-toggle svg{ width:17px !important; height:17px !important; padding:0 !important; display:block; flex:none; }
#home-football-matches .filters-bar > button#set-date svg path,
#home-football-matches .filters-bar > button.ro-search-toggle svg path,
#home-football-matches .filters-bar > button.ro-search-toggle svg circle{ stroke-width:2.4; transition:stroke .15s ease; }
#home-football-matches .filters-bar > button#set-date:hover,
#home-football-matches .filters-bar > button.ro-search-toggle:hover{ background:#2B8FFF !important; border-color:#2B8FFF !important; }
#home-football-matches .filters-bar > button#set-date:hover svg path,
#home-football-matches .filters-bar > button.ro-search-toggle:hover svg path,
#home-football-matches .filters-bar > button.ro-search-toggle:hover svg circle{ stroke:#fff !important; }
#home-football-matches .filters-bar.ro-search-open > button.ro-search-toggle{ background:#e8f2ff !important; border-color:#2B8FFF !important; }
#home-football-matches .filters-bar.ro-search-open > button.ro-search-toggle:hover{ background:#2B8FFF !important; }
#home-football-matches .filters-bar > button#set-date:focus-visible,
#home-football-matches .filters-bar > button.ro-search-toggle:focus-visible{ outline:2px solid #2B8FFF; outline-offset:2px; }
.filters-bar > button.ro-search-toggle{ margin-left:-4px !important; }   /* the two icons sit as a pair */
@media screen and (max-width:700px){
  #home-football-matches .filters-bar > button#set-date,
  #home-football-matches .filters-bar > button.ro-search-toggle{ width:34px !important; height:34px !important; min-width:34px; flex-basis:34px !important; }
  #home-football-matches .filters-bar > button#set-date svg,
  #home-football-matches .filters-bar > button.ro-search-toggle svg{ width:16px !important; height:16px !important; }
}

/* RO 2026-09-22: odds show numbers only — no bookmaker logos / names on the homepage (covers server, live and date-switch renders) */
#home-football-matches .odd-bookmaker{ display:none !important; }
#home-football-matches .odd-value{ border-bottom:0 !important; padding:6px 4px !important; font-size:13px !important; font-weight:700 !important; }
@media (min-width:601px){ #home-football-matches .odd-value{ padding:5px 4px !important; font-size:12.5px !important; } }

/* RO mobile: compact match rows - time box on the side (like desktop) instead of a full-width bar above the teams */
@media (max-width:600px){
  #home-football-matches .match-row{flex-direction:row !important;flex-wrap:wrap !important;align-items:center !important;gap:10px !important;padding:8px 12px !important}
  #home-football-matches .match-time{width:52px !important;min-width:52px !important;height:auto !important;min-height:44px !important;flex-direction:column !important;gap:1px !important;padding:4px 2px !important;border-width:1px !important;border-radius:9px !important;font-size:12px !important;line-height:1.15 !important}
  #home-football-matches .match-time span::before,#home-football-matches .match-time span:first-child::before{content:none !important}
  #home-football-matches .match-main{flex:1 1 0 !important;min-width:0 !important;gap:10px !important}
  #home-football-matches .match-teams{gap:6px !important;min-width:0}
  #home-football-matches .team span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #home-football-matches .match-main{flex-wrap:nowrap !important;align-items:center !important}
  #home-football-matches .match-odds{flex:0 0 auto !important;width:auto !important}
  #home-football-matches .odds-grid{border-radius:10px !important;min-width:68px !important}
  #home-football-matches .odds-grid .odd{padding:0 7px 0 15px !important;gap:6px !important;min-height:0 !important}
  #home-football-matches .odds-grid .odd-value{text-align:right !important;padding-left:4px !important;font-size:11.5px !important;line-height:1.2 !important;padding:2px 0 !important}
  #home-football-matches .odds-grid .odd::before{font-size:8px !important;left:5px !important;top:50% !important;transform:translateY(-50%) !important;line-height:1 !important}
  #home-football-matches .odd-bookmaker{padding:2px 0 !important;height:auto !important}
  #home-football-matches .odd-bookmaker img{height:10px !important}
}
