/* css/style.css */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 30px;
}

/* Estilos para los botones de control */
.controls {
    display: flex; /* Usar flexbox para alinear botones */
    justify-content: flex-end; /* Alinear a la derecha */
    align-items: center; /* Centrar verticalmente */
    gap: 15px; /* Espacio entre elementos */
    margin-bottom: 20px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: flex; /* Para alinear ícono y texto */
    align-items: center;
    gap: 8px; /* Espacio entre ícono y texto */
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary { /* Nuevo estilo para el botón de voz */
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-secondary.active { /* Estilo cuando el micrófono está escuchando */
    background-color: #dc3545; /* Rojo para indicar grabación */
    animation: pulse 1s infinite alternate; /* Animación de pulso */
}

@keyframes pulse {
    from { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    to { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

.voice-feedback { /* Estilo para el área de feedback de voz */
    margin-left: 10px;
    font-style: italic;
    color: #555;
    min-width: 150px; /* Asegurar que tenga un ancho para el texto */
    text-align: left;
}

/* Estilos específicos para DataTables */
#myDataTable {
    width: 100% !important; /* Asegura que la tabla ocupe todo el ancho disponible */
}

/* Color de fila para estado = 2 */
.estado-rojo {
    background-color: #ffcccc !important; /* Rojo claro para toda la fila */
    color: #cc0000; /* Texto más oscuro para contraste */
    font-weight: bold;
}

/* Responsividad básica para DataTables, DataTables.js maneja gran parte de esto */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    .dataTables_wrapper .dataTables_paginate {
        text-align: center;
    }
    .controls {
        flex-direction: column; /* Apilar botones en pantallas pequeñas */
        align-items: flex-end; /* Alinear a la derecha */
    }
    .voice-feedback {
        margin-left: 0;
        margin-top: 10px;
        text-align: right;
    }
}

/* Mejoras visuales para DataTables */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    margin-left: 0.5em;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    margin-right: 0.5em;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.9em;
    color: #666;
}

/* Ajustes para encabezados y celdas */
#myDataTable th,
#myDataTable td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#myDataTable th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: #555;
}

/* --- Estilos para los Widgets --- */
.widgets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.widget {
    background-color: #e9ecef;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
  /*  min-width: 120px;*/
    flex: 1;
    max-width: 180px;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, border 0.2s ease-in-out;
    cursor: pointer;
}

.widget:hover {
    transform: translateY(-3px);
}

/* Estilo para el widget activo (cuando está filtrando) */
.widget.widget-active {
    background-color: #d1ecf1;
    border: 2px solid #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.widget-label {
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: bold;
}

.widget-count {
    font-size: 1.8em;
    font-weight: bold;
    color: #343a40;
}

/* Responsive adjustments for widgets */
@media (max-width: 768px) {
    .widgets-container {
        justify-content: flex-start;
    }
    .widget {
        flex: 1 1 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .widget {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
