/* Contenedor del botón dinámico - CAMBIADO A VERDE EXCEL */
.btn-dynamic-xls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 35px;
    min-width: 35px;
    border-radius: 50px;
    /* CORRECCIÓN DE COLOR: Verde (#198754) */
    border: 2px solid #198754;
    background-color: white;
    color: #198754;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
    font-weight: bold;
}

/* Icono Excel */
.btn-dynamic-xls .icon-xls {
    font-size: 1.2rem;
    margin-left: 11px;
    transition: margin 0.4s ease;
}

/* Texto "Exportar" */
.btn-dynamic-xls .text-label {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-left: 0;
}

/* Flecha */
/* CORRECCIÓN DE SINTAXIS: Se agregó el espacio entre .btn-dynamic-xls y .icon-arrow */
.btn-dynamic-xls .icon-arrow {
    font-size: 1rem;
    margin-left: 5px;
    margin-right: 11px;
    opacity: 1;
    max-width: 20px;
    transition: all 0.3s ease;
}

/* --- ESTADO HOVER --- */

/* 1. Cambios en el contenedor (se hace VERDE y ancho) */
.dropdown-hover-mode:hover .btn-dynamic-xls, /* Ajusté este selector para que coincida con tu lógica HTML */
.btn-dynamic-xls:hover {
    /* CORRECCIÓN DE COLOR: Fondo Verde */
    background-color: #198754;
    color: white;
    padding-right: 15px;
    padding-left: 5px;
}

/* 2. El icono Excel se mueve */
.dropdown-hover-mode:hover .btn-dynamic-xls .icon-xls,
.btn-dynamic-xls:hover .icon-xls {
    margin-left: 0;
}

/* 3. Aparece el texto */
.dropdown-hover-mode:hover .btn-dynamic-xls .text-label,
.btn-dynamic-xls:hover .text-label {
    max-width: 100px;
    opacity: 1;
    margin-left: 8px;
}

/* 4. Desaparece la flecha */
.dropdown-hover-mode:hover .btn-dynamic-xls .icon-arrow,
.btn-dynamic-xls:hover .icon-arrow {
    opacity: 0;
    max-width: 0;
    margin: 0;
}

/* --- LÓGICA PARA ABRIR EL MENÚ (ESTA PARTE ESTABA PERFECTA) --- */

.dropdown-hover-mode .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    margin-top: 10px;
    transition: all 0.3s ease;
    transition-delay: 0.2s; /* EL TIEMPO DE ESPERA */
}

/* Puente Invisible */
.dropdown-hover-mode .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: transparent;
}

/* Estado Visible */
.dropdown-hover-mode:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    margin-top: 5px;
    transition-delay: 0s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}