/**
 * Football Widgets - Styles
 * Ciemny motyw inspirowany betside.pl
 */

/* =========================================================================
   BAZOWE STYLE
   ========================================================================= */

.fw-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #1a1d24;
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* =========================================================================
   LINKI - KOLOR #FBAF08
   ========================================================================= */

.fw-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fw-link:hover {
    color: #FBAF08 !important;
    text-decoration: none !important;
}

.fw-our-team.fw-link:hover {
    color: #FBAF08 !important;
}

/* =========================================================================
   NAGŁÓWEK LIGI
   ========================================================================= */

.fw-league-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background-color: #232830;
    border-bottom: 1px solid #2a2f3a;
}

.fw-league-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.fw-league-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.fw-league-name {
    color: #e8e8e8;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* =========================================================================
   SEKCJA LIGI
   ========================================================================= */

.fw-league-section {
    border-bottom: 1px solid #2a2f3a;
}

.fw-league-section:last-child {
    border-bottom: none;
}

/* =========================================================================
   WIERSZ MECZU
   ========================================================================= */

.fw-match-row {
    display: grid;
    grid-template-columns: 55px 1fr 50px 40px;
    align-items: center;
    padding: 12px 16px;
    background-color: #1a1d24;
    border-bottom: 1px solid #252930;
    transition: background-color 0.2s ease;
}

.fw-match-row:hover {
    background-color: #22262e;
}

.fw-match-row:last-child {
    border-bottom: none;
}

/* Wersja dla upcoming (bez badge wyniku) */
.fw-upcoming .fw-match-row {
    grid-template-columns: 55px 1fr 50px;
}

/* =========================================================================
   DATA MECZU
   ========================================================================= */

.fw-match-date {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fw-match-time {
    color: #9ca3af;
    font-size: 11px;
}

/* =========================================================================
   DRUŻYNY
   ========================================================================= */

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

.fw-team-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fw-team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.fw-team-logo-sm {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.fw-team-name {
    color: #d1d5db;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.fw-our-team {
    color: #ffffff;
    font-weight: 600;
}

/* =========================================================================
   WYNIK MECZU
   ========================================================================= */

.fw-match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.fw-match-score span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.fw-match-vs {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* =========================================================================
   BADGE WYNIKU (Z/R/P)
   ========================================================================= */

.fw-result-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    margin-left: auto;
}

.fw-win {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.fw-draw {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.fw-loss {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* =========================================================================
   BADGE LIVE
   ========================================================================= */

.fw-live-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fw-live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background-color: #1f2328;
    border-bottom: 1px solid #2a2f3a;
    font-size: 12px;
    color: #9ca3af;
}

/* =========================================================================
   HEAD TO HEAD
   ========================================================================= */

.fw-h2h-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #232830;
    border-bottom: 1px solid #2a2f3a;
}

.fw-h2h-team {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fw-h2h-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.fw-h2h-score {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    min-width: 30px;
    text-align: center;
}

.fw-h2h-score.fw-win {
    background: none;
    box-shadow: none;
    color: #22c55e;
}

.fw-h2h-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.fw-h2h-draws {
    font-size: 20px;
    font-weight: 700;
    color: #9ca3af;
}

.fw-h2h-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
}

.fw-h2h .fw-matches-list {
    padding: 0;
}

.fw-h2h .fw-match-row {
    grid-template-columns: 80px 1fr 50px auto;
}

.fw-match-info {
    color: #6b7280;
    font-size: 11px;
    text-align: right;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================================
   TABELA LIGOWA
   ========================================================================= */

.fw-league-table .fw-league-header {
    padding: 16px;
}

.fw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fw-table thead {
    background-color: #232830;
}

.fw-table th {
    color: #9ca3af;
    font-weight: 600;
    padding: 10px 8px;
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 1px solid #2a2f3a;
}

.fw-table th.fw-col-team {
    text-align: left;
    padding-left: 16px;
}

.fw-table th.fw-col-pos {
    width: 35px;
}

.fw-table tbody tr {
    border-bottom: 1px solid #252930;
    transition: background-color 0.2s ease;
}

.fw-table tbody tr:hover {
    background-color: #22262e;
}

.fw-table tbody tr:last-child {
    border-bottom: none;
}

.fw-table td {
    padding: 10px 8px;
    text-align: center;
    color: #d1d5db;
}

.fw-table td.fw-col-pos {
    color: #9ca3af;
    font-weight: 600;
}

.fw-table td.fw-col-team {
    text-align: left;
    padding-left: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fw-table td.fw-col-pts {
    color: #ffffff;
    font-weight: 700;
}

/* Kolory promocji/spadku */
.fw-promo-champ td.fw-col-pos {
    border-left: 3px solid #ffd700;
}

.fw-promo-cl td.fw-col-pos {
    border-left: 3px solid #22c55e;
}

.fw-promo-el td.fw-col-pos {
    border-left: 3px solid #3b82f6;
}

.fw-promo-ecl td.fw-col-pos {
    border-left: 3px solid #06b6d4;
}

.fw-promo-down td.fw-col-pos {
    border-left: 3px solid #ef4444;
}

/* =========================================================================
   BŁĘDY
   ========================================================================= */

.fw-error {
    background-color: #2d1f1f;
    color: #fca5a5;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    font-size: 14px;
    margin: 10px 0;
}

/* =========================================================================
   RESPONSYWNOŚĆ
   ========================================================================= */

@media (max-width: 600px) {
    .fw-widget {
        border-radius: 0;
        margin: 0 -15px;
    }

    .fw-match-row {
        grid-template-columns: 40px 1fr 40px 32px;
        padding: 10px 12px;
    }

    .fw-upcoming .fw-match-row {
        grid-template-columns: 40px 1fr 40px;
    }

    .fw-team-name {
        font-size: 12px;
        max-width: 130px;
    }

    .fw-team-logo {
        width: 18px;
        height: 18px;
    }

    .fw-match-date {
        font-size: 11px;
    }

    .fw-result-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    /* Tabela na mobile */
    .fw-table {
        font-size: 11px;
    }

    .fw-table th,
    .fw-table td {
        padding: 8px 4px;
    }

    .fw-table td.fw-col-team {
        padding-left: 8px;
        gap: 6px;
    }

    .fw-team-logo-sm {
        width: 14px;
        height: 14px;
    }

    /* H2H na mobile */
    .fw-h2h-summary {
        padding: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .fw-h2h-logo {
        width: 30px;
        height: 30px;
    }

    .fw-h2h-score {
        font-size: 18px;
    }

    .fw-h2h .fw-match-row {
        grid-template-columns: 60px 1fr 40px;
    }

    .fw-match-info {
        display: none;
    }
}

/* =========================================================================
   ANIMACJE
   ========================================================================= */

@keyframes fw-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.fw-live-badge {
    animation: fw-pulse 2s ease-in-out infinite;
}
