﻿.combo-wrapper {
    margin-bottom: 2rem;
}

.combo-container {
    position: relative;
    width: 100%;
}

.combo-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .combo-input:focus {
        outline: none;
        border-color: #4a90e2;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    }

.combo-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 35px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

    .combo-button:hover {
        color: #333;
    }

.combo-clear-button {
    position: absolute;
    right: 35px;
    top: 0;
    height: 100%;
    width: 35px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: none;
    padding: 0;
    transition: color 0.2s;
}

    .combo-clear-button:hover {
        color: #333;
    }

    .combo-clear-button:disabled,
    .combo-button:disabled {
        color: #ccc;
        cursor: not-allowed;
    }

.combo-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.combo-button.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.combo-listbox {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
    display: none;
    scroll-behavior: smooth;
}

    .combo-listbox.show {
        display: block;
    }

.combo-option {
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
}

    .combo-option:hover {
        background-color: #f5f5f5;
    }

    .combo-option.highlighted {
        background-color: #e8f0fe;
    }

    .combo-option.selected {
        background-color: #4a90e2;
        color: white;
    }

    .combo-option:focus {
        outline: 2px solid #4a90e2;
        outline-offset: -2px;
    }

.combo-input::placeholder {
    color: #999;
    opacity: 1;
}
