/* ===============================
   LEAGUE CONTAINER
================================ */

.league {
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ===============================
   LEAGUE HEADER
================================ */

/* League content performance */
.league-content[hidden] {
  display: none !important;
}

/* Optional smooth arrow */
.league-header i {
  transition: transform 0.2s ease;
}

.league.open .league-header i {
  transform: rotate(180deg);
}

.league-header {
  width: 100%;
  background: var(--bg-primary);
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border: none;
}

.world-icon {
    font-size: 18px;
    color: var(--text-tertiary);
}


.league-header:hover {
  background: var(--bg-secondary);
}

/* LEFT SIDE */
.league-left {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
}

.league-name-link {
  color: inherit;
  text-decoration: none;
}
.league-name-link:hover {
  text-decoration: none;
  color: inherit;
}

/* RIGHT SIDE */
.league-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.country-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;

}
/* MATCH COUNT */
.league-match-count {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* ===============================
   ARROW
================================ */

.league-arrow {
  transition: transform 0.3s ease;
}

/* Rotate ONLY when open */
.league.open .league-arrow {
  transform: rotate(90deg);
}

/* ===============================
   FAVORITES
================================ */

.league-favorite {
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.25s ease, transform 0.15s ease;
}

.league-favorite:hover {
  transform: scale(1.1);
}

.league-favorite.active {
  color: #facc15;
}

/* ===============================
   LEAGUE CONTENT (ACCORDION BODY)
================================ */

/* CLOSED BY DEFAULT */
.league-content {
  display: none;
  padding: 0 !important;
  background: var(--bg-secondary);
}

/* OPEN STATE */
.league.open .league-content {
  display: block;
}

/* 
  Home Page Cards: 
  Force cards to sit completely flush edge-to-edge inside the accordion.
  Remove outer gaps, borders, shadow, and rounding. 
  Add a bottom border for separation between stacked matches.
*/
.league-content .prediction-card {
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: none !important;
  box-shadow: none !important;
  border-bottom: 8px solid var(--bg-primary) !important;
}

/* The last card in the accordion doesn't need a bottom separator */
.league-content .prediction-card:last-child {
  border-bottom: none !important;
}


/* =========================
   CENTER HEADER (FOREBET STYLE)
========================= */

/* Center header container */
.center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 20px;
    flex-wrap: nowrap;
    min-width: 0;
}

@media (min-width: 769px) {
    .home-content .home-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 9px 10px;
        padding: 8px 0 10px;
        margin-bottom: 10px;
    }

    .home-content .home-toolbar .prediction-types-wrapper {
        grid-column: 1 / -1;
        width: 100%;
    }

    .home-content .home-toolbar .prediction-types {
        width: 100%;
        max-width: none;
        gap: 6px;
    }

    .home-content .home-toolbar .ptype,
    .home-content .home-toolbar .status-btn,
    .home-content .home-toolbar .date-navigator,
    .home-content .home-toolbar > .gl-sound-toggle-btn {
        min-height: 36px;
        box-sizing: border-box;
    }

    .home-content .home-toolbar .ptype {
        min-width: 92px;
        padding: 8px 14px;
        font-size: 11px;
    }

    .home-content .home-toolbar .status-filters {
        justify-self: start;
        min-height: 36px;
        padding: 3px;
    }

    .home-content .home-toolbar .status-btn {
        padding: 7px 14px;
        font-size: 11px;
    }

    .home-content .home-toolbar > .gl-sound-toggle-btn {
        width: 36px;
        height: 36px;
        margin-left: 0;
        justify-self: end;
    }

    .home-content .home-toolbar .date-navigator {
        width: 190px;
        height: 36px;
        justify-self: end;
    }

    .home-content .home-toolbar .scroll-btn {
        width: 36px;
        height: 36px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--bg-primary);
    }
}
/* TITLE  */
.center-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 10px;
}

/* =========================
   PREDICTION TYPE SCROLLER
========================= */

/* Prediction types wrapper */
.prediction-types-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    flex-shrink: 1;
}


/* Prediction types scroll container */
.prediction-types {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    max-width: calc(3 * 89px + 2 * 10px); /* visible width of 3 buttons + gaps */
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* smooth on iOS */
    min-width: 0;
}

.prediction-types::-webkit-scrollbar {
    display: none;
}

/* Prediction type buttons */
.ptype {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;              /* allow content-based width */
    min-width: 89px;          /* consistent minimum width */
    padding: 10px 18px;        /* horizontal padding */
    white-space: nowrap;
    border-radius: 8px;
    border: none;
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 10px;
    cursor: pointer;
    color: var(--text-primary);
    box-sizing: border-box;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.ptype.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Scroll buttons left and right */
.scroll-btn {
    border: none;
   background-color: transparent;
    color: var(--text-primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    flex-shrink: 0;
    user-select: none;
    transition: background-color 0.3s ease;
}
.scroll-btn:hover {
    background: var(--bg-tertiary);
}

/* =========================
   STATUS FILTERS
========================= */

.status-filters {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: 8px;
    flex-shrink: 0;
}

.status-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
}

.status-btn:hover {
    color: var(--text-primary);
}

.status-btn.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =========================
   DATE NAVIGATOR (PILL)
========================= */

/* DATE NAVIGATOR */
.date-navigator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 180px;
    height: 30px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    font-family: system-ui, -apple-system, Segoe UI;
    flex-shrink: 0;
}

/* Date label */
.current-date {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    line-height: 36px;
    border-radius: 0;
    flex: 1;
    cursor: pointer;
    white-space: nowrap;
}

.current-date:hover {
  background-color: var(--bg-tertiary);
}


/* Arrow buttons */
.date-btn {
    width: 32px;
    height: 100%;
    border-radius: 50%;
    border: none;
    background: var(--bg-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
    box-shadow: 1px 1px 4px 1px rgb(0 0 0 / 10%);
    flex-shrink: 0;
}

.date-btn.left {
    border-radius: 999px 0 0 999px;
}
.date-btn.right {
    border-radius: 0 999px 999px 0;
}
.date-btn:hover {
    background: var(--bg-tertiary);
}

.date-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.league-controls {
  width: 100%;
  display: flex;
  justify-content: center;
}

.show-more {
  margin: 20px auto 0;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-weight: 700;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.league-loader {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid var(--border-color);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.home-switch-skeleton {
    display: grid;
    gap: 8px;
}

.home-switch-skeleton-row {
    display: grid;
    grid-template-columns: 30px minmax(120px, 230px) 34px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
}

.home-switch-skeleton-logo,
.home-switch-skeleton-copy,
.home-switch-skeleton-count {
    display: block;
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: home-switch-shimmer 1.15s linear infinite;
}

.home-switch-skeleton-logo {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.home-switch-skeleton-copy {
    width: 100%;
    height: 12px;
    border-radius: 4px;
}

.home-switch-skeleton-count {
    width: 34px;
    height: 24px;
    border-radius: 12px;
    justify-self: end;
}

@keyframes home-switch-shimmer {
    to { background-position: -200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── SKELETON LOADER ─────────────────────────────────────────────────── */

.skeleton-loader {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    gap: 12px;
    overflow: hidden;
}
.skeleton-line,
.skeleton-circle {
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-highlight) 50%,
        var(--skeleton-base) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
    flex-shrink: 0;
}

.skeleton-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.skeleton-name {
    height: 12px;
    width: 80%;
    border-radius: 4px;
}

.skeleton-odds {
    height: 10px;
    width: 50%;
    border-radius: 4px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
