/* Command Palette Styles */

.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.command-palette-modal {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 640px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
    position: relative;
    z-index: 10000;
    pointer-events: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.command-palette-search {
    padding: 16px;
    border-bottom: 1px solid var(--bs-border-color);
}

.command-palette-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: none;
    background-color: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    border-radius: 8px;
    outline: none;
    transition: background-color 0.15s ease;
}

.command-palette-input:focus {
    background-color: var(--bs-tertiary-bg);
}

.command-palette-input::placeholder {
    color: var(--bs-secondary-color);
}

.command-palette-results {
    overflow-y: auto;
    max-height: calc(60vh - 80px);
    padding: 8px;
    position: relative;
    z-index: 1;
}

.command-palette-item {
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.1s ease;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    user-select: none;
}

.command-palette-item:hover,
.command-palette-item.selected {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.command-palette-item.selected {
    transform: scale(1.01);
}

.command-palette-item-label {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    pointer-events: none;
}

.command-palette-item-path {
    font-size: 13px;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
    pointer-events: none;
}

.command-palette-no-results {
    padding: 32px 16px;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 14px;
}

/* Custom scrollbar for results */
.command-palette-results::-webkit-scrollbar {
    width: 8px;
}

.command-palette-results::-webkit-scrollbar-track {
    background: transparent;
}

.command-palette-results::-webkit-scrollbar-thumb {
    background-color: var(--bs-border-color);
    border-radius: 4px;
}

.command-palette-results::-webkit-scrollbar-thumb:hover {
    background-color: var(--bs-secondary-color);
}

/* Light theme adjustments */
[data-bs-theme="light"] .command-palette-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .command-palette-modal {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .command-palette-overlay {
        padding-top: 10vh;
    }

    .command-palette-modal {
        width: 95%;
        max-height: 70vh;
    }

    .command-palette-item-label {
        font-size: 14px;
    }

    .command-palette-item-path {
        font-size: 12px;
    }
}
