/* Solar Run — Beta forum (ported from the partperfect support forum) */

/* Forum Layout */
.forum-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 90%;
    margin: 0 auto 80px;
    padding-top: 118px;
    min-height: 70vh;
}

.forum-topbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.forum-breadcrumb {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
}

.forum-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.forum-breadcrumb a:hover { text-decoration: underline; }

.breadcrumb-sep {
    color: var(--faintest);
    margin: 0 8px;
}

.forum-user {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--faint);
}

.forum-user a { color: var(--muted-2); transition: color 0.2s; }
.forum-user a:hover { color: var(--cream); }
.forum-user-sep { margin: 0 6px; color: var(--faintest); }

.forum-heading {
    color: var(--bright);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 8px;
}

.forum-subtitle {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.forum-error {
    background-color: rgba(192, 86, 58, 0.1);
    border: 1px solid #c0563a;
    border-radius: 5px;
    color: #c0563a;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted-2);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-14);
    border-radius: 5px;
    padding: 11px 13px;
    color: var(--cream);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: rgba(217, 138, 75, 0.5); }

.form-group input[type="file"] {
    color: var(--muted);
    font-size: 13px;
}

.form-hint {
    color: var(--faint);
    font-size: 12px;
    margin-top: 6px;
}

.form-hint a { color: var(--accent); }

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 20px;
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-8);
    border-radius: 6px;
    padding: 16px 20px;
    text-decoration: none;
    display: block;
    transition: border-color 0.2s;
}

.post-card:hover { border-color: rgba(217, 138, 75, 0.5); }

.post-card.pinned {
    border-color: rgba(217, 138, 75, 0.45);
    background-color: rgba(217, 138, 75, 0.04);
}

.post-pin-badge {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.post-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.post-avatar img,
.comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar img {
    width: 30px;
    height: 30px;
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d98a4b, #8a4f22);
    color: #0b0d12;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.avatar-placeholder.small {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.avatar-placeholder.large {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-title {
    color: var(--bright);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-meta {
    display: flex;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--faint);
    flex-wrap: wrap;
}

.post-author { color: var(--muted-2); }

/* Admin Badge */
.admin-badge {
    background-color: rgba(217, 138, 75, 0.16);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Post Full View */
.post-full {
    background-color: var(--bg-card);
    border: 1px solid var(--border-8);
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 30px;
}

.post-full-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 16px;
}

.post-full-title {
    color: var(--bright);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 0;
    flex: 1;
}

.pin-icon { font-size: 0.8em; }

.post-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.post-author-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-8);
    flex-wrap: wrap;
}

.author-name {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.author-name:hover { text-decoration: underline; }

.post-date, .comment-date {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 11.5px;
}

.post-edited, .comment-edited {
    color: var(--faint);
    font-size: 11.5px;
    font-style: italic;
}

.post-body { line-height: 1.7; }

/* Rich Content */
.rich-content {
    color: var(--serif-body);
    font-size: 15px;
    line-height: 1.7;
}

.rich-content p {
    margin-bottom: 12px;
    color: var(--serif-body);
}

.rich-content img {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}

.rich-content a { color: var(--accent); }

.rich-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 16px;
    margin: 12px 0;
    color: var(--muted);
    background-color: rgba(217, 138, 75, 0.05);
    border-radius: 0 5px 5px 0;
}

.rich-content pre {
    background-color: var(--bg-input);
    padding: 14px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 12px 0;
}

.rich-content code {
    font-family: var(--font-mono);
    font-size: 13px;
}

.rich-content iframe {
    max-width: 100%;
    border-radius: 5px;
    margin: 10px 0;
}

.rich-content ul, .rich-content ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.rich-content li {
    color: var(--serif-body);
    margin-bottom: 4px;
}

.rich-content h1, .rich-content h2, .rich-content h3 {
    color: var(--bright);
    margin: 16px 0 10px;
}

/* Comments */
.comments-section { margin-bottom: 40px; }

.comments-heading {
    color: var(--bright);
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-8);
}

.comment {
    background-color: var(--bg-card);
    border: 1px solid var(--border-8);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 10px;
}

.comment.reply {
    margin-left: 0;
    border-color: var(--border-6);
    background-color: #0e1118;
}

.comment-replies {
    margin-left: 30px;
    margin-top: 8px;
}

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

.comment-author {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
}

.comment-author:hover { text-decoration: underline; }

.comment-body { margin-bottom: 8px; }

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

.reply-form-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-8);
}

.reply-form-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.new-comment {
    background-color: var(--bg-card);
    border: 1px solid var(--border-8);
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.new-comment h4 {
    color: var(--bright);
    margin-bottom: 12px;
    font-size: 15px;
}

.login-prompt {
    text-align: center;
    padding: 30px;
    color: var(--muted);
    font-size: 15px;
}

.login-prompt a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover { text-decoration: underline; }

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--accent);
    color: #0b0d12;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary:hover { background-color: #c47a3e; }

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--accent);
    border: 1px solid rgba(217, 138, 75, 0.55);
    padding: 10px 20px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-outline:hover { background-color: rgba(217, 138, 75, 0.1); }

.btn-small {
    display: inline-block;
    background-color: transparent;
    color: var(--muted-2);
    border: 1px solid var(--border-14);
    padding: 5px 14px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.btn-small:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    border-color: rgba(192, 86, 58, 0.6);
    color: #c0563a;
}

.btn-danger:hover {
    background-color: rgba(192, 86, 58, 0.1);
    border-color: #c0563a;
    color: #c0563a;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 10.5px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 11.5px;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.2s;
}

.btn-text:hover { color: var(--accent); }

.btn-text-danger:hover { color: #c0563a; }

/* Auth Card */
.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-8);
    border-radius: 6px;
    padding: 35px;
    max-width: 480px;
    margin: 0 auto;
}

/* Profile */
.profile-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-8);
    border-radius: 6px;
    padding: 30px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-avatar-large img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-username {
    color: var(--bright);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}

.profile-detail {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.profile-joined {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    padding: 16px 0;
    border-top: 1px solid var(--border-8);
    border-bottom: 1px solid var(--border-8);
    margin-bottom: 20px;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.stat-number {
    color: var(--accent);
    font-weight: 700;
    font-size: 17px;
}

.stat-label {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.profile-about { margin-bottom: 20px; }

.profile-about h3 {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.profile-actions { margin-top: 20px; }

.avatar-preview { margin-bottom: 10px; }

.current-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 25px;
}

.page-link {
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
}

.page-link:hover { text-decoration: underline; }

.page-info {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--faint);
}

/* Quill Editor Overrides */
.quill-editor, .quill-editor-full, .quill-mini {
    background-color: var(--bg-input);
    border: 1px solid var(--border-14);
    border-radius: 0 0 5px 5px;
    color: var(--cream);
}

.quill-editor-full { min-height: 250px; }

.quill-editor { min-height: 150px; }

.quill-mini { min-height: 100px; }

.ql-toolbar.ql-snow {
    border: 1px solid var(--border-14);
    border-radius: 5px 5px 0 0;
    background-color: var(--bg-card);
}

.ql-container.ql-snow {
    border: none;
    font-family: var(--font-body);
    font-size: 15px;
}

.ql-editor {
    color: var(--cream);
    min-height: 100px;
}

.ql-editor.ql-blank::before {
    color: var(--faint) !important;
    font-style: normal !important;
}

.ql-snow .ql-stroke { stroke: var(--muted); }

.ql-snow .ql-fill { fill: var(--muted); }

.ql-snow .ql-picker-label { color: var(--muted); }

.ql-snow .ql-picker-options {
    background-color: var(--bg-card);
    border-color: var(--border-14);
}

.ql-snow .ql-picker-item { color: var(--muted); }

/* Responsive */
@media (max-width: 768px) {
    .forum-container {
        width: auto;
        margin: 0 20px 50px;
        padding-top: 96px;
    }

    .category-header { flex-direction: column; }

    .post-full-header { flex-direction: column; }

    .post-actions { align-self: flex-start; }

    .post-author-bar { gap: 8px; }

    .comment-replies { margin-left: 15px; }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-stats { justify-content: center; }

    .auth-card { padding: 24px; }
}
