.taxonomy-dropdown-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.taxonomy-dropdown {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.taxonomy-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 84, 178, 0.25);
}

.taxonomy-dropdown::-ms-expand {
    display: none;
}

.taxonomy-dropdown option {
    padding: 10px;
}

.taxonomy-dropdown-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* Animación del ícono cuando el dropdown está abierto */
.taxonomy-dropdown:focus + .taxonomy-dropdown-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* Estilos para dispositivos móviles */
@media screen and (max-width: 767px) {
    .taxonomy-dropdown {
        padding-right: 40px; /* Más espacio para el ícono en móviles */
    }
    
    .taxonomy-dropdown-icon {
        font-size: 20px; /* Ícono más grande en móviles */
    }
}

/* Estilos para el modal de confirmación personalizado */
.taxonomy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.taxonomy-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.taxonomy-modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.taxonomy-modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.taxonomy-modal-confirm {
    background-color: #4054b2;
    color: white;
}

.taxonomy-modal-confirm:hover {
    background-color: #344497;
}

.taxonomy-modal-cancel {
    background-color: #e0e0e0;
    color: #333;
}

.taxonomy-modal-cancel:hover {
    background-color: #d0d0d0;
}

/* Estilos para el estado de carga */
.taxonomy-dropdown-wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

.taxonomy-dropdown-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #4054b2;
    border-radius: 50%;
    border-top-color: transparent;
    animation: taxonomy-spinner 0.8s linear infinite;
}

@keyframes taxonomy-spinner {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}