/* Sidebar Search - Bottom Search Bar */

.sidebar-search-container {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.sidebar-search {
    position: relative;
    width: 100%;
}

.sidebar-search-input {
    width: 100%;
    padding: 0.6rem 0.875rem 0.6rem 2.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8125rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.sidebar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.sidebar-search-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
}

.sidebar-search-input:focus ~ .search-icon {
    color: #4CAF50;
}

/* Search Results Dropdown */
.sidebar-search-results {
    position: fixed;
    bottom: auto;
    left: 20px;
    width: 280px;
    background: rgba(24, 26, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
}

.search-results-section {
    padding: 0.75rem 0;
}

.search-results-section:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-section-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-result-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(76, 175, 80, 0.2);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.125rem;
}

.search-result-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.search-loading {
    padding: 1.5rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.search-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scrollbar for results */
.sidebar-search-results::-webkit-scrollbar {
    width: 6px;
}

.sidebar-search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar-search-input {
        padding: 0.6rem 0.75rem 0.6rem 2.25rem;
        font-size: 0.8125rem;
    }
    
    .search-icon {
        left: 0.75rem;
        font-size: 0.8125rem;
    }
    
    .sidebar-search-results {
        max-height: 300px;
    }
    
    .search-result-avatar {
        width: 32px;
        height: 32px;
    }
}
