/* ==============================================
   EVD Spielart Tables Styling
   ============================================== */

.evd-spielart-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Statistics Section */
.evd-spielart-stats {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e94e3d 0%, #c73e2f 100%);
    color: white;
    border-radius: 6px;
}

.evd-spielart-stats h4 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.1em;
    font-weight: 700;
}

.stat-value.win {
    color: #00ff88;
}

.stat-value.loss {
    color: #ff6b6b;
}

.stat-value.draw {
    color: #ffd93d;
}

/* Table Styling */
.evd-spielart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
}

.evd-spielart-table th {
    background: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #e94e3d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evd-spielart-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.evd-spielart-table tr:hover td {
    background: #f8f9fa;
}

/* Result-based row styling */
.evd-spielart-table tr.result-win {
    background: rgba(0, 255, 136, 0.1);
}

.evd-spielart-table tr.result-win:hover td {
    background: rgba(0, 255, 136, 0.15);
}

.evd-spielart-table tr.result-loss {
    background: rgba(255, 107, 107, 0.1);
}

.evd-spielart-table tr.result-loss:hover td {
    background: rgba(255, 107, 107, 0.15);
}

.evd-spielart-table tr.result-draw {
    background: rgba(255, 217, 61, 0.1);
}

.evd-spielart-table tr.result-draw:hover td {
    background: rgba(255, 217, 61, 0.15);
}

/* Column-specific styling */
.evd-spielart-table .spieltag {
    width: 80px;
    text-align: center;
    font-weight: 600;
    color: #e94e3d;
}

.evd-spielart-table .datum {
    width: 100px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.evd-spielart-table .heimteam,
.evd-spielart-table .gastteam {
    font-weight: 500;
    padding-left: 12px;
}

.evd-spielart-table .heimteam strong,
.evd-spielart-table .gastteam strong {
    color: #e94e3d;
    font-weight: 700;
}

.evd-spielart-table .ergebnis {
    width: 80px;
    text-align: center;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 1.05em;
}

.evd-spielart-table .venue {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Compact mode */
.evd-spielart-table.compact {
    font-size: 0.85em;
}

.evd-spielart-table.compact th,
.evd-spielart-table.compact td {
    padding: 6px 4px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .evd-spielart-wrapper {
        padding: 15px;
        margin: 20px 0;
    }
    
    .evd-spielart-stats {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .evd-spielart-table {
        font-size: 0.85em;
    }
    
    .evd-spielart-table th,
    .evd-spielart-table td {
        padding: 8px 4px;
    }
    
    .evd-spielart-table .venue {
        display: none;
    }
    
    .evd-spielart-table .spieltag {
        width: 60px;
    }
    
    .evd-spielart-table .datum {
        width: 80px;
        font-size: 0.8em;
    }
    
    .evd-spielart-table .ergebnis {
        width: 60px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .evd-spielart-table .spieltag {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* No matches message */
.no-matches {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #ddd;
}

/* Loading state */
.evd-spielart-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.evd-spielart-loading::before {
    content: "⚙️";
    display: block;
    font-size: 2em;
    margin-bottom: 10px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .evd-spielart-wrapper {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .evd-spielart-table th {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .evd-spielart-table td {
        border-bottom-color: #333;
    }
    
    .evd-spielart-table tr:hover td {
        background: #2d2d2d;
    }
    
    .no-matches {
        background: #2d2d2d;
        color: #999;
        border-color: #444;
    }
}
