/**
 * Estilos para la Pestaña Estadísticas por Partido - Draft Player Stats
 * Diseño actualizado según Figma
 */

/* ========================================
   HEADER DE LA SECCIÓN
   ======================================== */

.dps-partidos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #363233;
}

.dps-partidos-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dps-partidos-icon {
    width: 32px;
    height: 32px;
    color: #EB5F0A;
}

.dps-partidos-title {
    font-size: 32px;
    font-weight: 600;
    color: #E8DCC5;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.dps-partidos-count {
    background: rgba(235, 95, 10, 0.2);
    color: #EB5F0A;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

/* ========================================
   BOTONES DE ACCIÓN
   ======================================== */

.dps-partidos-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.dps-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #EB5F0A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dps-action-btn:hover {
    background: #D65509;
    transform: translateY(-2px);
}

.dps-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   FILTROS
   ======================================== */

.dps-partidos-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.dps-filter-label {
    color: #E8DCC5;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
}

.dps-filter-btn {
    padding: 10px 20px;
    background: #EB5F0A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dps-filter-btn:hover {
    background: #D65509;
}

.dps-filter-btn.active {
    background: #D65509;
}

/* ========================================
   LAYOUT PRINCIPAL
   ======================================== */

.dps-partidos-content {
    color: #fff;
}

.dps-partidos-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

/* ========================================
   LISTA DE PARTIDOS (Columna Izquierda)
   ======================================== */

.dps-partidos-list-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.dps-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

.dps-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.dps-match-count-badge {
    background: #ff6b35;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.dps-partidos-list {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dps-partidos-list::-webkit-scrollbar {
    width: 6px;
}

.dps-partidos-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.dps-partidos-list::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.5);
    border-radius: 3px;
}

.dps-partidos-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.7);
}

/* ========================================
   ITEM DE PARTIDO
   ======================================== */

.dps-partido-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dps-partido-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
}

.dps-partido-item.active {
    background: rgba(255, 107, 53, 0.15);
    border-color: #ff6b35;
}

.dps-partido-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.dps-partido-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dps-partido-rival {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dps-rival-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.dps-rival-name {
    font-weight: 600;
    font-size: 14px;
}

.dps-location-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.dps-partido-result {
    font-size: 16px;
    font-weight: 700;
}

.dps-partido-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.dps-pstat {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.dps-pstat-goal {
    color: #ff6b35;
    font-weight: 600;
}

.dps-partido-comp {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   SECCIÓN DE DETALLES (Columna Derecha)
   ======================================== */

.dps-partidos-detail-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dps-detail-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
}

.dps-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dps-card-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.dps-select-small {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 12px;
}

.dps-select-small option {
    background: #1a1a2e;
}

/* ========================================
   DETALLES DEL PARTIDO
   ======================================== */

.dps-match-header-detail {
    text-align: center;
    margin-bottom: 15px;
}

.dps-match-teams {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dps-match-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dps-match-score-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.dps-match-score-detail .dps-team-name,
.dps-match-score-detail .dps-rival-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 120px;
}

.dps-match-score-detail .dps-team-name {
    text-align: right;
}

.dps-match-score-detail .dps-rival-name {
    text-align: left;
}

.dps-score-big {
    font-size: 28px;
    font-weight: 700;
    color: #ff6b35;
    padding: 5px 15px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
}

.dps-stats-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dps-stat-detail-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.dps-stat-detail-value {
    font-size: 22px;
    font-weight: 700;
    color: #ff6b35;
    display: block;
}

.dps-stat-detail-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.dps-no-selection {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 20px;
}

/* ========================================
   RADAR CHART
   ======================================== */

.dps-radar-container {
    display: flex;
    justify-content: center;
    padding: 10px;
}

.dps-radar-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* ========================================
   HEATMAP
   ======================================== */

.dps-heatmap-container {
    display: flex;
    justify-content: center;
}

.dps-heatmap-pitch {
    width: 340px;
    height: 500px;
    background: linear-gradient(to bottom, #2d5a27 0%, #3d7a37 50%, #2d5a27 100%);
    border: 3px solid #fff;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.dps-heatmap-pitch::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
}

.dps-heatmap-pitch::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

#dps-heatmap-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Áreas del arco */
.dps-heatmap-pitch .dps-pitch-area {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dps-heatmap-pitch .dps-pitch-area-top {
    top: 0;
    border-top: none;
}

.dps-heatmap-pitch .dps-pitch-area-bottom {
    bottom: 0;
    border-bottom: none;
}

/* ========================================
   COLORES DE RESULTADO
   ======================================== */

.dps-result-win {
    color: #28a745;
    font-weight: 600;
}

.dps-result-draw {
    color: #ffc107;
    font-weight: 600;
}

.dps-result-loss {
    color: #dc3545;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
    .dps-partidos-layout {
        grid-template-columns: 1fr;
    }
    
    .dps-partidos-list-section {
        max-height: 400px;
    }
    
    .dps-stats-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dps-partidos-actions {
        flex-wrap: wrap;
    }
    
    .dps-partidos-filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .dps-partidos-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dps-partidos-title {
        font-size: 24px;
    }
    
    .dps-heatmap-pitch {
        width: 280px;
        height: 400px;
    }
    
    .dps-match-score-detail {
        flex-direction: column;
        gap: 10px;
    }
    
    .dps-match-score-detail .dps-team-name,
    .dps-match-score-detail .dps-rival-name {
        text-align: center;
        min-width: auto;
    }
    
    .dps-stats-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}
