/* ========================================
   Cyberpunk Search Modal Styles
   Terminal-style command palette
   ======================================== */

.search-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-digital);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(8px);
}

.search-container {
    position: relative;
    width: 90%;
    max-width: 640px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    clip-path: polygon(
        0 10px, 10px 0,
        calc(100% - 10px) 0, 100% 10px,
        100% calc(100% - 10px), calc(100% - 10px) 100%,
        10px 100%, 0 calc(100% - 10px)
    );
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.2),
        0 0 40px rgba(0, 255, 136, 0.1);
    transform: translateY(-20px) scale(0.95);
    transition: transform var(--duration-normal) var(--ease-digital);
}

.search-modal.active .search-container {
    transform: translateY(0) scale(1);
}

.search-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.search-header i {
    color: var(--neon-green);
    font-size: 1.25rem;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--fg-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--fg-muted);
}

.search-hint {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-xs) var(--space-sm);
    background: var(--muted-bg);
    border: 1px solid var(--border-color);
    clip-path: polygon(
        0 3px, 3px 0,
        calc(100% - 3px) 0, 100% 3px,
        100% calc(100% - 3px), calc(100% - 3px) 100%,
        3px 100%, 0 calc(100% - 3px)
    );
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-md);
}

.search-result {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: var(--muted-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-digital);
    clip-path: polygon(
        0 6px, 6px 0,
        calc(100% - 6px) 0, 100% 6px,
        100% calc(100% - 6px), calc(100% - 6px) 100%,
        6px 100%, 0 calc(100% - 6px)
    );
}

.search-result:hover,
.search-result.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.result-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--neon-green);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-icon i {
    color: var(--neon-green);
    font-size: 0.9rem;
}

.result-info {
    flex: 1;
}

.result-name {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg-primary);
    margin-bottom: 2px;
}

.result-category {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.result-shortcut {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--fg-muted);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-void);
    border: 1px solid var(--border-color);
    clip-path: polygon(
        0 3px, 3px 0,
        calc(100% - 3px) 0, 100% 3px,
        100% calc(100% - 3px), calc(100% - 3px) 100%,
        3px 100%, 0 calc(100% - 3px)
    );
}

.search-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--fg-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Scrollbar styling */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--muted-bg);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--border-color);
    clip-path: polygon(
        0 3px, 3px 0,
        calc(100% - 3px) 0, 100% 3px,
        100% calc(100% - 3px), calc(100% - 3px) 100%,
        3px 100%, 0 calc(100% - 3px)
    );
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--neon-green);
}

/* Responsive */
@media (max-width: 768px) {
    .search-modal {
        padding-top: 10vh;
    }
    
    .search-container {
        width: 95%;
    }
    
    .search-hint {
        display: none;
    }
}
