/**
 * MFT Football Odds - Standings Table Styles
 * 
 * @package MFT_Football_Odds
 * @version 1.0
 */

/* ========================================
   STANDINGS WRAPPER
   ======================================== */
.mft-fo-standings-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   HEADER
   ======================================== */
.mft-fo-standings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mft-fo-standings-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mft-fo-standings-league-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.mft-fo-standings-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mft-fo-standings-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.mft-fo-standings-country {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.mft-fo-standings-header-right {
    display: flex;
    align-items: center;
}

.mft-fo-standings-season {
    font-size: 14px;
    color: #00d4ff;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 16px;
}

/* ========================================
   CONTENT
   ======================================== */
.mft-fo-standings-content {
    padding: 0;
}

/* ========================================
   GROUP HEADER
   ======================================== */
.mft-fo-standings-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mft-fo-standings-group:last-child {
    border-bottom: none;
}

.mft-fo-standings-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.2s ease;
}

.mft-fo-standings-group-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.mft-fo-standings-group-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mft-fo-standings-group-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.mft-fo-standings-group.collapsed .mft-fo-standings-group-toggle {
    transform: rotate(-90deg);
}

.mft-fo-standings-group.collapsed .mft-fo-standings-table-wrapper {
    display: none;
}

/* ========================================
   TABLE
   ======================================== */
.mft-fo-standings-table-wrapper {
    overflow-x: auto;
}

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

.mft-fo-standings-table thead th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.mft-fo-standings-table thead th.col-team {
    text-align: left;
    padding-left: 16px;
}

.mft-fo-standings-table tbody tr {
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.mft-fo-standings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mft-fo-standings-table tbody td {
    padding: 10px 8px;
    text-align: center;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Zone Colors */
.mft-fo-standings-table tbody tr.zone-champions {
    border-left-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

.mft-fo-standings-table tbody tr.zone-europa {
    border-left-color: #ff8c00;
    background: rgba(255, 140, 0, 0.05);
}

.mft-fo-standings-table tbody tr.zone-relegation {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
}

/* Column Widths */
.col-pos {
    width: 40px;
    min-width: 40px;
}

.col-trend {
    width: 24px;
    min-width: 24px;
}

.col-team {
    text-align: left !important;
    min-width: 150px;
}

.col-played, .col-won, .col-draw, .col-lost,
.col-gf, .col-ga, .col-gd, .col-pts {
    width: 40px;
    min-width: 40px;
}

.col-form {
    width: 100px;
    min-width: 100px;
}

/* Position Number */
.position-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-weight: 600;
    font-size: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

/* Goal Difference Colors */
.col-gd.positive {
    color: #4ade80;
}

.col-gd.negative {
    color: #f87171;
}

/* Trend Icons */
.trend-up {
    color: #4ade80;
    font-size: 10px;
}

.trend-down {
    color: #f87171;
    font-size: 10px;
}

.trend-same {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

.trend-new {
    color: #00d4ff;
    font-size: 8px;
}

/* Team Info */
.team-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 8px;
}

.team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.team-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Form Display */
.form-display {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.form-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 3px;
}

.form-item.form-win {
    background: #4ade80;
    color: #000;
}

.form-item.form-draw {
    background: #94a3b8;
    color: #000;
}

.form-item.form-lose {
    background: #f87171;
    color: #000;
}

/* ========================================
   LEGEND
   ======================================== */
.mft-fo-standings-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.legend-color {
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

.legend-item.zone-champions .legend-color {
    background: #00d4ff;
}

.legend-item.zone-europa .legend-color {
    background: #ff8c00;
}

.legend-item.zone-relegation .legend-color {
    background: #ff4444;
}

/* ========================================
   ERROR & EMPTY STATES
   ======================================== */
.mft-fo-standings-error,
.mft-fo-standings-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    background: #1a1a2e;
    border-radius: 12px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .mft-fo-standings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .mft-fo-standings-header-right {
        align-self: flex-end;
    }
    
    .mft-fo-standings-title {
        font-size: 16px;
    }
    
    .mft-fo-standings-table {
        font-size: 12px;
    }
    
    .mft-fo-standings-table thead th {
        font-size: 10px;
        padding: 8px 4px;
    }
    
    .mft-fo-standings-table tbody td {
        padding: 8px 4px;
    }
    
    .col-played, .col-won, .col-draw, .col-lost,
    .col-gf, .col-ga, .col-gd, .col-pts {
        width: 32px;
        min-width: 32px;
    }
    
    .team-name {
        max-width: 100px;
    }
    
    .form-item {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
    
    .mft-fo-standings-legend {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    /* Hide some columns on very small screens */
    .col-gf, .col-ga {
        display: none;
    }
    
    .team-name {
        max-width: 80px;
    }
    
    .col-form {
        display: none;
    }
}
