/* ============================================================
   RSC Fixtures & Results — frontend styles v1.6
   Palette: #2279C5 blue / #1A1D24 charcoal / #6B7280 grey
   Font: Space Grotesk (loaded by theme)
   ============================================================ */

.rsc-page, .rsc-fixtures-wrap, .rsc-filters-wrap, .rsc-league-table-wrap {
    --rsc-blue:       #2279C5;
    --rsc-dark:       #1A1D24;
    --rsc-gold:       #F0B429;
    --rsc-grey-away:  #6B7280;
    --rsc-border:     #E2E8F0;
    --rsc-win-bg:     rgba(34,197,94,0.15);
    --rsc-win-text:   #15803d;
    --rsc-loss-bg:    rgba(239,68,68,0.12);
    --rsc-loss-text:  #b91c1c;
    --rsc-radius:     10px;
    font-family: 'Space Grotesk', sans-serif;
}

/* ============================================================
   Filter bar — two-row Reading FC style
   ============================================================ */

.rsc-fb-row1 {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-bottom: 0.5px solid #E2E8F0;
    flex-wrap: wrap;
    gap: 0;
}

.rsc-fb-teams {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.rsc-fb-team {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    margin-bottom: -0.5px;
}

.rsc-fb-team:hover { color: #1A1D24; }

.rsc-fb-team.active {
    color: #2279C5;
    border-bottom-color: #2279C5;
}

.rsc-fb-season {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 0 16px;
}

.rsc-fb-season-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748B;
    white-space: nowrap;
    line-height: 1;
}

.rsc-fb-season-pills {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rsc-fb-year {
    padding: 4px 12px;
    border: 1.5px solid #E2E8F0;
    border-radius: 100px;
    background: transparent;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.rsc-fb-year:hover { border-color: #2279C5; color: #2279C5; }

.rsc-fb-year.active {
    background: #2279C5;
    border-color: #2279C5;
    color: #fff;
}


/* ---- Season dropdown ---- */
.rsc-fb-season-select {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1A1D24;
    background: transparent;
    border: none;
    border-bottom: 2px solid #1A1D24;
    padding: 2px 24px 2px 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231A1D24' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    max-width: 160px;
    line-height: 1;
    vertical-align: middle;
}

.rsc-fb-season-select:focus {
    outline: none;
    border-bottom-color: #2279C5;
    color: #2279C5;
}

.rsc-fb-row2 {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 0.5px solid #E2E8F0;
    margin-bottom: 28px;
}

.rsc-fb-view {
    padding: 14px 22px;
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.01em;
    margin-bottom: -0.5px;
}

.rsc-fb-view:hover {
    color: #fff;
    background: rgba(34,121,197,0.12);
    border-radius: 6px 6px 0 0;
}

.rsc-fb-view.active {
    color: #fff;
    background: #2279C5;
    border-bottom-color: #2279C5;
    border-radius: 6px 6px 0 0;
}

/* ============================================================
   Panels
   ============================================================ */

.rsc-panel { display: none; }
.rsc-panel.active { display: block; }

/* ============================================================
   Month separator
   ============================================================ */

.rsc-month-sep {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94A3B8;
    text-align: center;
    padding: 20px 0 10px;
}

/* ============================================================
   Section titles (legacy shortcodes)
   ============================================================ */

.rsc-fixtures-wrap {
    max-width: 860px;
    color: #1A1D24;
}

.rsc-section { margin-bottom: 36px; }

.rsc-section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2279C5;
    margin: 0 0 12px;
}

/* ============================================================
   Fixture list
   ============================================================ */

.rsc-fixture-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   Fixture card
   ============================================================ */

.rsc-fixture-card {
    background: #fff;
    border: 0.5px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.rsc-fixture-card:hover {
    box-shadow: 0 2px 14px rgba(34,121,197,0.10);
}

.rsc-date-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
}

.rsc-date-bar.rsc-home { background: #2279C5; }
.rsc-date-bar.rsc-away { background: #6B7280; }

.rsc-date-bar-text {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.92);
}

.rsc-ha-tag {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.92);
}

.rsc-matchup-row {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 8px;
}

.rsc-team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.rsc-team-logo-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rsc-team-logo-lg {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.rsc-team-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #EBF4FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #2279C5;
    letter-spacing: 0.04em;
}

.rsc-team-block-name {
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    color: #1A1D24;
    line-height: 1.2;
}

.rsc-team-block-name.rsc-team-us { color: #2279C5; }

.rsc-centre {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 110px;
    flex-shrink: 0;
}

.rsc-score {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rsc-score-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #1A1D24;
}

.rsc-score-dash {
    font-size: 1.4rem;
    font-weight: 300;
    color: #CBD5E1;
    margin: 0 2px;
}

.rsc-score-tbd {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #94A3B8;
    text-transform: uppercase;
}

.rsc-result-pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
}

.rsc-result-pill.win  { background: rgba(34,197,94,0.15);  color: #15803d; }
.rsc-result-pill.loss { background: rgba(239,68,68,0.12);  color: #b91c1c; }
.rsc-result-pill.draw { background: #F1F5F9; color: #64748B; }

.rsc-venue {
    padding: 0 16px 14px;
    text-align: center;
}

.rsc-venue-link {
    font-size: 0.76rem;
    color: #2279C5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.rsc-venue-link:hover { text-decoration: underline; }
.rsc-venue-link svg { flex-shrink: 0; }

/* ============================================================
   Load more button
   ============================================================ */

.rsc-load-more-btn {
    display: inline-block;
    padding: 10px 28px;
    background: transparent;
    border: 2px solid #2279C5;
    border-radius: 100px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2279C5;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.18s ease;
}

.rsc-load-more-btn:hover { background: #2279C5; color: #fff; }
.rsc-load-more-btn:active { transform: scale(0.97); }

/* ============================================================
   Empty state
   ============================================================ */

.rsc-no-fixtures {
    padding: 32px;
    text-align: center;
    color: #94A3B8;
    font-style: italic;
}

/* ============================================================
   League Table
   ============================================================ */

.rsc-league-table-wrap {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 36px;
}

.rsc-table-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #2279C5;
    margin: 20px 0 16px;
}

.rsc-league-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: #fff;
    border: 0.5px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
}

.rsc-league-table thead tr {
    background: #F8FAFC;
    border-bottom: 1.5px solid #E2E8F0;
}

.rsc-league-table thead th {
    padding: 10px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748B;
    text-align: center;
    white-space: nowrap;
}

.rsc-league-table thead th:nth-child(2),
.rsc-league-table tbody td:nth-child(2) {
    text-align: left;
    padding-left: 12px;
}

.rsc-league-table tbody tr { transition: background 0.1s; }

.rsc-league-table tbody td {
    padding: 11px 8px;
    text-align: center;
    color: #1A1D24;
    vertical-align: middle;
    border-top: 0.5px solid #E2E8F0;
    font-size: 0.82rem;
}

.rsc-league-table tbody tr:first-child td { border-top: none; }
.rsc-league-table tbody tr:hover { background: #F8FAFC; }

.rsc-league-table tbody td:first-child {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
    width: 32px;
}

.rsc-league-table tbody td:nth-child(2) { font-weight: 600; }
.rsc-league-table tbody td:nth-last-child(2) { font-weight: 700; font-size: 0.9rem; }

.rsc-league-table tbody tr.rsc-table-highlight { background: rgba(34,121,197,0.08); }
.rsc-league-table tbody tr.rsc-table-highlight td:first-child {
    border-left: 3px solid #2279C5;
    padding-left: 5px;
}
.rsc-league-table tbody tr.rsc-table-highlight td:nth-child(2) { color: #2279C5; font-weight: 700; }
.rsc-league-table tbody tr.rsc-table-highlight td:nth-last-child(2) { color: #2279C5; }

.rsc-table-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rsc-team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

.rsc-table-initials {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #EBF4FF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: #2279C5;
    flex-shrink: 0;
}

.rsc-form-dots {
    display: flex;
    gap: 3px;
    align-items: center;
    justify-content: center;
}

.rsc-form-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    flex-shrink: 0;
}

.rsc-form-dot-w { background: rgba(34,197,94,0.15);  color: #15803d; }
.rsc-form-dot-l { background: rgba(239,68,68,0.12);  color: #b91c1c; }
.rsc-form-dot-d { background: #F1F5F9; color: #64748B; }
.rsc-form-dot-f { background: #FEF3C7; color: #92400E; }

.rsc-table-source {
    font-size: 0.72rem;
    color: #94A3B8;
    margin: 8px 0 0;
    text-align: right;
}

.rsc-table-source a { color: #94A3B8; text-decoration: none; }
.rsc-table-source a:hover { text-decoration: underline; }

.rsc-table-error {
    font-size: 0.85rem;
    color: #94A3B8;
    font-style: italic;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 0.5px solid #E2E8F0;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 600px) {
    .rsc-matchup-row { padding: 12px; gap: 6px; }
    .rsc-team-logo-wrap, .rsc-team-logo-lg, .rsc-team-initials { width: 52px; height: 52px; }
    .rsc-team-initials { font-size: 0.72rem; }
    .rsc-team-block-name { font-size: 0.82rem; }
    .rsc-score-num { font-size: 1.6rem; }
    .rsc-centre { min-width: 90px; }
    .rsc-fb-team { padding: 10px 12px; font-size: 0.8rem; }
    .rsc-fb-view { padding: 12px 14px; font-size: 0.8rem; }

    /* Stack and centre filter bar on mobile */
    .rsc-fb-row1 {
        flex-direction: column;
        align-items: center;
        padding-bottom: 8px;
        gap: 12px;
    }
    .rsc-fb-teams {
        justify-content: center;
        width: 100%;
        border-bottom: 0.5px solid #E2E8F0;
        padding-bottom: 4px;
    }
    .rsc-fb-team {
        padding: 10px 14px;
    }
    .rsc-fb-team.active::after {
        bottom: -5px;
    }
    .rsc-fb-season {
        justify-content: center;
        align-items: center;
        padding: 0;
        width: 100%;
    }
    .rsc-fb-season-select {
        max-width: 200px;
    }
    .rsc-fb-row2 {
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .rsc-team-logo-wrap, .rsc-team-logo-lg, .rsc-team-initials { width: 40px; height: 40px; }
    .rsc-team-block-name { font-size: 0.72rem; }
    .rsc-score-num { font-size: 1.35rem; }
    .rsc-centre { min-width: 76px; }
}

@media (max-width: 500px) {
    .rsc-league-table thead th:nth-child(5),
    .rsc-league-table tbody td:nth-child(5),
    .rsc-league-table thead th:nth-child(6),
    .rsc-league-table tbody td:nth-child(6),
    .rsc-league-table thead th:nth-child(7),
    .rsc-league-table tbody td:nth-child(7),
    .rsc-league-table thead th:nth-child(8),
    .rsc-league-table tbody td:nth-child(8),
    .rsc-league-table thead th:nth-child(9),
    .rsc-league-table tbody td:nth-child(9) { display: none; }
    .rsc-form-dot { width: 14px; height: 14px; font-size: 0.45rem; }
}
