/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Select2 custom styling with Tailwind */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    min-height: 42px !important;
    background-color: white !important;
    transition: all 0.2s ease !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #C73317 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(199, 51, 23, 0.1) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #C73317 0%, #A02913 100%) !important;
    border: none !important;
    color: white !important;
    border-radius: 0.375rem !important;
    padding: 4px 10px !important;
    margin: 2px 4px 2px 0 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white !important;
    margin-right: 6px !important;
    font-weight: bold !important;
    transition: color 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fecaca !important;
    background: none !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #C73317 !important;
    color: white !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #fee2e2 !important;
    color: #C73317 !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 2px !important;
    font-size: 0.875rem !important;
}

.select2-dropdown {
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    margin-top: 4px !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #C73317 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(199, 51, 23, 0.1) !important;
}

.select2-results__option {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    transition: all 0.15s ease !important;
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
}

/* Animation pour les popups */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out forwards;
}
