/* Search Styles */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}

.search-results-container {
    padding: 10px;
}

.search-results-section {
    margin-bottom: 15px;
}

.search-results-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item {
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item.user-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007aff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.user-info {
    flex: 1;
}

.user-info strong {
    display: block;
    font-size: 14px;
}

.user-info small {
    color: #666;
    font-size: 12px;
}

.message-user-btn {
    padding: 5px 10px;
    font-size: 12px;
}

.post-content-preview p {
    margin: 2px 0;
    font-size: 13px;
    color: #333;
}

.post-content-preview small {
    color: #666;
    font-size: 11px;
}

.media-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.media-result {
    flex-direction: column;
    text-align: center;
    padding: 8px;
}

.media-preview {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.media-info p {
    font-size: 12px;
    margin: 2px 0;
}

.media-info small {
    font-size: 10px;
    color: #666;
}

.search-no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* User search results in messaging */
.user-search-result {
    border-bottom: 1px solid #f0f0f0;
}

.user-search-result:last-child {
    border-bottom: none;
}

.select-user-btn {
    font-size: 12px;
    padding: 5px 10px;
}

/* Global search bar */
.global-search-container {
    position: relative;
    margin: 10px 15px;
}

.global-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.global-search-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0,122,255,0.2);
}

/* Search page styles */
.search-page .search-header {
    padding: 15px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.search-tabs {
    display: flex;
    margin-top: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.search-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
}

.search-tab.active {
    color: #007aff;
    border-bottom-color: #007aff;
}

.search-results-page {
    padding: 15px;
}

.search-result-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}