/* Spotlight Search Styles */

.spotlight-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.spotlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: spotlightFadeIn 0.2s ease-out;
}

.spotlight-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: spotlightSlideIn 0.3s ease-out;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.spotlight-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.spotlight-search-icon {
    color: #6c757d;
    margin-right: 12px;
    font-size: 18px;
}

#spotlight-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    background: transparent;
    color: #212529;
    padding: 0;
}

#spotlight-input::placeholder {
    color: #6c757d;
}

.spotlight-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.spotlight-close:hover {
    background: #e9ecef;
    color: #495057;
}

.spotlight-results {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.spotlight-categories {
    padding: 0;
}

.spotlight-category {
    padding: 16px 20px 8px 20px;
}

.spotlight-category:not(:last-child) {
    border-bottom: 1px solid #f1f3f4;
}

.spotlight-category h6 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotlight-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spotlight-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.spotlight-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.spotlight-item-active {
    background: #e3f2fd !important;
    border-color: #2196f3 !important;
}

.spotlight-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-right: 16px;
    color: #6c757d;
    font-size: 16px;
}

.spotlight-item-active .spotlight-item-icon {
    background: #2196f3;
    color: white;
}

.spotlight-item-content {
    flex: 1;
    min-width: 0;
}

.spotlight-item-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.spotlight-item-description {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
}

.spotlight-item-arrow {
    color: #adb5bd;
    font-size: 12px;
    margin-left: 12px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.spotlight-item:hover .spotlight-item-arrow,
.spotlight-item-active .spotlight-item-arrow {
    opacity: 1;
}

.spotlight-footer {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.spotlight-shortcuts {
    display: flex;
    gap: 16px;
    justify-content: center;
    font-size: 12px;
    color: #6c757d;
}

.shortcut-key {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: #495057;
    font-size: 11px;
}

.spotlight-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Highlight matching text */
.spotlight-item-title mark,
.spotlight-item-description mark {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Animations */
@keyframes spotlightFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spotlightSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .spotlight-modal {
        padding-top: 5vh;
    }
    
    .spotlight-container {
        width: 95%;
        max-height: 80vh;
    }
    
    .spotlight-header {
        padding: 16px;
    }
    
    #spotlight-input {
        font-size: 16px;
    }
    
    .spotlight-category {
        padding: 12px 16px 6px 16px;
    }
    
    .spotlight-item {
        padding: 10px 12px;
    }
    
    .spotlight-item-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
        font-size: 14px;
    }
    
    .spotlight-footer {
        padding: 12px 16px;
    }
    
    .spotlight-shortcuts {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Focus styles for accessibility */
#spotlight-input:focus {
    outline: none;
}

.spotlight-item:focus {
    outline: 2px solid #2196f3;
    outline-offset: -2px;
}

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

.spotlight-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.spotlight-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.spotlight-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 