/* Atacamos al contenedor y a CUALQUIER hijo directo que Kadence genere */
.contenedor-selector, 
.contenedor-selector > div, 
.contenedor-selector .kt-row-column-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    gap: 12px !important;
    -webkit-overflow-scrolling: touch;
}

/* Forzamos que los botones no acepten órdenes de estiramiento */
.contenedor-selector button.boton-medio {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: fit-content !important;
    max-width: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;

    /* Estética */
    margin: 5px 0 !important;
    padding: 10px 20px !important;
    background-color: #f9f9f9;
    border: 1px solid #f2f2f2;
    color: #454545;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}

.contenedor-selector button.boton-medio.activo {
    background-color: #c00000 !important;
    color: #ffffff !important;
    border-color: #990000 !important;
}

/* Scroll horizontal: barra fina y discreta */
.contenedor-selector .kt-row-column-wrap {
    overflow-x: auto !important;
    padding-bottom: 15px !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.contenedor-selector .kt-row-column-wrap::-webkit-scrollbar {
    display: block !important;
    height: 4px !important;
}

.contenedor-selector .kt-row-column-wrap::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}

/* -------------------------------------------------------
   Flechas de navegación del selector de medios
   Solo visibles en tablet y desktop (>= 768px)
------------------------------------------------------- */
.selector-medios-wrapper {
    position: relative;
}

.selector-nav-flecha {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    z-index: 10;
    border: none;
    outline: none;
    border-radius: 50%;
    background: #c00000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.selector-nav-flecha:hover {
    background: #990000;
}

.selector-nav-flecha svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #ffffff;
}

.selector-nav-flecha.izquierda {
    left: 0;
}

.selector-nav-flecha.derecha {
    right: 0;
}


.selector-nav-flecha.oculta {
    opacity: 0;
    pointer-events: none;
}

/* Mostrar flechas solo en tablet y desktop */
@media (min-width: 768px) {
    .selector-nav-flecha {
        display: flex;
    }
}

.grafico-wrapper {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f2f2f2;
}

.no-data {
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    color: #888;
}