/* [Q] change: Q&A styling with Material Design */

.qa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Roboto', Arial, sans-serif;
}

.qa-header {
    text-align: center;
    margin-bottom: 40px;
}

.qa-header h1 {
    font-size: 2.5rem;
    color: #1a73e8;
    margin-bottom: 10px;
}

.qa-header p {
    color: #5f6368;
    font-size: 1.1rem;
}

.qa-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #3c4043;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qa-item {
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: white;
    transition: box-shadow 0.2s;
}

.qa-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qa-item.active {
    border-color: #1a73e8;
}

.qa-question {
    padding: 20px;
    cursor: pointer;
}

.qa-question h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.qa-question h3 a {
    color: #1a73e8;
    text-decoration: none;
}

.qa-question h3 a:hover {
    text-decoration: underline;
}

.qa-meta {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: #5f6368;
    flex-wrap: wrap;
}

.qa-topic {
    background: #e8f0fe;
    color: #1a73e8;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.qa-answer-preview {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f0f0f0;
}

.qa-answer-content {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #3c4043;
}

.qa-answer-actions {
    display: flex;
    justify-content: flex-end;
}

.read-more {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.qa-load-more {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-more-btn:hover {
    background: #1557b0;
}

/* Detail page styles */
.qa-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.qa-breadcrumb {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.qa-breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.qa-detail {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qa-question-header h1 {
    font-size: 1.8rem;
    color: #3c4043;
    margin-bottom: 16px;
    line-height: 1.3;
}

.qa-answer-section {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.qa-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}

.vote-btn {
    background: none;
    border: 1px solid #dadce0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.vote-btn.active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: white;
}

.vote-score {
    font-size: 1.2rem;
    font-weight: 500;
    color: #3c4043;
}

.qa-answer-content {
    flex: 1;
    line-height: 1.7;
    color: #3c4043;
}

.qa-answer-content p {
    margin-bottom: 16px;
}

.qa-comments-section {
    margin-top: 40px;
    border-top: 1px solid #f0f0f0;
    padding-top: 30px;
}

.qa-comments-section h3 {
    margin-bottom: 20px;
    color: #3c4043;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
}

.comment-form button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.comment-form button:hover {
    background: #1557b0;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-author {
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 8px;
}

.comment-text {
    color: #3c4043;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-date {
    font-size: 0.85rem;
    color: #5f6368;
}

.qa-sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
}

.related-questions h3 {
    margin-bottom: 16px;
    color: #3c4043;
}

.related-question {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.related-question:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-question a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.related-question a:hover {
    text-decoration: underline;
}

.related-meta {
    font-size: 0.8rem;
    color: #5f6368;
    margin-top: 4px;
}

.login-prompt {
    color: #5f6368;
    font-style: italic;
}

.login-prompt a {
    color: #1a73e8;
    text-decoration: none;
}

/* Answer sections styling */
.short-answer, .detailed-answer, .source-references {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
}

.short-answer {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
}

.detailed-answer {
    background: #f8f9fa;
    border-left: 4px solid #1a73e8;
}

.source-references {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.short-answer h3, .detailed-answer h3, .source-references h3 {
    margin: 0 0 16px 0;
    color: #3c4043;
    font-size: 1.1rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.metadata-card {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow 0.2s;
}

.metadata-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.metadata-card h4 {
    margin: 0 0 8px 0;
    color: #1a73e8;
    font-size: 1rem;
    line-height: 1.3;
}

.metadata-card .author {
    color: #5f6368;
    font-size: 0.9rem;
    margin: 4px 0;
    font-style: italic;
}

.metadata-card .snippet {
    color: #3c4043;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 8px 0;
}

.metadata-card .page {
    color: #5f6368;
    font-size: 0.85rem;
    margin: 4px 0;
}

.source-link {
    display: inline-block;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid #1a73e8;
    border-radius: 4px;
    transition: all 0.2s;
}

.source-link:hover {
    background: #1a73e8;
    color: white;
    text-decoration: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .qa-detail-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .qa-filters {
        flex-direction: column;
        gap: 12px;
    }
    
    .qa-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .qa-answer-section {
        flex-direction: column;
        gap: 16px;
    }
    
    .qa-voting {
        flex-direction: row;
        justify-content: center;
    }
    
    .metadata-grid {
        grid-template-columns: 1fr;
    }
    
    .short-answer, .detailed-answer, .source-references {
        padding: 16px;
    }
}