/* =====================================================
   Tabelas Responsivas - ClubeMix
   =====================================================
   Descrição: Estilos para tornar tabelas responsivas
   Data: 2025-11-09
   ===================================================== */

/* Container de Tabela Responsiva */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.table-responsive table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

/* Scrollbar Personalizada */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* Layout em Cards para Mobile */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        overflow-x: visible;
    }
    
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }
    
    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-responsive tr {
        border: 1px solid rgba(255, 215, 0, 0.2);
        margin-bottom: 1rem;
        border-radius: 0.5rem;
        padding: 1rem;
        background: rgba(30, 30, 30, 0.5);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .table-responsive td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        padding-right: 0.5rem;
        text-align: left;
        word-wrap: break-word;
    }
    
    .table-responsive td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #FFD700;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }
    
    .table-responsive td:empty:before {
        content: '';
    }
    
    /* Ajustes para células de ação */
    .table-responsive td[data-label*="Ação"]:before,
    .table-responsive td[data-label*="Ações"]:before {
        display: none;
    }
    
    .table-responsive td[data-label*="Ação"],
    .table-responsive td[data-label*="Ações"] {
        padding-left: 0.5rem !important;
        text-align: center;
    }
}

/* Tablet - Layout Híbrido */
@media (min-width: 769px) and (max-width: 1024px) {
    .table-responsive {
        overflow-x: auto;
    }
    
    .table-responsive table {
        min-width: 800px;
    }
    
    /* Reduzir padding em tablets */
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Indicador de Scroll Horizontal */
.table-responsive::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (min-width: 769px) {
    .table-responsive.scrollable::after {
        opacity: 1;
    }
}

/* Melhorias para Acessibilidade */
.table-responsive table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-responsive th {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10;
}

@media (max-width: 768px) {
    .table-responsive th {
        position: static;
    }
}

