

.tag-autocomplete-container {
    position: relative;
    width: 100%;
}

.tag-input-wrapper {
    position: relative;
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    background-color: #fff;
    color: #212529;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.tag-input-wrapper:focus-within {
    border-color: #86b7fe;
    outline: 0;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.selected-tags .badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.selected-tags .btn-close {
    font-size: 0.75rem;
    padding: 0;
    margin: 0;
    width: 0.75rem;
    height: 0.75rem;
    background-size: 0.75rem;
}

.tag-input-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 120px;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529 !important;
}

.tag-input-wrapper input::placeholder {
    color: #6c757d;
    opacity: 1;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease-in-out;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}


.tag-input-wrapper {
    background-color: #fff !important;
    border-color: #ced4da !important;
    color: #212529 !important;
}

.tag-input-wrapper input {
    color: #212529 !important;
}

.tag-input-wrapper input::placeholder {
    color: #6c757d !important;
}

.suggestions-dropdown {
    background: #fff !important;
    border-color: #ced4da !important;
}

.suggestion-item {
    border-bottom-color: #f8f9fa !important;
    color: #212529 !important;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f8f9fa !important;
}


@media (max-width: 576px) {
    .selected-tags .badge {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
    }
    
    .selected-tags .btn-close {
        width: 0.625rem;
        height: 0.625rem;
        background-size: 0.625rem;
    }
    
    .tag-input-wrapper input {
        min-width: 80px;
        font-size: 0.875rem;
    }
}


.selected-tags .badge {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.selected-tags .btn-close:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.suggestion-item:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}


.suggestions-dropdown.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: #6c757d;
}

.suggestions-dropdown.loading::before {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.suggestions-dropdown.error {
    padding: 0.5rem 0.75rem;
    color: #dc3545;
    font-size: 0.875rem;
}


.suggestions-dropdown.empty {
    padding: 0.5rem 0.75rem;
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
}

