/**
 * Creator Newsfeed - Slido-inspired Community Interface
 *
 * A modern, engagement-focused newsfeed layout for the creator community
 * that prioritizes upvoting, audio sharing, and trending topics.
 */

/* Main Layout Structure */
.creator-newsfeed-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* Left Sidebar */
.creator-newsfeed-sidebar {
    width: 260px;
    min-width: 260px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 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;
}

/* Main Content */
.creator-newsfeed-main {
    flex: 1;
    max-width: 700px;
}

.newsfeed-header {
    background-color: white;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

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

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

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

.create-post-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-post-button .icon {
    font-size: 16px;
    font-weight: bold;
}

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

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

.newsfeed-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;
}

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

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

/* Posts */
.newsfeed-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.newsfeed-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;
}

.newsfeed-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-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;
}

/* Right Sidebar - Trending */
.creator-newsfeed-trending {
    width: 280px;
    min-width: 280px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

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

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

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

.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 */
.newsfeed-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;
}

/* Reply container */
.post-replies-container {
    margin-top: 15px;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    display: none;
}

.post-reply {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e7eb;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 700;
    font-size: 14px;
}

.reply-author {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.reply-date {
    color: #94a3b8;
    font-size: 12px;
    margin-left: 10px;
}

.reply-content {
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.reply-actions {
    display: flex;
    gap: 15px;
}

.reply-like, .reply-dislike {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.reply-like:hover {
    color: #10b981;
}

.reply-dislike:hover {
    color: #ef4444;
}

/* Responsive Adaptations */
@media (max-width: 1200px) {
    .creator-newsfeed-container {
        flex-direction: column;
    }
    
    .creator-newsfeed-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: static;
        margin-bottom: 20px;
    }
    
    .creator-newsfeed-main {
        max-width: 100%;
    }
    
    .creator-newsfeed-trending {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: static;
        order: 3;
    }
}

@media (max-width: 768px) {
    .creator-newsfeed-container {
        padding: 10px;
    }
    
    .post-voting {
        padding: 15px 0;
        width: 50px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .post-body {
        font-size: 14px;
    }
    
    .audio-player-container {
        padding: 10px;
    }
    
    .audio-waveform {
        height: 60px;
    }
    
    .newsfeed-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .newsfeed-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: space-between;
    }
}

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