/* Estilos para widgets de la Liga Tucumana de Fútbol */

.widget-loading {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.widget-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.375rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.widget-footer {
    background: #f8f9fa;
    padding: 0.5rem;
    border-top: 1px solid #dee2e6;
    text-align: center;
    font-size: 0.875rem;
}

/* Estilos para partidos */
.partidos-widget {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Estilos para el slider de partidos */
.partidos-slider {
    position: relative;
}

.partido-slide-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.partido-card {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.partido-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.partido-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.team {
    flex: 1;
    text-align: center;
}

.team-local {
    text-align: right;
    padding-right: 1rem;
}

.team-visitor {
    text-align: left;
    padding-left: 1rem;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.3;
}

.partido-score {
    flex: 0 0 auto;
    text-align: center;
    min-width: 120px;
}

.score-badge {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: white;
    margin-bottom: 0.5rem;
    display: inline-block;
    min-width: 80px;
}

.partido-status {
    margin-top: 0.5rem;
}

.partido-details {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.partido-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.partido-group {
    font-size: 0.85rem;
    color: #868e96;
    font-style: italic;
}

.partido-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    gap: 1rem;
}

.partido-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    min-width: 60px;
    text-align: center;
}

.partido-navigation .btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partido-navigation .btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.widget-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
}

.widget-header h6 {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-size: 0.875rem;
}

.widget-header .text-success {
    color: #28a745 !important;
}

.widget-header .text-warning {
    color: #ffc107 !important;
}

.widget-header .text-info {
    color: #17a2b8 !important;
}

.partido-item {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.partido-item:hover {
    background-color: #f8f9fa;
}

.partido-item:last-child {
    border-bottom: none;
}

.partido-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #495057;
}

/* Estilos para tablas */
.tabla-widget {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.tabla-widget table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.tabla-widget th,
.tabla-widget td {
    padding: 0.5rem;
    vertical-align: middle;
    border-color: #dee2e6;
}

.tabla-widget th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Estilos para goleadores */
.goleadores-widget {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.goleadores-widget table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.goleadores-widget th,
.goleadores-widget td {
    padding: 0.5rem;
    vertical-align: middle;
    border-color: #dee2e6;
}

.goleadores-widget th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .partido-text {
        font-size: 0.8rem;
    }

    .tabla-widget table,
    .goleadores-widget table {
        font-size: 0.75rem;
    }

    .tabla-widget th,
    .tabla-widget td,
    .goleadores-widget th,
    .goleadores-widget td {
        padding: 0.25rem;
    }

    /* Responsive para partidos slider */
    .partido-card {
        padding: 1rem;
        max-width: 100%;
    }

    .team-name {
        font-size: 1rem;
    }

    .score-badge {
        font-size: 1.3rem;
        padding: 0.6rem 0.8rem;
    }

    .partido-slide-container {
        padding: 0.75rem;
        min-height: 180px;
    }

    .partido-navigation {
        padding: 0.5rem;
        gap: 0.75rem;
    }

    .partido-navigation .btn {
        width: 28px;
        height: 28px;
    }
}

/* Animaciones */
.partidos-widget,
.tabla-widget,
.goleadores-widget {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de carga */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Mejoras visuales */
.widget-loading .spinner-border {
    color: #007bff;
}

.widget-error .fa-exclamation-triangle {
    color: #ffc107;
}

.widget-footer .fa-clock {
    color: #6c757d;
}

/* Iframe Container Styles */
.iframe-container {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iframe-container iframe {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.iframe-container iframe:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Layout para 2 iframes por slide */
.iframes-row {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 100%;
}

.iframe-item {
    flex: 1;
    min-width: 0;
    /* Permite que los elementos se contraigan */
}

.iframe-item iframe {
    width: 100%;
    height: 180px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.iframe-item iframe:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive iframe adjustments */
@media (max-width: 768px) {
    .iframe-container {
        height: 180px;
    }

    .iframe-container iframe {
        height: 180px;
    }

    /* Responsive para 2 iframes */
    .iframes-row {
        gap: 8px;
    }

    .iframe-item iframe {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .iframe-container {
        height: 160px;
    }

    .iframe-container iframe {
        height: 160px;
    }

    /* Responsive para 2 iframes en móvil */
    .iframes-row {
        flex-direction: column;
        gap: 8px;
    }

    .iframe-item iframe {
        height: 140px;
    }
}