/* Search Component Styles */

/* Header Search Dropdown */
#searchDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Input Focus Effects */
#searchInput:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
    transition: all 0.3s ease;
}

/* Search Suggestions Styling */
.search-suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-suggestion-item:hover {
    background-color: #f8f9fc;
    transform: translateX(5px);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

/* Trending Search Items */
.trending-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.trending-item:hover {
    background-color: rgba(78, 115, 223, 0.1);
    transform: translateX(3px);
}

/* Recent Search Tags */
.recent-search-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 1rem;
    font-size: 0.75rem;
    margin: 0.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.recent-search-tag:hover {
    background-color: #4e73df;
    color: white;
    transform: scale(1.05);
}

/* Search Results Page Styles */

/* Filter Sidebar */
.search-filters {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid #e3e6f0;
}

.filter-section {
    border-bottom: 1px solid #f8f9fc;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Search Type Radio Buttons */
.btn-check:checked + .btn-outline-primary {
    background-color: #4e73df;
    border-color: #4e73df;
    color: white;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Search Result Cards */
.user-card,
.post-card,
.group-card {
    transition: all 0.3s ease;
    border: 1px solid #e3e6f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.user-card:hover,
.post-card:hover,
.group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-color: #4e73df;
}

/* User Card Specific */
.user-card .card-body {
    padding: 1.5rem;
}

.user-card .avatar {
    width: 80px;
    height: 80px;
    border: 3px solid #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.user-card:hover .avatar {
    transform: scale(1.1);
    border-color: #4e73df;
}

/* Post Card Specific */
.post-card {
    margin-bottom: 1rem;
}

.post-card .user-avatar {
    width: 50px;
    height: 50px;
    border: 2px solid #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.post-engagement {
    border-top: 1px solid #f8f9fc;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.post-engagement .btn-link {
    color: #858796;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-engagement .btn-link:hover {
    color: #4e73df;
    transform: scale(1.1);
}

/* Group Card Specific */
.group-card .group-cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.group-card:hover .group-cover {
    transform: scale(1.05);
}

/* Result Summary Badges */
.result-summary-badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.result-summary-badge:hover {
    transform: scale(1.05);
}

/* Loading Animation */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.search-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid #f8f9fc;
    border-top: 0.3rem solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results-icon {
    font-size: 4rem;
    color: #d1d3e2;
    margin-bottom: 1rem;
}

/* Pagination Styling */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    color: #5a5c69;
    background-color: #fff;
    border: 1px solid #dddfeb;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: #4e73df;
    background-color: #f8f9fc;
    border-color: #4e73df;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
    color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(78, 115, 223, 0.3);
}

.page-item.disabled .page-link {
    color: #858796;
    background-color: #f8f9fc;
    border-color: #dddfeb;
}

/* Relevance Score Badge */
.relevance-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Search Header */
.search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-header h4 {
    color: white;
    margin-bottom: 0.5rem;
}

/* Section Headers */
.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fc;
}

.search-section-header h5 {
    margin: 0;
    font-weight: 600;
}

.see-all-btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.see-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #searchDropdown {
        left: -1rem;
        right: -1rem;
        margin-top: 0.5rem;
    }
    
    .search-filters {
        margin-bottom: 1rem;
    }
    
    .user-card,
    .group-card {
        margin-bottom: 1rem;
    }
    
    .search-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .search-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Dark Mode Support */
[data-bs-theme="dark"] #searchDropdown {
    background: #2d3748;
    border-color: #4a5568;
}

[data-bs-theme="dark"] .search-suggestion-item:hover {
    background-color: #4a5568;
}

[data-bs-theme="dark"] .trending-item:hover {
    background-color: rgba(78, 115, 223, 0.2);
}

[data-bs-theme="dark"] .user-card,
[data-bs-theme="dark"] .post-card,
[data-bs-theme="dark"] .group-card {
    background: #2d3748;
    border-color: #4a5568;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Input Enhancements */
.search-input-container {
    position: relative;
}

.search-input-container .form-control {
    padding-left: 2.5rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.search-input-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #858796;
    z-index: 10;
}

/* Search Filters Enhancement */
.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    font-weight: 600;
    color: #5a5c69;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-control {
    width: 100%;
    border-radius: 0.25rem;
    border: 1px solid #d1d3e2;
    transition: all 0.2s ease;
}

.filter-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
} 