/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Estilos para el encabezado del partido */
.match-header {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.team-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.team-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 5px 0;
}

.match-score {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 20px;
    min-width: 100px;
    text-align: center;
}

.match-details {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.match-detail {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.match-detail i {
    margin-right: 8px;
    color: #6c757d;
}

/* Estilos para los badges de estado */
.badge {
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: 500;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

/* Estilos para las secciones de tácticas y alineaciones */
.match-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

/* Estilos para las tablas de quintetos */
#quinteto-local, #quinteto-visitante {
    width: 100%;
    margin-bottom: 0;
}

#quinteto-local th, #quinteto-visitante th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #6c757d;
}

#quinteto-local tbody tr, #quinteto-visitante tbody tr {
    transition: background-color 0.2s;
}

#quinteto-local tbody tr:hover, #quinteto-visitante tbody tr:hover {
    background-color: #f8f9fa;
}

/* Asegurar que las tarjetas sean visibles */
.card {
    display: block !important; /* Sobrescribir cualquier display: none */
    opacity: 1 !important;
    visibility: visible !important;
    margin-bottom: 20px;
}

/* Asegurar que las tablas dentro de las tarjetas sean visibles */
.card table {
    display: table !important;
    width: 100%;
}

.card tbody {
    display: table-row-group !important;
}

.card tr {
    display: table-row !important;
}

.card td, .card th {
    display: table-cell !important;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.tactics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tactic-card {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid #007bff;
}

.tactic-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #343a40;
}

.tactic-desc {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Estilos para la sección de quintetos */
.lineup-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.lineup-team {
    flex: 1;
    min-width: 250px;
}

.lineup-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #343a40;
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.player-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.player-number {
    display: inline-block;
    width: 25px;
    text-align: center;
    font-weight: bold;
    margin-right: 10px;
    color: #6c757d;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .team-info {
        flex-direction: column;
        text-align: center;
    }
    
    .match-score {
        margin: 15px 0;
    }
    
    .match-details {
        flex-direction: column;
    }
    
    .match-detail {
        justify-content: center;
        margin: 5px 0;
    }
    
    .tactics-grid {
        grid-template-columns: 1fr;
    }
}

/* Media queries para dispositivos móviles */
@media (max-width: 768px) {
    .team {
        font-size: 0.9rem;
    }
    
    .team-logo {
        width: 60px;
        height: 60px;
    }
    
    .match-score {
        font-size: 2rem;
    }
    
    .match-time {
        font-size: 0.9rem;
    }
    
    .match-details {
        font-size: 0.8rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        padding: 15px;
    }
    
    .stat-item {
        padding: 8px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .player-name {
        font-size: 0.9rem;
    }
    
    .player-position {
        font-size: 0.8rem;
    }
    
    .player-stats {
        font-size: 0.8rem;
    }
}

/* ===== 🏥 SISTEMA DE LESIONES - ESTILOS ===== */

/* 🔴 Jugador lesionado - Texto en rojo */
.jugador-lesionado {
    color: #dc3545 !important;
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    border-radius: 4px;
    padding: 2px 4px;
    cursor: not-allowed !important;
    opacity: 0.7;
}

/* 🚫 Opción deshabilitada en selectores */
.jugador-lesionado option {
    color: #dc3545 !important;
    background-color: #f8d7da !important;
    font-style: italic;
}

/* 🚫 Select deshabilitado para lesionados */
select option.jugador-lesionado {
    color: #6c757d !important;
    background-color: #e9ecef !important;
    pointer-events: none;
}

/* 🚑 Estado de lesión - Contenedor */
.lesion-status {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 6px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #856404;
    cursor: help;
    transition: all 0.2s ease;
}

.lesion-status:hover {
    background-color: #ffeaa7;
    transform: scale(1.05);
}

/* 📊 Días de lesión */
.lesion-dias {
    margin-left: 3px;
    font-weight: bold;
    color: #dc3545;
}

/* 🏥 Información detallada de lesión */
.lesion-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesion-info.leve {
    border-left: 4px solid #28a745;
}

.lesion-info.moderada {
    border-left: 4px solid #ffc107;
}

.lesion-info.grave {
    border-left: 4px solid #fd7e14;
}

.lesion-info.muy-grave {
    border-left: 4px solid #dc3545;
}

/* 🚑 Emoji de lesión */
.lesion-emoji {
    font-size: 1.5rem;
    margin-right: 8px;
}

/* 📋 Detalles de lesión */
.lesion-details {
    flex: 1;
}

.lesion-tipo {
    font-weight: bold;
    color: #495057;
    margin-bottom: 4px;
}

.lesion-duracion {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 🎯 Tooltip personalizado para lesiones */
.lesion-tooltip {
    position: relative;
    cursor: help;
}

.lesion-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #343a40;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.lesion-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 📱 Responsive para móviles */
@media (max-width: 768px) {
    .lesion-status {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .lesion-info {
        padding: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lesion-emoji {
        font-size: 1.2rem;
    }
}
