.katman-select {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 200px;
}

.katman-selection {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.katman-select:not(.katman-open) .katman-selection:hover {
    border-color: #3b82f6;
}

.katman-select.katman-open .katman-selection {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.katman-selection-rendered {
    flex: 1;
    overflow: hidden;
}

.katman-selection-text {
    display: block;
    padding: 6px 0;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.katman-search-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 6px 0;
    background: transparent;
    color: #374151;
    font-size: 14px;
}

    .katman-search-input::placeholder {
        color: #9ca3af;
    }

.katman-clear {
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.15s ease;
}

    .katman-clear:hover {
        color: #374151;
    }

.katman-arrow {
    color: #6b7280;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.15s ease;
}

.katman-open .katman-arrow {
    transform: rotate(180deg);
}

.katman-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #3b82f6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.katman-open .katman-dropdown {
    display: block;
}

.katman-results {
    padding: 4px 0;
}

.katman-option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.15s ease;
    font-size: 14px;
}

    .katman-option:hover:not(.disabled) {
        background-color: #f3f4f6;
    }

    .katman-option.selected {
        background-color: #eff6ff;
        color: #1d4ed8;
    }

    .katman-option.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .katman-option.katman-select-all {
        border-bottom: 1px solid #e5e7eb;
        font-weight: 600;
        color: #3b82f6;
    }

    .katman-option input[type="checkbox"] {
        margin: 0;
        width: 14px;
        height: 14px;
    }

.katman-no-results {
    padding: 8px 12px;
    color: #6b7280;
    font-style: italic;
    text-align: center;
    font-size: 14px;
}

/* Multiple select styling */
.katman-multiple .katman-selection-text {
    font-weight: 500;
}

/* Disabled state */
.katman-select.disabled .katman-selection {
    background-color: #f9fafb;
    cursor: not-allowed;
    opacity: 0.6;
}

    .katman-select.disabled .katman-selection * {
        cursor: not-allowed !important;
    }

/* Responsive */
@media (max-width: 768px) {
    .katman-dropdown {
        max-height: 150px;
    }
}
