/* CSS simple pour améliorer l'apparence du select2 multiple */
.select2-container {
    display: block !important;
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    min-height: 42px;
    padding: 6px 8px;
    background-color: white;
    line-height: 1.5;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    @apply bg-bungalow-blue;
    border: none;
    color: white;
    border-radius: 0.25rem;
    padding: 6px 10px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    white-space: nowrap;
    max-width: 200px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    padding-left: 8px;
    padding-right: 6px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin: 0;
    border: none;
    font-weight: bold;
    padding: 2px;
    height: 100%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fee2e2;
}

.select2-dropdown {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    z-index: 9999;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.select2-container--default .select2-results__option {
    padding: 8px 12px;
    line-height: 1.5;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    @apply bg-bungalow-blue;
    color: white;
}

.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 2px;
    padding: 2px 4px;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    min-width: 120px;
}

/* Assurer que le dropdown apparaît au-dessus des autres éléments */
.select2-container--open .select2-dropdown {
    z-index: 9999 !important;
}

/* Style pour les états de focus et hover */
.select2-container--default.select2-container--focus .select2-selection--multiple {
    @apply border-bungalow-blue shadow-bungalow-blue;
    box-shadow: 0 0 0 1px theme('colors.bungalow-blue');
}

/* Améliorer l'espacement pour les longs textes */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    max-width: calc(100% - 20px);
}

@media (max-width: 640px) {
    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        max-width: calc(100% - 10px);
        font-size: 13px;
    }
} 