﻿/* ============================================================
   DISCUSSION LIST PAGE
   ============================================================ */

/* PAGE WRAPPER */
.discussion-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 102, 153, 0.05);
    border: 1px solid rgba(0, 102, 153, 0.12);
    border-radius: 8px;
}

/* HEADER */
.discussion-header h1 {
    margin: 0;
    font-size: 2rem;
}

.discussion-subtitle {
    margin: 0.25rem 0 1rem;
    color: var(--text-muted, #666);
    font-size: 0.95rem;
}

.discussion-header .btn-primary {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary, #0078d4);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* FILTER BAR */
.discussion-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #ddd);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.filter-search {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border, #ccc);
    border-radius: 6px;
}

.filter-sort {
    padding: 0.5rem;
    border: 1px solid var(--border, #ccc);
    border-radius: 6px;
}

.filter-mine {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

/* DISCUSSION LIST */
.discussion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* DISCUSSION CARD */
.discussion-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.discussion-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.discussion-snippet {
    margin: 0 0 0.75rem;
    color: var(--text-muted, #555);
    font-size: 0.95rem;
}

.discussion-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted, #777);
    margin-bottom: 0.75rem;
}

/* BUTTONS */
.btn-secondary {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: var(--surface);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-primary {
    padding: 10px 18px;
    background-color: #2c6fbb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

    .btn-primary:hover {
        background-color: #255f9e;
    }

/* PAGINATION */
.discussion-pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

    .discussion-pagination .btn-secondary {
        padding: 0.5rem 1rem;
    }

/* NO RESULTS */
.no-results {
    background: rgba(0, 120, 215, 0.08);
    border: 1px solid rgba(0, 120, 215, 0.2);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    color: #444;
    font-size: 1.1rem;
    margin: 20px 0;
}

    .no-results::before {
        content: "💬";
        display: block;
        font-size: 2.5rem;
        margin-bottom: 10px;
        opacity: 0.7;
    }

/* PRIVATE BADGE */
.private-badge {
    background-color: #c62828;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ============================================================
   NEW DISCUSSION PAGE
   ============================================================ */

.new-discussion-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

    .new-discussion-page h1 {
        margin-bottom: 20px;
        font-size: 1.8rem;
        font-weight: 600;
    }

.new-discussion-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .form-group label {
        font-weight: 600;
        font-size: 0.95rem;
    }

.input-text,
.input-select,
.input-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.input-textarea {
    min-height: 150px;
    resize: vertical;
}

.pinned-badge {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-right: 6px;
}


/* ============================================================
   DISCUSSION DETAIL PAGE
   ============================================================ */

.discussion-detail-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    /* New card styling */
    background: var(--surface, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 10px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    margin-top: 20px;
}

/* Topic Header */
.topic-header {
    margin-bottom: 20px;
}

.topic-title {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-meta {
    color: #666;
    font-size: 0.9rem;
    margin-top: 6px;
    display: flex;
    gap: 6px;
}

/* Original Post */
.original-post {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Replies */
.reply-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.reply-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    gap: 6px;
}

.reply-body {
    font-size: 1rem;
    line-height: 1.5;
}

/* Reply Form */
.reply-form {
    /* Positioning relative to replies */
    margin-top: 20px;
    /* Card-style wrapper to match discussion-detail-page */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    /* Internal layout */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reply-textbox {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

.reply-form .btn-primary {
    align-self: flex-start;
    margin-top: 5px;
}

.btn-back {
    display: inline-block;
    margin-bottom: 15px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}

    .btn-back:hover {
        text-decoration: underline;
    }

.topic-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.locked-message {
    background: #ffe0e0;
    border: 1px solid #ffb3b3;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    color: #a33;
    font-weight: 500;
}

