/* Panel „Ostatnie wyniki” — style globalne (ładują się po scoped CSS) */

.dash-widget--recent .dash-widget__body {
    align-items: stretch;
}

.dash-widget--recent .recent-result {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    column-gap: 8px;
    row-gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}

.dash-widget--recent .recent-result:last-child {
    border-bottom: none;
}

.dash-widget--recent .recent-result__team {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.dash-widget--recent .recent-result__team--home {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    justify-content: flex-end;
}

.dash-widget--recent .recent-result__score {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #111827;
    white-space: nowrap;
    padding: 0 4px;
}

.dash-widget--recent .recent-result__team--away {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
    justify-content: flex-start;
}

.dash-widget--recent .recent-result__flag {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.dash-widget--recent .recent-result__name {
    font-weight: 700;
    color: #374151;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Strzelcy — pod kolumną drużyny (jak w MatchCard) */
.dash-widget--recent .recent-result__goals {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.72rem;
    color: #374151;
    padding-top: 2px;
}

.dash-widget--recent .recent-result__goals--home {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-end;
}

.dash-widget--recent .recent-result__goals--away {
    grid-column: 3;
    grid-row: 2;
    align-items: flex-start;
}

.dash-widget--recent .goal-entry {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    max-width: 100%;
}

.dash-widget--recent .recent-result__goals--home .goal-entry {
    flex-direction: row-reverse;
}

.dash-widget--recent .goal-name {
    font-weight: 500;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-widget--recent .goal-minute {
    color: #6b7280;
    font-size: 0.68rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-widget--recent .recent-result__pts,
.dash-widget--recent .recent-result__pred {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
}

.dash-widget--recent .recent-result__pts {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    margin-top: 2px;
}

.dash-widget--recent .recent-result__pts--high { background: #dcfce7; color: #15803d; }
.dash-widget--recent .recent-result__pts--mid  { background: #fef9c3; color: #854d0e; }
.dash-widget--recent .recent-result__pts--low  { background: #fee2e2; color: #b91c1c; }

.dash-widget--recent .recent-result__pred {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    margin-top: 2px;
}

/* Desktop: punkty w tej samej linii co wynik, po prawej */
@media (min-width: 769px) {
    .dash-widget--recent .recent-result {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    }

    .dash-widget--recent .recent-result__pts,
    .dash-widget--recent .recent-result__pred {
        grid-column: 4;
        grid-row: 1;
        margin-top: 0;
        align-self: center;
    }
}

/* MatchCard — linki drużyn bez podkreślenia (Typuj, Wyniki) */
.match-card a.match-team__name,
.match-card a.match-team__name:hover,
.match-card a.match-team__name:visited,
.match-card a.match-team__name:active {
    text-decoration: none !important;
    font-weight: 700 !important;
}

.match-card a.match-team__name:hover {
    color: #1d4ed8 !important;
}

/* Profil i ranking — linki drużyn bez podkreślenia */
.profile-page a.team-link,
.profile-page a.team-link:hover,
.profile-page a.team-link:visited,
.ranking-page a.team-link,
.ranking-page a.team-link:hover,
.ranking-page a.team-link:visited {
    text-decoration: none !important;
    font-weight: 700 !important;
}

.profile-page a.team-link:hover,
.ranking-page a.team-link:hover {
    color: #1d4ed8 !important;
}

/* Statystyki — linki drużyn w tabelach i siatce bez podkreślenia */
.team-stats-page .standings-table a,
.team-stats-page .standings-table a:hover,
.team-stats-page .standings-table a:visited,
.stats-team-card,
.stats-team-card:hover,
.stats-team-card:visited {
    text-decoration: none !important;
    font-weight: 700 !important;
}

.team-stats-page .standings-table a:hover,
.stats-team-card:hover {
    color: #1d4ed8;
}

.stats-team-card:hover .stats-team-card__name {
    color: #1d4ed8;
}

/* Wyniki — flagi SVG muszą mieć stały rozmiar */
.results-page .results-flag {
    width: 28px !important;
    height: 20px !important;
    max-width: 28px;
    max-height: 20px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Wyniki / Historia — linki drużyn bez podkreślenia */
.results-page a.team-link,
.results-page a.team-link:hover,
.results-page a.team-link:visited {
    text-decoration: none !important;
    font-weight: 700 !important;
}

.results-page a.team-link:hover {
    color: #1d4ed8 !important;
}

/* Tabela typów — wyrównanie kolumn punktów (nadpisuje ewentualne konflikty) */
.results-page .results-table .results-col-pts,
.results-page .results-table th:nth-child(4),
.results-page .results-table th:nth-child(5),
.results-page .results-table th:nth-child(6),
.results-page .results-table th:nth-child(7) {
    text-align: center !important;
}
