/* ===================================
   ORACNOOS - Search System Styles
   Modern Search Modal
   =================================== */

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search Modal */
.search-modal {
    width: 100%;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 229, 255, 0.2);
    transform: translateY(-30px);
    transition: transform var(--transition-slow);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.4s ease-out;
}

.search-overlay.active .search-modal {
    transform: translateY(0);
}

/* Close Button */
.search-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close:hover {
    background: rgba(0, 229, 255, 0.2);
    transform: rotate(90deg);
    box-shadow: var(--shadow-glow);
}

/* Search Header */
.search-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    position: relative;
}

.search-icon {
    color: var(--primary-color);
    font-size: var(--font-size-2xl);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    outline: none;
    padding: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-hint {
    padding: 0.3rem 0.6rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-family: monospace;
}

/* Search Results Container */
.search-results-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

/* Search Stats */
.search-stats {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
}

/* Search Results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: rgba(0, 229, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
}

.search-result-item:hover,
.search-result-item:focus {
    background: rgba(0, 229, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    outline: none;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-category {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--font-size-xs);
    color: var(--primary-color);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.search-result-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    margin: 0 0 0.5rem;
    line-height: var(--line-height-tight);
}

.search-result-title mark {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(124, 77, 255, 0.2) 100%);
    color: var(--primary-light);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.search-result-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-excerpt mark {
    background: rgba(0, 229, 255, 0.15);
    color: var(--text-color);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.search-result-icon {
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    transition: all var(--transition-base);
}

.search-result-item:hover .search-result-icon {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Empty State */
.search-empty {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-muted);
}

.search-empty i {
    font-size: 4rem;
    opacity: 0.2;
    margin-bottom: var(--spacing-lg);
}

.search-empty p {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.search-empty small {
    font-size: var(--font-size-sm);
}

/* Scrollbar */
.search-results-container::-webkit-scrollbar {
    width: 8px;
}

.search-results-container::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-container::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-sm);
}

.search-results-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.4);
}

/* ===================================
   Search Trigger (Nav Button)
   =================================== */

.search-trigger {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ===================================
   Search Hint Tooltip
   =================================== */

.search-hint-tooltip {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

.search-hint-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.search-hint-tooltip kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: var(--font-size-xs);
}

.hint-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.hint-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
    .search-overlay {
        padding: var(--spacing-md);
    }
    
    .search-modal {
        max-height: 90vh;
        border-radius: var(--radius-xl);
    }
    
    .search-header {
        padding: var(--spacing-md);
    }
    
    .search-input {
        font-size: var(--font-size-lg);
    }
    
    .search-hint {
        display: none;
    }
    
    .search-result-item {
        padding: var(--spacing-md);
    }
    
    .search-result-title {
        font-size: var(--font-size-base);
    }
    
    .search-hint-tooltip {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        font-size: var(--font-size-xs);
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .search-close {
        top: var(--spacing-md);
        right: var(--spacing-md);
        width: 36px;
        height: 36px;
    }
    
    .search-result-excerpt {
        -webkit-line-clamp: 1;
    }
}

