/* ===========================================================
   INSIGHTS DE LA SEMANA
   =========================================================== */

/*
.insights-section {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 12px 18px; 
    margin-top: 15px; 
    max-width: 800px; 
}
*/

.insights-section {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.2rem; /* Igualado al padding de evidencias */
    flex-shrink: 0; /* Obligatorio: evita que el carrusel de fotos lo aplaste */
}

/* --- Título y Contenedor de Botones Dinámicos --- */
.insights-header {
    display: flex;
    justify-content: space-between; /* Separa el título (izq) de los botones (der) */
    align-items: center;
    flex-wrap: wrap; /* En caso de pantallas muy pequeñas */
    gap: 8px;
    margin-bottom: 10px;
}

.insights-header h2 {
    font-size: 14px;
    font-weight: 800;
    color: #202124;
    letter-spacing: 0.3px;
    margin-bottom: 0; /* Reseteado porque flexbox ya maneja el espaciado */
}

/* Contenedor de los botones circulares */
.insights-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Botones circulares inyectados desde JS */
.insight-dot-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0.4; /* Opacos cuando no están seleccionados */
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.insight-dot-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.insight-dot-btn.is-active {
    opacity: 1;
    transform: scale(1.15); /* Crece ligeramente */
}

/* Colores de los botones según el 'tono' inyectado y su anillo cuando están activos */
.insight-dot-btn[data-tone="danger"] { background-color: #C5221F; }
.insight-dot-btn[data-tone="danger"].is-active { box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.3); }

.insight-dot-btn[data-tone="warning"] { background-color: #F9A825; }
.insight-dot-btn[data-tone="warning"].is-active { box-shadow: 0 0 0 3px rgba(249, 168, 37, 0.3); }

.insight-dot-btn[data-tone="success"] { background-color: #1E8E3E; }
.insight-dot-btn[data-tone="success"].is-active { box-shadow: 0 0 0 3px rgba(30, 142, 62, 0.3); }

/* --- Panel de detalle (Carrusel) --- */
.insight-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.insight-nav-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #E8EAED;
    background: #FFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5F6368;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.insight-nav-btn:hover {
    background: #F8F9FA;
    color: #202124;
    border-color: #DADCE0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
        
.insight-nav-btn svg {
    width: 18px;
    height: 18px;
}
        
.insight-detail {
    flex: 1;
    background-color: #F8F9FA;
    border-radius: 10px;
    padding: 10px 14px;
    min-height: 70px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
        
.insight-detail-content {
    display: flex;
    gap: 10px;
    width: 100%;
    animation: fadeInCarousel 0.4s ease;
}

@keyframes fadeInCarousel {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}
        
.insight-detail-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 800;
}

.insight-detail-body h3 {
    font-size: 13.5px;
    font-weight: 800;
    color: #202124;
    margin-bottom: 2px;
}

.insight-detail-stats {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}
        
.insight-detail-body p {
    font-size: 11.5px;
    line-height: 1.3;
    color: #5F6368;
    margin: 0;
}

/* Colores del panel de detalle según el tipo de insight */
.insight-detail-content[data-tone="danger"]  .insight-detail-icon { background-color: #C5221F; }
.insight-detail-content[data-tone="danger"]  .insight-detail-stats { color: #C5221F; }

.insight-detail-content[data-tone="warning"] .insight-detail-icon { background-color: #F9A825; }
.insight-detail-content[data-tone="warning"] .insight-detail-stats { color: #B06000; }

.insight-detail-content[data-tone="success"] .insight-detail-icon { background-color: #1E8E3E; }
.insight-detail-content[data-tone="success"] .insight-detail-stats { color: #1E8E3E; }

/* ===========================================================================
   MODO CELULAR (max-width: 768px)
   =========================================================================== */
@media (max-width: 768px) {
    .insight-nav-btn {
        width: 40px;
        height: 40px;
    }
}