/* ============================================================================
   ESTILOS PARA TABLAS DE CONCURSOS - TEMA VINTAGE PERGAMINO
   ============================================================================ */

/* ============================================================================
   CONTENEDOR PRINCIPAL
   ============================================================================ */
.tabla-concurso-container {
    margin: 40px 0;
    padding: 20px;
    background: linear-gradient(to bottom, #faf6f0, #f5eee0);
    border-radius: 8px;
    border: 2px solid #e8dcc8;
    box-shadow: 0 4px 12px rgba(79, 40, 23, 0.1);
}

/* ============================================================================
   HEADER DE LA TABLA
   ============================================================================ */
.tabla-concurso-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #FE9000;
}

.tabla-concurso-header h3 {
    color: #4F2817;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(179, 71, 0, 0.2);
}

.reglas-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.regla-item {
    background: linear-gradient(135deg, #fff9e6, #fef6e0);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #5c3d2e;
    font-weight: 600;
    font-family: 'Georgia', serif;
    box-shadow: 0 2px 6px rgba(79, 40, 23, 0.1);
    border: 1px solid #e8dcc8;
}

/* ============================================================================
   TABLA
   ============================================================================ */
.tabla-concurso-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(79, 40, 23, 0.15);
}

.tabla-concurso {
    width: 100%;
    border-collapse: collapse;
    background: #fdfbf7;
}

.tabla-concurso thead {
    background: linear-gradient(135deg, #FE9000, #FEBC11, #FE9000);
    color: #4F2817;
}

.tabla-concurso thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Georgia', serif;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.tabla-concurso tbody tr {
    border-bottom: 1px solid #e8dcc8;
    transition: background-color 0.2s;
}

.tabla-concurso tbody tr:hover {
    background-color: #f9f5ec;
}

.tabla-concurso tbody tr.cumple {
    background-color: #fefce8;
    border-left: 4px solid #FEBC11;
}

.tabla-concurso tbody tr.cumple:hover {
    background-color: #fef9c3;
}

.tabla-concurso tbody td {
    padding: 16px 12px;
    font-size: 14px;
    font-family: 'Georgia', serif;
    color: #5c3d2e;
}

/* ============================================================================
   COLUMNAS ESPECÍFICAS
   ============================================================================ */

/* Columna de posición */
.col-posicion {
    text-align: center;
    width: 80px;
}

.posicion-badge {
    display: inline-block;
    font-size: 20px;
    font-weight: 700;
    color: #B34700;
    font-family: 'Georgia', serif;
}

.posicion-badge.posicion-otros {
    font-size: 16px;
    color: #8b6914;
}

/* Columna de participante */
.col-participante {
    min-width: 300px;
}

.participante-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.participante-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FE9000;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(79, 40, 23, 0.2);
}

.participante-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FE9000, #FEBC11);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    color: #4F2817;
    font-family: 'Georgia', serif;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(79, 40, 23, 0.2);
}

.participante-datos {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.participante-alias {
    font-weight: 600;
    color: #4F2817;
    font-size: 15px;
}

.participante-fecha {
    font-size: 12px;
    color: #8b6914;
}

.caches-completados {
    margin-top: 8px;
    padding: 8px;
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border-radius: 6px;
    border-left: 3px solid #FEBC11;
}

.caches-titulo {
    font-size: 11px;
    font-weight: 700;
    color: #B34700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
    font-family: 'Georgia', serif;
}

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

.caches-lista li {
    font-size: 11px;
    color: #5c3d2e;
    padding: 2px 0;
    line-height: 1.4;
}

/* Columna de progreso */
.col-progreso {
    min-width: 150px;
}

.barra-progreso {
    width: 100%;
    height: 24px;
    background: #e8dcc8;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #d4c4a8;
}

.barra-progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #FE9000 0%, #FEBC11 50%, #FE9000 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.barra-progreso-text {
    font-size: 11px;
    font-weight: 700;
    color: #4F2817;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    font-family: 'Georgia', serif;
}

/* Columna de cachés */
.col-caches {
    text-align: center;
}

.caches-count {
    font-weight: 700;
    color: #4F2817;
    font-size: 16px;
}

/* Columna de sats pagados */
.col-pagado {
    text-align: right;
}

.sats-amount {
    font-weight: 700;
    color: #B34700;
    font-size: 15px;
}

/* Columna de estado */
.col-estado {
    text-align: center;
}

.estado-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Georgia', serif;
}

.estado-badge.cumple {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    color: #4F2817;
    border: 1px solid #FEBC11;
}

.estado-badge.no-cumple {
    background: linear-gradient(135deg, #f5eee0, #e8dcc8);
    color: #8b6914;
    border: 1px solid #d4c4a8;
}

/* ============================================================================
   INFORMACIÓN DE GANADORES
   ============================================================================ */
.ganadores-info {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #fff9e6, #fef6e0);
    border-left: 4px solid #FE9000;
    border-radius: 8px;
    color: #B34700;
    font-weight: 600;
    font-family: 'Georgia', serif;
    box-shadow: 0 2px 8px rgba(203, 96, 21, 0.2);
}

/* ============================================================================
   MENSAJES
   ============================================================================ */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #8b6914;
    font-family: 'Georgia', serif;
}

.info-message {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #fef6e0, #fefce8);
    border-radius: 8px;
    color: #B34700;
    font-size: 16px;
    font-family: 'Georgia', serif;
    font-weight: 600;
    border: 2px dashed #FE9000;
    box-shadow: 0 4px 12px rgba(203, 96, 21, 0.1);
}

.error-message {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #fce4d6, #f8d4ba);
    border-radius: 8px;
    color: #B34700;
    font-size: 16px;
    font-family: 'Georgia', serif;
    font-weight: 600;
    border: 2px solid #CB6015;
    box-shadow: 0 4px 12px rgba(203, 96, 21, 0.2);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .tabla-concurso-container {
        padding: 15px;
    }

    .tabla-concurso-header h3 {
        font-size: 22px;
    }

    .reglas-info {
        gap: 10px;
    }

    .regla-item {
        font-size: 12px;
        padding: 6px 12px;
    }

    .tabla-concurso thead th {
        padding: 12px 8px;
        font-size: 12px;
    }

    .tabla-concurso tbody td {
        padding: 12px 8px;
        font-size: 13px;
    }

    .col-posicion {
        width: 50px;
    }

    .participante-alias {
        font-size: 14px;
    }

    .participante-fecha {
        font-size: 11px;
    }

    .participante-avatar,
    .participante-avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .barra-progreso {
        height: 20px;
    }

    .barra-progreso-text {
        font-size: 10px;
    }

    /* Ocultar algunas columnas en móvil */
    .tabla-concurso .col-pagado {
        display: none;
    }
}

@media (max-width: 480px) {
    .tabla-concurso-container {
        padding: 12px;
    }

    .reglas-info {
        flex-direction: column;
        gap: 8px;
    }

    /* Hacer tabla más compacta */
    .tabla-concurso thead th {
        padding: 10px 6px;
        font-size: 11px;
    }

    .tabla-concurso tbody td {
        padding: 10px 6px;
        font-size: 12px;
    }

    .col-participante {
        min-width: 200px;
    }
}
