/**
 * Unified Community Hub - Combined Social Feed and Forum Layout
 *
 * A comprehensive stylesheet that provides consistent styling for the 
 * combined social feed and forum interface with tabbed navigation.
 */

/* Core Layout Structure */
.unified-hub-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.full-width-layout {
    overflow-x: hidden;
}

body.full-width-layout .content-wrapper {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

body.full-width-layout #content {
    max-width: 100%;
    padding: 0;
}

/* Tab Navigation */
.unified-hub-tabs {
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 20px 10px;
    position: relative;
    background-color: #fff;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #4f46e5;
}

.tab-button.active {
    color: #4f46e5;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #4f46e5;
    border-radius: 3px 3px 0 0;
}

.notification-indicator {
    margin-left: auto;
}

.notification-button {
    background: none;
    border: none;
    position: relative;
    cursor: pointer;
    padding: 8px;
}

.notification-icon {
    font-size: 20px;
}

.notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Layout */
.unified-hub-content {
    display: flex;
    min-height: 100vh;
    background-color: #d1d5db;
}

/* Sidebar Common Styles */
.unified-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: white;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #e5e7eb;
}

.right-sidebar {
    border-right: none;
    border-left: 1px solid #e5e7eb;
}

.sidebar-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 18px;
    color: #1e293b;
    margin: 0;
    font-weight: 600;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-list li {
    margin-bottom: 6px;
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #334155;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 400;
}

.sidebar-list a:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.sidebar-list a.active {
    background-color: #eef2ff;
    color: #4f46e5;
    font-weight: 500;
}

.sidebar-list .count {
    background-color: #f1f5f9;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    color: #64748b;
}

.sidebar-list .time {
    font-size: 12px;
    color: #94a3b8;
}

/* Main Content Area */
.unified-content-area {
    flex: 1;
    max-width: 900px;
    padding: 0 30px;
    margin: 0 auto;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* Content Header Styles */
.content-header {
    background-color: white;
    border-radius: 10px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

.content-header h1 {
    font-size: 24px;
    color: #1e293b;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.content-header p {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.content-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.create-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-button .icon {
    font-size: 16px;
    font-weight: bold;
}

.create-button:hover {
    background-color: #4338ca;
}

.content-filters {
    display: flex;
    gap: 8px;
}

.filter-button {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.filter-button:hover {
    border-color: #cbd5e1;
    color: #334155;
}

.filter-button.active {
    background-color: #f8fafc;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-button {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.view-button:hover {
    border-color: #cbd5e1;
    color: #334155;
}

.view-button.active {
    background-color: #f8fafc;
    color: #4f46e5;
    border-color: #c7d2fe;
}

/* Post/Feed Styles */
.social-feed-posts {
    display: flex !important;
    flex-direction: column;
    width: 100%;
}

.feed-post {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.feed-post:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.post-voting {
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    border-right: 1px solid #f1f5f9;
}

.vote-up, .vote-down {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #94a3b8;
    padding: 5px;
    transition: color 0.2s;
}

.vote-up:hover {
    color: #4f46e5;
}

.vote-down:hover {
    color: #ef4444;
}

.vote-up.active {
    color: #4f46e5;
}

.vote-down.active {
    color: #ef4444;
}

.vote-count {
    font-weight: 700;
    color: #1e293b;
    margin: 8px 0;
    font-size: 16px;
}

.post-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.post-header {
    margin-bottom: 15px;
}

.post-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-tag.question {
    background-color: #eef2ff;
    color: #4f46e5;
}

.post-tag.progress {
    background-color: #ecfdf5;
    color: #047857;
}

.post-tag.audio {
    background-color: #fff1f2;
    color: #e11d48;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.post-body {
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-body p {
    margin-bottom: 12px;
}

.post-body ul, .post-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    margin-top: auto;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
}

.post-author {
    font-weight: 500;
    color: #334155;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.reply-button, .share-button {
    background-color: #f1f5f9;
    border: none;
    color: #334155;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reply-button:hover, .share-button:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* Audio Player Container */
.audio-player-container {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.audio-player {
    width: 100%;
    margin-bottom: 15px;
}

.audio-waveform {
    height: 80px;
    background-color: #e2e8f0;
    border-radius: 6px;
    margin-bottom: 15px;
}

.audio-feedback-buttons {
    display: flex;
    gap: 15px;
}

.audio-feedback-positive, 
.audio-feedback-negative {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.audio-feedback-positive:hover {
    background-color: #ecfdf5;
    border-color: #10b981;
}

.audio-feedback-negative:hover {
    background-color: #fff1f2;
    border-color: #f43f5e;
}

.audio-feedback-positive .icon,
.audio-feedback-negative .icon {
    font-size: 16px;
}

.audio-feedback-positive .count,
.audio-feedback-negative .count {
    font-weight: 500;
}

/* Forum Topic Styles */
.forum-topics-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.topic-section {
    margin-bottom: 40px;
}

.topic-section-title {
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.topic-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Grid View */
.forum-topics-container.grid-view .topic-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.topic-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.topic-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.topic-item.pinned {
    background-color: #fef9c3;
    border-color: #fde047;
}

.topic-indicator {
    font-size: 20px;
    color: #64748b;
    margin-right: 5px;
}

.topic-badge {
    display: inline-block;
}

.topic-badge.new {
    color: #4f46e5;
}

.topic-badge.hot {
    color: #ef4444;
}

.topic-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
}

.topic-info {
    flex: 1;
}

.topic-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.topic-category {
    font-weight: 500;
    color: #4f46e5;
}

/* Notification Panel */
.notification-panel {
    margin-bottom: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h3 {
    font-size: 16px;
    color: #1e293b;
    margin: 0;
    font-weight: 600;
}

.mark-all-read {
    background: none;
    border: none;
    color: #4f46e5;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.notification {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.notification:hover {
    background-color: #f8fafc;
}

.notification.unread {
    background-color: #eef2ff;
}

.notification-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-icon.upvote {
    background-color: #ecfdf5;
    color: #10b981;
}

.notification-icon.reply {
    background-color: #eef2ff;
    color: #4f46e5;
}

.notification-icon.mention {
    background-color: #fff1f2;
    color: #e11d48;
}

.notification-icon.audio {
    background-color: #fffbeb;
    color: #f59e0b;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 5px 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: #94a3b8;
}

.notification-settings {
    margin-top: 15px;
    text-align: center;
}

.notification-settings a {
    color: #4f46e5;
    font-size: 14px;
    text-decoration: none;
}

.notification-settings a:hover {
    text-decoration: underline;
}

/* Trending Section */
.trending-section {
    margin-bottom: 30px;
}

.trending-section h3 {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.trending-topics {
    margin-bottom: 20px;
}

.trending-topic {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.trending-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.trending-text {
    flex: 1;
    color: #334155;
    font-weight: 500;
}

.trending-count {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
}

/* Events Section */
.upcoming-events {
    margin-top: 30px;
}

.upcoming-events h3 {
    font-size: 16px;
    color: #1e293b;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.event-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 15px;
}

.event-date {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 14px;
    font-weight: 700;
    color: #4f46e5;
    line-height: 1.2;
}

.event-details h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.event-details p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.event-link {
    font-size: 14px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.event-link:hover {
    text-decoration: underline;
}

/* Modals */
.unified-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* Forms */
.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
    font-size: 15px;
}

.form-field input[type="text"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background-color: #f8fafc;
    transition: all 0.2s;
}

.form-field input[type="text"]:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.form-field input[type="file"] {
    padding: 10px;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    width: 100%;
}

.audio-upload-field {
    margin-top: 15px;
}

.audio-preview {
    margin-top: 10px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f1f5f9;
    display: none;
}

.submit-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 15px;
}

.submit-button:hover {
    background-color: #4338ca;
}

/* Responsive Adaptations */
@media (max-width: 1200px) {
    .unified-hub-content {
        flex-direction: column;
    }
    
    .unified-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: static;
        margin-bottom: 20px;
        border: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .unified-content-area {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .right-sidebar {
        order: 3;
        border: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .forum-topics-container.grid-view .topic-items {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .unified-hub-container {
        padding: 0;
    }
    
    .unified-hub-tabs {
        padding: 10px;
    }
    
    .post-voting,
    .topic-voting {
        padding: 15px 0;
        width: 50px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-title,
    .topic-title {
        font-size: 16px;
    }
    
    .post-body {
        font-size: 14px;
    }
    
    .audio-player-container {
        padding: 10px;
    }
    
    .audio-waveform {
        height: 60px;
    }
    
    .content-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .content-filters,
    .view-toggle {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: space-between;
    }
    
    .forum-topics-container.grid-view .topic-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .post-footer,
    .topic-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
    }
}