/* ===========================
   Evroliga API Plugin — Standings Table
=========================== */

.evroliga-standings-wrapper {
    margin: 20px 0;
}

.standings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 6px;
}

.standings-round {
    font-weight: 600;
    color: #1a4d8f;
    font-size: 0.95rem;
    margin: 0;
}

.last-updated {
    color: #888;
    font-size: 0.82rem;
    margin: 0;
}

.standings-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.standings-table thead {
    background: #1a4d8f;
    color: white;
}

.standings-table th {
    padding: 10px 8px;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.standings-table th.col-team {
    text-align: left;
    padding-left: 12px;
}

.standings-table th.col-num {
    text-align: center;
    min-width: 36px;
}

.standings-table th.col-pos {
    text-align: center;
    width: 36px;
}

.standings-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.standings-table tbody tr:hover {
    background: #f0f4f8;
}

/* Zone colors */
.standings-table tbody tr.zone-playoff {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.standings-table tbody tr.zone-playoff:hover {
    background: #c8e6c9;
}

.standings-table tbody tr.zone-playin {
    background: #fff8e1;
    border-left: 3px solid #ffc107;
}

.standings-table tbody tr.zone-playin:hover {
    background: #ffecb3;
}

/* Serbian teams highlight */
.standings-table tbody tr.team-highlight td.col-team {
    font-weight: 700;
    color: #c62828;
}

.standings-table td {
    padding: 10px 8px;
}

.standings-table .col-pos {
    text-align: center;
    font-weight: 700;
    color: #1a4d8f;
    width: 36px;
}

.standings-table .col-team {
    text-align: left;
    padding-left: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.standings-table .col-team a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(0,0,0,0.2);
    transition: color 0.2s, border-color 0.2s;
}

.standings-table .col-team a:hover {
    color: #1a4d8f;
    border-bottom-color: #1a4d8f;
}

.standings-table .col-num {
    text-align: center;
}

.standings-table .col-wins {
    color: #2e7d32;
    font-weight: 600;
}

.standings-table .col-losses {
    color: #c62828;
    font-weight: 600;
}

.standings-table .col-diff.positive {
    color: #2e7d32;
    font-weight: 600;
}

.standings-table .col-diff.negative {
    color: #c62828;
    font-weight: 600;
}

/* Legend */
.standings-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding: 10px 0;
    font-size: 0.85rem;
    color: #666;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.zone-playoff-dot {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.zone-playin-dot {
    background: #fff8e1;
    border: 1px solid #ffc107;
}

.standings-footer {
    margin-top: 8px;
    text-align: right;
}

.data-source {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

.data-source a {
    color: #999;
}

.data-source a:hover {
    color: #1a4d8f;
}

.evroliga-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
}

/* ===========================
   Compact mode (sidebar)
=========================== */

.evroliga-compact {
    margin: 0;
}

.evroliga-compact .standings-table {
    min-width: 0;
    font-size: 0.82rem;
}

.evroliga-compact .standings-table th {
    padding: 6px 4px;
    font-size: 0.75rem;
}

.evroliga-compact .standings-table td {
    padding: 5px 4px;
}

.evroliga-compact .standings-table .col-team {
    padding-left: 6px;
    font-size: 0.78rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.evroliga-compact .standings-table .col-pos {
    width: 24px;
    font-size: 0.78rem;
}

.evroliga-compact .standings-table-wrapper {
    box-shadow: none;
    border-radius: 0;
}

/* ===========================
   Results
=========================== */

.evroliga-results-wrapper {
    margin: 20px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-header h3 {
    margin: 0;
    color: #1a4d8f;
}

.round-nav {
    display: flex;
    gap: 8px;
}

.round-nav-btn {
    display: inline-block;
    padding: 6px 14px;
    background: #1a4d8f;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.round-nav-btn:hover {
    background: #14386a;
    color: white;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px 18px;
    transition: box-shadow 0.2s;
}

.result-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.result-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.result-teams {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.result-team .team-name {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: capitalize;
}

.result-team .team-score {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}

.result-team.winner {
    color: #1a4d8f;
}

.result-team.winner .team-name {
    font-weight: 700;
}

/* Recap link */
.result-recap-link {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
    text-align: right;
}

.recap-link {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1a4d8f;
    border: 1px solid #1a4d8f;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.recap-link:hover {
    background: #1a4d8f;
    color: white;
}

/* ===========================
   Schedule
=========================== */

.evroliga-schedule-wrapper {
    margin: 20px 0;
}

.schedule-round {
    margin-bottom: 30px;
}

.schedule-round-title {
    color: #1a4d8f;
    margin: 0 0 12px;
    font-size: 1.15rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a4d8f;
}

.schedule-date-divider {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    padding: 8px 0 4px;
    margin-top: 4px;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px 16px;
    transition: box-shadow 0.2s;
}

.schedule-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.schedule-time {
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 6px;
}

.schedule-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.schedule-home,
.schedule-away {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.schedule-home {
    text-align: right;
}

.schedule-away {
    text-align: left;
}

.schedule-home a,
.schedule-away a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(0,0,0,0.2);
    transition: color 0.2s, border-color 0.2s;
}

.schedule-home a:hover,
.schedule-away a:hover {
    color: #1a4d8f;
    border-bottom-color: #1a4d8f;
}

.schedule-vs {
    font-weight: 700;
    color: #1a4d8f;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
}

.schedule-arena {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

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

@media (max-width: 768px) {
    .standings-table {
        font-size: 0.82rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 8px 5px;
    }

    .standings-table .col-team {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .result-card {
        padding: 10px 14px;
    }

    .schedule-matchup {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .schedule-home,
    .schedule-away {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .standings-table {
        min-width: 340px;
        font-size: 0.78rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 6px 3px;
    }

    .result-team .team-name {
        font-size: 0.85rem;
    }
}
