/* ================================
   GSheet Viewer - Estilos Generales
   ================================ */

.gsheet-container {
    max-width: 100%;
    overflow-x: auto;
    font-family: Arial, sans-serif;
    padding: 10px;
}

/* Estilo de la tabla en escritorio */
.gsheet-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background-color: #fff;
}

.gsheet-container th,
.gsheet-container td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
    font-size: 14px;
}

.gsheet-container th {
    background-color: #7D2B7A;  /* Azul de encabezados */
    color: #fff;
    font-weight: bold;
    text-align: center;
}

.gsheet-container tr:nth-child(even) td {
    background-color: #f9f9f9; /* Alternar color filas */
}

.gsheet-container tr:hover td {
    background-color: #f1f1f1; /* Efecto hover */
}

/* ================================
   Modo Responsive (Móviles)
   ================================ */

@media (max-width: 600px) {
    /* Forzar que cada parte de la tabla se muestre en bloques */
    .gsheet-container table,
    .gsheet-container thead,
    .gsheet-container tbody,
    .gsheet-container th,
    .gsheet-container td,
    .gsheet-container tr {
        display: block;
        width: 100%;
    }

    /* 🔴 Ocultar encabezados superiores en móvil */
    .gsheet-container thead {
        display: none;
    }

    /* Cada fila será un bloque con separación */
    .gsheet-container tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
        background: #fff;
    }

    /* Ajustar las celdas para modo apilado */
    .gsheet-container td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
        font-size: 14px;
        min-height: 40px;
    }

    /* ✅ Etiquetas a la izquierda de cada dato */
    .gsheet-container td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
        color: #0073aa; /* Color de las etiquetas en móvil */
    }

    /* Opcional: Mejorar el aspecto de filas */
    .gsheet-container tr:last-child td {
        border-bottom: none;
    }
}
