/* autocomplete.css - точно как в workload/index.php */

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

.autocomplete-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.autocomplete-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.autocomplete-input.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.autocomplete-input.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Список подсказок */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestions-list.show {
    display: block;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
    font-size: 14px;
}

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

.suggestion-item:hover,
.suggestion-item.highlighted {
    background-color: #e3f2fd;
}

.suggestion-item.selected {
    background-color: #0d6efd;
    color: white;
}

/* Группы (если используешь) */
.suggestion-group {
    font-size: 11px;
    color: #6c757d;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Элемент с описанием */
.suggestion-item.with-description {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-description {
    font-size: 11px;
    color: #6c757d;
}

.suggestion-item.selected .suggestion-description {
    color: rgba(255, 255, 255, 0.8);
}

/* Пустое состояние */
.suggestions-empty {
    padding: 12px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Загрузка */
.autocomplete-loading {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: autocomplete-spin 0.6s linear infinite;
}

@keyframes autocomplete-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Адаптив */
@media (max-width: 768px) {
    .suggestions-list {
        max-height: 200px;
    }
}