/* TitleChain Foundation Site Search Styles */

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-nav {
    flex: 1;
}

.search-wrapper {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

#site-search {
    width: 280px;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

#site-search:focus {
    outline: none;
    border-color: #0c4a6e;
    box-shadow: 0 0 0 3px rgba(12, 74, 110, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    width: 18px;
    height: 18px;
}

#search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    min-width: 400px;
}

#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile responsive */
@media (max-width: 1200px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    #site-search {
        width: 100%;
    }
    
    #search-results {
        min-width: auto;
        left: 0;
        right: 0;
    }
}

@media (max-width: 768px) {
    #site-search {
        width: 100%;
        max-width: 100%;
    }
    
    #search-results {
        min-width: auto;
        left: -10px;
        right: -10px;
    }
}

/* Loading state */
.search-loading {
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
}

/* Empty state */
.search-empty {
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
}

/* Highlight matched text */
.search-highlight {
    background: #fef3c7;
    padding: 0 2px;
    border-radius: 2px;
}

