/*
 * MultiLiga Football Plugin Styles
 * Version: 1.0.0 - Final Version
 * Complete responsive CSS for all shortcodes
 */

/* Base Styles */
.multiliga-standings-container,
.multiliga-fixtures-container,
.multiliga-results-container,
.multiliga-top-scorers-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    max-width: 100%;
    margin: 20px 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Header Styles */
.multiliga-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.multiliga-title {
    margin: 0;
    font-size: 1.6em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.multiliga-title .season {
    background: rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.75em;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.multiliga-country {
    margin-top: 8px;
    opacity: 0.95;
    font-size: 0.95em;
    font-weight: 500;
}

.league-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.league-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.league-details {
    flex: 1;
}

/* Error States */
.multiliga-error,
.multiliga-no-data {
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    margin: 20px 0;
}

.multiliga-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px dashed #dc3545;
}

.multiliga-no-data {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 2px dashed #ffc107;
}

.no-data-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.6;
}

/* Standings Table */
.multiliga-standings-table-container {
    overflow-x: auto;
    background: white;
}

.multiliga-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: white;
}

.multiliga-standings-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 10px;
    text-align: center;
    font-weight: 700;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.multiliga-standings-table th.team {
    text-align: left;
    min-width: 200px;
    text-transform: none;
    letter-spacing: normal;
}

.multiliga-standings-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.multiliga-standings-table td.team {
    text-align: left;
}

/* Team Row Styles */
.team-row {
    transition: all 0.3s ease;
}

.team-row.champions-league {
    border-left: 4px solid #007cba;
    background: linear-gradient(90deg, rgba(0, 124, 186, 0.03) 0%, transparent 100%);
}

.team-row.europa-league {
    border-left: 4px solid #fd7e14;
    background: linear-gradient(90deg, rgba(253, 126, 20, 0.03) 0%, transparent 100%);
}

.team-row.relegation {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.03) 0%, transparent 100%);
}

.team-row:hover {
    background: rgba(0, 123, 255, 0.08) !important;
    transform: translateX(2px);
}

/* Team Info */
.team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.team-logo-placeholder {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    flex-shrink: 0;
}

.team-name {
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
}

/* Position Column */
.position {
    position: relative;
    font-weight: bold;
    color: #495057;
}

.rank {
    font-size: 1.1em;
}

.qualification-indicator {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    box-shadow: 0 0 0 2px white;
}

/* Goal Difference */
.goal-difference.positive {
    color: #28a745;
    font-weight: 700;
}

.goal-difference.negative {
    color: #dc3545;
    font-weight: 700;
}

/* Points Column */
.points {
    font-size: 1.2em;
    font-weight: 800;
    color: #007cba;
}

/* Form Indicators */
.form-indicators {
    display: flex;
    gap: 3px;
    justify-content: center;
    flex-wrap: wrap;
}

.form-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    color: white;
    transition: all 0.2s ease;
    cursor: help;
}

.form-indicator:hover {
    transform: scale(1.2);
}

.form-indicator.win {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.form-indicator.draw {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.form-indicator.loss {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Legend */
.multiliga-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #495057;
    font-weight: 500;
}

.legend-item .indicator {
    width: 16px;
    height: 6px;
    border-radius: 3px;
}

.legend-item.champions-league .indicator {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
}

.legend-item.europa-league .indicator {
    background: linear-gradient(135deg, #fd7e14 0%, #e55100 100%);
}

.legend-item.relegation .indicator {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Fixtures Styles */
.fixtures-date-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px 20px;
    margin: 25px 0 15px 0;
    border-left: 5px solid #007cba;
    border-radius: 0 8px 8px 0;
}

.fixtures-date-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.15em;
    font-weight: 700;
}

.fixture-item,
.result-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.fixture-item::before,
.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.fixture-item:hover::before,
.result-item:hover::before {
    transform: scaleX(1);
}

.fixture-item:hover,
.result-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* Time and Status */
.fixture-time,
.result-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.time-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fixture-time .time,
.result-time .time {
    font-weight: 800;
    color: #007cba;
    font-size: 1.2em;
}

.timezone {
    color: #6c757d;
    font-size: 0.8em;
    margin-top: 2px;
    font-weight: 500;
}

.status {
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    white-space: nowrap;
}

.status-NS { 
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.status-1H, .status-2H, .status-HT, .status-LIVE { 
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.status-FT { 
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.status-PST, .status-CANC { 
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Teams Layout */
.fixture-teams,
.result-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.team {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 15px;
    transition: all 0.3s ease;
}

.team:hover {
    transform: scale(1.02);
}

.home-team {
    justify-content: flex-start;
}

.away-team {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.team.winner {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.05) 100%);
    border-radius: 10px;
    padding: 10px;
    border: 2px solid rgba(40, 167, 69, 0.2);
}

.team.loser {
    opacity: 0.6;
}

.winner-badge {
    margin-left: 8px;
    font-size: 1.2em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* VS and Score */
.fixture-vs,
.result-score {
    flex: 0 0 auto;
    text-align: center;
    margin: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.vs-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    color: #495057;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.vs-text:hover {
    transform: scale(1.05);
    border-color: #007cba;
    color: #007cba;
}

.score {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.4em;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    display: block;
    transition: all 0.3s ease;
}

.score:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.round-info {
    color: #6c757d;
    font-size: 0.8em;
    text-align: center;
    max-width: 140px;
    word-wrap: break-word;
    font-weight: 500;
}

.halftime-score,
.penalty-score {
    margin-top: 8px;
    color: #6c757d;
    font-size: 0.85em;
    font-weight: 500;
}

/* Venue and Referee */
.fixture-venue,
.result-venue,
.fixture-referee,
.result-referee {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 10px;
    gap: 8px;
    font-weight: 500;
}

.venue-icon,
.referee-icon {
    opacity: 0.8;
    font-size: 1.1em;
}

.result-round {
    text-align: center;
    margin-top: 15px;
}

.result-round small {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    padding: 6px 16px;
    border-radius: 15px;
    color: #495057;
    font-weight: 600;
    font-size: 0.85em;
}

/* Top Scorers */
.multiliga-top-scorers-list {
    padding: 0;
    background: white;
}

.scorer-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    gap: 15px;
    position: relative;
}

.scorer-item:hover {
    background: rgba(0, 123, 255, 0.05);
    transform: translateX(5px);
}

.scorer-item:last-child {
    border-bottom: none;
}

.scorer-position {
    font-size: 1.5em;
    font-weight: bold;
    color: #007cba;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scorer-position.top-3 {
    font-size: 2em;
}

.scorer-photo {
    flex-shrink: 0;
    position: relative;
}

.player-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.player-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.scorer-info {
    flex: 1;
    min-width: 0;
}

.scorer-name {
    font-weight: 700;
    color: #212529;
    font-size: 1.1em;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-age {
    color: #6c757d;
    font-weight: normal;
    font-size: 0.9em;
}

.scorer-team {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.95em;
    margin-bottom: 3px;
}

.team-logo-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.scorer-nationality {
    font-size: 0.85em;
    color: #868e96;
    margin-bottom: 2px;
}

.nationality {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
}

.scorer-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    flex-wrap: wrap;
}

.scorer-goals,
.scorer-assists,
.scorer-appearances {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 60px;
}

.scorer-goals {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.scorer-assists {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.scorer-appearances {
    color: #6c757d;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.goals-number,
.assists-number,
.appearances-number {
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1;
    margin-bottom: 2px;
}

.goals-label,
.assists-label,
.appearances-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Special Top 3 Styling */
.scorer-item.position-1 {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 235, 59, 0.05) 100%);
    border-left: 4px solid #ffc107;
    position: relative;
}

.scorer-item.position-1::before {
    content: '👑';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.7;
}

.scorer-item.position-2 {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1) 0%, rgba(108, 117, 125, 0.05) 100%);
    border-left: 4px solid #6c757d;
}

.scorer-item.position-3 {
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.1) 0%, rgba(253, 126, 20, 0.05) 100%);
    border-left: 4px solid #fd7e14;
}

/* Footer */
.multiliga-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flag-icon {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .multiliga-header {
        padding: 20px 15px;
    }
    
    .multiliga-title {
        font-size: 1.4em;
        flex-direction: column;
        gap: 10px;
    }
    
    .league-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .multiliga-standings-table {
        font-size: 0.85em;
    }
    
    .multiliga-standings-table th,
    .multiliga-standings-table td {
        padding: 10px 6px;
    }
    
    .team-info {
        gap: 10px;
    }
    
    .team-logo,
    .team-logo-placeholder {
        width: 24px;
        height: 24px;
    }
    
    .form-indicators {
        gap: 2px;
    }
    
    .form-indicator {
        width: 20px;
        height: 20px;
        font-size: 0.7em;
    }
    
    .multiliga-legend {
        gap: 15px;
        font-size: 0.85em;
        flex-direction: column;
        align-items: center;
    }
    
    .fixture-teams,
    .result-teams {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .team {
        justify-content: center !important;
        flex-direction: row !important;
    }
    
    .fixture-vs,
    .result-score {
        margin: 0;
    }
    
    .multiliga-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .scorer-item {
        padding: 15px;
        gap: 12px;
    }
    
    .scorer-position {
        min-width: 40px;
        font-size: 1.3em;
    }
    
    .scorer-position.top-3 {
        font-size: 1.8em;
    }
    
    .player-photo,
    .player-photo-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .scorer-stats {
        gap: 10px;
        margin-left: 0;
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .scorer-goals,
    .scorer-assists,
    .scorer-appearances {
        min-width: 50px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .multiliga-standings-container,
    .multiliga-fixtures-container,
    .multiliga-results-container,
    .multiliga-top-scorers-container {
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .multiliga-header {
        padding: 15px;
    }
    
    .multiliga-title {
        font-size: 1.2em;
    }
    
    .multiliga-standings-table th.team {
        min-width: 150px;
    }
    
    .team-name {
        font-size: 0.9em;
    }
    
    .vs-text {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    .score {
        padding: 12px 20px;
        font-size: 1.2em;
    }
    
    .fixture-item,
    .result-item {
        padding: 20px 15px;
    }
    
    .fixtures-date-header {
        padding: 15px;
        margin: 20px 0 10px 0;
    }
    
    .scorer-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .scorer-info {
        text-align: center;
        width: 100%;
    }
    
    .scorer-stats {
        justify-content: center;
        width: 100%;
        margin-top: 15px;
    }
    
    .scorer-name {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .scorer-team {
        justify-content: center;
    }
    
    .scorer-item.position-1::before {
        top: 5px;
        right: 10px;
        font-size: 1.2em;
    }
}

/* Loading State */
.multiliga-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    color: #6c757d;
    font-weight: 500;
}

.multiliga-loading:before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.multiliga-standings-table:focus,
.fixture-item:focus,
.result-item:focus {
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .fixture-item,
    .result-item,
    .scorer-item,
    .team-row {
        transition: none;
    }
    
    .status-1H, .status-2H, .status-HT, .status-LIVE {
        animation: none;
    }
    
    .winner-badge {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .multiliga-standings-container,
    .multiliga-fixtures-container,
    .multiliga-results-container,
    .multiliga-top-scorers-container {
        background: #1a1a1a;
        color: #e1e1e1;
        border-color: #333;
    }
    
    .multiliga-standings-table {
        background: #1a1a1a;
    }
    
    .multiliga-standings-table th {
        background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
        color: #e1e1e1;
        border-bottom-color: #444;
    }
    
    .multiliga-standings-table td {
        border-bottom-color: #333;
    }
    
    .team-name {
        color: #e1e1e1;
    }
    
    .fixture-item,
    .result-item {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .multiliga-legend,
    .multiliga-footer {
        background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
        color: #ccc;
    }
}