/**
 * Forum Question Rows
 * Styling for the expandable question rows in the community forum
 */

/* Layout for creator-community-newsfeed page - always 2-column */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-areas: "left-sidebar main-content";
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main content takes full width in 2-column layout */
.main-content {
    max-width: 100%;
    width: 100%;
}

.left-sidebar {
    grid-area: left-sidebar;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.main-content {
    grid-area: main-content;
}

.right-sidebar {
    grid-area: right-sidebar;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Sidebar Styling */
.sidebar-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    padding: 20px;
}

.sidebar-section h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #1e293b;
}

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

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

.sidebar-link {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: #334155;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.sidebar-link:hover {
    background-color: #f1f5f9;
    text-decoration: none;
}

.sidebar-link .count,
.sidebar-link .time,
.sidebar-link .resource-category {
    color: #000000;
    font-size: 13px;
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 5px;
}

/* Forum Header */
.forum-header {
    margin-bottom: 30px;
}

.forum-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.forum-header p {
    color: #666;
    margin-bottom: 20px;
}

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

.primary-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

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

.filter-button {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

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

.filter-button:not(.active):hover {
    background-color: #e5e7eb;
}

/* Forum Content */
.forum-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 20px;
}

/* Question Items */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.question-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.question-title-area {
    flex: 1;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.question-badge.new {
    background-color: #10b981;
    color: white;
}

.question-badge.hot {
    background-color: #ef4444;
    color: white;
}

.question-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.category-tag {
    background-color: #e0e7ff;
    color: #000000;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.replies-count,
.last-active {
    font-size: 13px;
    color: #6b7280;
}

.expand-button {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.expand-icon,
.collapse-icon {
    font-size: 12px;
    color: #6b7280;
}

.question-item .collapse-icon {
    display: none;
}

.question-item.expanded .expand-icon {
    display: none;
}

.question-item.expanded .collapse-icon {
    display: block;
}

/* Question Body */
.question-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.question-item.expanded .question-body {
    max-height: 600px;
    padding: 20px;
}

.question-description {
    margin-bottom: 20px;
    color: #374151;
}

.sample-replies {
    margin-bottom: 20px;
}

.sample-replies h4 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #111827;
}

.reply {
    background-color: #f3f4f6;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.reply-author {
    font-weight: 600;
    margin-bottom: 5px;
    color: #111827;
}

.reply-content {
    color: #374151;
    margin-bottom: 5px;
}

.reply-time {
    font-size: 12px;
    color: #6b7280;
}

.question-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.reply-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

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

.view-all {
    background-color: white;
    color: #4f46e5;
    border: 1px solid #4f46e5;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    background-color: #f5f3ff;
    text-decoration: none;
}

/* Chat Content Styling */
.chat-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 20px;
}

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

.chat-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.chat-header p {
    color: #666;
    margin-bottom: 20px;
}

.chat-message-area {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
}

.chat-message.incoming {
    margin-right: auto;
}

.chat-message.outgoing {
    margin-left: auto;
}

.chat-message.system {
    width: 100%;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin: 10px 0;
}

.message-author {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.message-content {
    background-color: #f3f4f6;
    padding: 10px 15px;
    border-radius: 12px;
    display: inline-block;
}

.chat-message.outgoing .message-content {
    background-color: #e0e7ff;
    color: #4338ca;
}

.message-time {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input-area textarea {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    resize: none;
    height: 80px;
}

.send-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-end;
}

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

/* Tab Navigation */
#main-studio-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #4f46e5;
}

.studio-tab {
    padding: 15px 20px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.studio-tab:hover {
    color: #1e293b;
    text-decoration: none;
}

.studio-tab.active {
    color: #4f46e5;
    font-weight: 600;
    position: relative;
}

.studio-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4f46e5;
}

.tab-emoji {
    font-size: 16px;
}

/* Quick Tips and Resource Styles */
.tip-card {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tip-icon {
    font-size: 20px;
    min-width: 30px;
    text-align: center;
}

.tip-content p {
    margin: 0;
    font-size: 14px;
    color: #334155;
}

.view-all-resources {
    margin-top: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

.sidebar-link.view-all {
    color: #4f46e5;
    font-weight: 600;
}

.sidebar-link .icon {
    margin-left: 5px;
}

.sidebar-link .resource-category {
    background-color: #e0e7ff;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Audiogram Feed Styles */
.audiogram-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audiogram-card {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e5e7eb;
}

.audiogram-header {
    margin-bottom: 10px;
}

.audiogram-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 2px;
}

.audiogram-author {
    font-size: 13px;
    color: #64748b;
}

.audiogram-player {
    display: flex;
    align-items: center;
    margin: 12px 0;
    gap: 12px;
}

.audio-control-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    flex-shrink: 0;
}

.audio-control-button .pause-icon {
    display: none;
}

.audio-control-button.playing .play-icon {
    display: none;
}

.audio-control-button.playing .pause-icon {
    display: block;
}

.audio-progress-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-track {
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    width: 100%;
}

.progress-fill {
    height: 100%;
    background-color: #4f46e5;
    width: 0%;
    transition: width 0.1s linear;
}

.duration-text {
    font-size: 12px;
    color: #64748b;
    text-align: right;
}

.audiogram-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.audiogram-reactions {
    display: flex;
    gap: 8px;
}

.reaction-button {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 12px;
    transition: background-color 0.2s;
}

.reaction-button:hover {
    background-color: #f1f5f9;
}

.reaction-button.active {
    background-color: #e0e7ff;
}

.reaction-icon {
    font-size: 14px;
}

.reaction-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.audiogram-time {
    font-size: 12px;
    color: #64748b;
}

.audiogram-add-container {
    text-align: center;
    margin-top: 10px;
}

.add-audiogram-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
}

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

.audiogram-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "main-content"
            "left-sidebar"
            "right-sidebar";
    }
    
    .forum-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .forum-filters {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .question-meta {
        width: 100%;
    }
    
    .expand-button {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 768px) {
    .layout {
        padding: 10px;
        gap: 10px;
    }
    
    .forum-content, .chat-content {
        padding: 15px;
    }
    
    .sidebar-section {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .question-item.expanded .question-body {
        padding: 15px;
    }
}