/**
 * IntelliDB Enterprise - SQL Autocomplete Styles
 * Modern, clean autocomplete UI
 */

.sql-autocomplete-box {
    position: fixed;
    background: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    min-width: 300px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #2d2d2d;
}

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

.autocomplete-item:hover {
    background-color: #2d2d2d;
}

.autocomplete-item.selected {
    background-color: #094771;
}

.autocomplete-icon {
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.autocomplete-text {
    flex: 1;
    color: #d4d4d4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-text strong {
    color: #4ec9b0;
    font-weight: 600;
}

.autocomplete-meta {
    margin-left: 10px;
    color: #858585;
    font-size: 11px;
    flex-shrink: 0;
}

/* Scrollbar styling */
.sql-autocomplete-box::-webkit-scrollbar {
    width: 8px;
}

.sql-autocomplete-box::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.sql-autocomplete-box::-webkit-scrollbar-thumb {
    background: #3c3c3c;
    border-radius: 4px;
}

.sql-autocomplete-box::-webkit-scrollbar-thumb:hover {
    background: #4c4c4c;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sql-autocomplete-box {
    animation: fadeIn 0.15s ease-out;
}

/* Light theme support */
@media (prefers-color-scheme: light) {
    .sql-autocomplete-box {
        background: #ffffff;
        border-color: #d4d4d4;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .autocomplete-item {
        border-bottom-color: #e8e8e8;
    }

    .autocomplete-item:hover {
        background-color: #f3f3f3;
    }

    .autocomplete-item.selected {
        background-color: #0078d4;
    }

    .autocomplete-item.selected .autocomplete-text {
        color: #ffffff;
    }

    .autocomplete-text {
        color: #1e1e1e;
    }

    .autocomplete-text strong {
        color: #0078d4;
    }

    .autocomplete-meta {
        color: #6e6e6e;
    }

    .sql-autocomplete-box::-webkit-scrollbar-track {
        background: #f3f3f3;
    }

    .sql-autocomplete-box::-webkit-scrollbar-thumb {
        background: #c8c8c8;
    }

    .sql-autocomplete-box::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
}