/**
 * Creator Community Newsfeed - Production CSS
 * 
 * A Slido-inspired newsfeed interface for the creator community
 * with voting, audio feedback, and trending topics.
 */

/* Reset and Base Styles */
.creator-newsfeed-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Grid Layout */
.creator-newsfeed-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr 260px; /* Changed from 280px to 260px to match left sidebar */
    grid-template-areas: "left main right";
    min-height: calc(100vh - 100px); /* Allow for header/footer */
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f8fafc;
    overflow-x: hidden;
}

/* Left Sidebar */
.creator-newsfeed-sidebar {
    grid-area: left;
    background-color: white;
    padding: 20px;
    border-right: 1px solid #e5e7eb;
    height: 100%;
    overflow-y: auto;
}

/* Main Content */
.creator-newsfeed-main {
    grid-area: main;
    background-color: #f8fafc;
    padding: 20px 40px; /* Increased horizontal padding */
    height: 100%;
    overflow-y: auto;
    width: 100%; /* Full width of grid area */
}

/* Right Sidebar */
.creator-newsfeed-trending {
    grid-area: right;
    width: 260px; /* Explicitly set width to match left sidebar */
    min-width: 260px; /* Ensure minimum width matches left sidebar */
    background-color: white;
    padding: 20px;
    border-left: 1px solid #e5e7eb;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.creator-newsfeed-trending::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 100vw; /* Extend all the way */
    height: 100%;
    background-color: white;
    z-index: -1;
}

/* Left Sidebar Content */
.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: #000000;
    font-weight: 700;
}

/* Main Content - WIDER LAYOUT */
.newsfeed-header {
    background-color: white;
    border-radius: 10px;
    padding: 28px; /* Increased padding */
    margin-bottom: 30px; /* More space */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

.newsfeed-header h1 {
    font-size: 26px; /* Larger font */
    color: #1e293b;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.newsfeed-header p {
    color: #64748b;
    margin-bottom: 24px; /* More space */
    line-height: 1.5;
    font-size: 16px; /* Slightly larger */
}

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

.create-post-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 12px 20px; /* Larger button */
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px; /* Larger text */
}

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

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

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

.newsfeed-filter-button {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #64748b;
    padding: 10px 18px; /* Larger button */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 15px; /* Larger text */
}

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

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

/* Posts - WIDER LAYOUT */
.newsfeed-posts {
    display: flex;
    flex-direction: column;
    gap: 25px; /* More space between posts */
}

.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: 70px; /* Wider voting column */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 0; /* More padding */
    border-right: 1px solid #f1f5f9;
}

.vote-up, .vote-down {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px; /* Larger icons */
    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: 10px 0;
    font-size: 18px; /* Larger number */
}

.post-content {
    flex: 1;
    padding: 25px; /* More padding */
    display: flex;
    flex-direction: column;
}

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

.post-tag {
    display: inline-block;
    padding: 5px 12px; /* Larger tag */
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    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: 20px; /* Larger title */
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.post-body {
    color: #334155;
    font-size: 16px; /* Larger text */
    line-height: 1.6;
    margin-bottom: 25px;
}

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

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

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

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

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: 15px; /* Larger text */
}

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

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

.reply-button, .share-button {
    background-color: #f1f5f9;
    border: none;
    color: #334155;
    padding: 8px 16px; /* Larger buttons */
    border-radius: 8px;
    font-size: 15px;
    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: 10px;
    padding: 20px;
    margin: 20px 0;
}

.audio-player {
    width: 100%;
    margin-bottom: 20px;
    height: 40px; /* Taller audio player */
}

.audio-waveform {
    height: 100px; /* Taller waveform */
    background-color: #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #e2e8f0 30%, #cbd5e1 50%, #e2e8f0 70%);
}

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

.audio-feedback-positive, 
.audio-feedback-negative {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 8px 18px; /* Larger buttons */
    font-size: 15px;
    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: 18px; /* Larger icons */
}

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

/* Right Sidebar Content */
.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;
}

/* Top Creators Section */
.top-creators {
    margin-top: 30px;
}

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

.creator-card {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.creator-card:hover {
    background-color: #f1f5f9;
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e7eb;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #4f46e5;
}

.creator-info {
    flex: 1;
}

.creator-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
    font-size: 15px;
}

.creator-status {
    font-size: 13px;
    color: #64748b;
}

.creator-follow {
    padding: 4px 12px;
    background-color: #eef2ff;
    color: #4f46e5;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.creator-follow:hover {
    background-color: #e0e7ff;
}

/* Resources Section */
.resource-section {
    margin-top: 30px;
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 8px;
}

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

.resource-list {
    list-style: none;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.resource-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eef2ff;
    border-radius: 6px;
    color: #4f46e5;
    font-size: 14px;
}

.resource-details {
    flex: 1;
}

.resource-title {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin: 0;
    line-height: 1.3;
}

.resource-meta {
    font-size: 12px;
    color: #64748b;
}

/* Community Stats Section */
.community-stats {
    margin-top: 30px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Responsive Adaptations */
@media (max-width: 1200px) {
    .creator-newsfeed-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "left"
            "main"
            "right";
        gap: 20px;
        padding: 20px;
    }
    
    .creator-newsfeed-trending::after {
        display: none;
    }
    
    .creator-newsfeed-sidebar, .creator-newsfeed-trending {
        border: 1px solid #e5e7eb;
        border-radius: 10px;
    }
    
    .creator-newsfeed-main {
        padding: 0; /* Remove padding as it's now on the wrapper */
    }
}

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

@media (max-width: 480px) {
    .creator-newsfeed-wrapper {
        padding: 10px;
        gap: 10px;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .newsfeed-header {
        padding: 20px;
    }
    
    .post-voting {
        width: 50px;
        padding: 10px 0;
    }
    
    .vote-up, .vote-down {
        font-size: 18px;
    }
    
    .vote-count {
        font-size: 16px;
        margin: 8px 0;
    }
}