@import url('theme_new.css');

.rh-discuss-page {
    padding-top: 140px;
    padding-bottom: 90px;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.rh-discuss-header { text-align: left; margin-bottom: 36px; }
.rh-discuss-header .rh-eyebrow-line { justify-content: flex-start; }
.rh-discuss-header .rh-eyebrow-line::after { display: none; }
.rh-discuss-header h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 38px);
    margin: 10px 0 8px;
    color: var(--text);
}
.rh-discuss-header p { color: var(--text-muted); font-size: 15px; margin: 0; max-width: 480px; }

/* ---------- Composer ---------- */
.rh-composer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 44px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.rh-composer-user { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.rh-composer-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-strong); }
.rh-composer-user span { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text); }

.rh-field { margin-bottom: 16px; }
.rh-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-faint);
    margin-bottom: 6px;
    font-family: var(--font-display);
}
.rh-field input[type="text"], .rh-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color .2s ease;
}
.rh-field input[type="text"]:focus, .rh-field textarea:focus { border-color: var(--accent-purple); }
.rh-field textarea { min-height: 90px; font-family: var(--font-body); }

.rh-composer-photo { margin-bottom: 18px; }
.rh-photo-preview {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: none;
    margin-bottom: 12px;
}
.rh-photo-preview.visible { display: block; }
.rh-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.rh-upload-btn:hover { border-color: var(--accent-purple); background: rgba(139, 92, 246, .12); }
.rh-composer-photo input[type="file"] { display: none; }
.rh-upload-filename { color: var(--text-faint); font-size: 12px; margin-left: 10px; }

.rh-composer-footer { display: flex; justify-content: flex-end; }
.rh-composer-footer input[type="submit"] {
    background: var(--accent-gradient);
    color: #fff;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: transform .2s ease;
}
.rh-composer-footer input[type="submit"]:hover { transform: translateY(-2px); }

/* ---------- Feed ---------- */
.rh-feed { display: flex; flex-direction: column; gap: 22px; }
.rh-feed-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    font-size: 14px;
}

.rh-post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .2s ease;
}
.rh-post-card:hover { border-color: var(--border-strong); }
.rh-post-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 12px; }
.rh-post-author { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.rh-post-author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-strong); flex-shrink: 0; }
.rh-post-author-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.rh-post-time { display: block; color: var(--text-faint); font-size: 11px; margin-top: 2px; }
.rh-post-delete {
    color: var(--text-faint);
    text-decoration: none;
    font-size: 11px;
    font-family: var(--font-display);
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.rh-post-delete:hover { color: #fff; border-color: #ef4444; background: rgba(239, 68, 68, .15); }

.rh-post-photo img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.rh-post-body { padding: 4px 20px 18px; }
.rh-post-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.rh-post-subject { font-size: 14px; font-weight: 600; color: var(--accent-blue); margin: 0 0 10px; }
.rh-post-message { font-size: 14px; line-height: 1.7; color: var(--text-muted); margin: 0; white-space: pre-wrap; }

/* ---------- Post actions (like / repost / reply) ---------- */
.rh-post-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 14px;
}
.rh-action-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.rh-action-btn:hover { color: var(--text); border-color: var(--border-strong); }
.rh-action-btn:disabled { opacity: .6; cursor: default; }
.rh-action-count { font-size: 11px; color: inherit; opacity: .8; }

.rh-like-btn.active { color: #ec4899; border-color: #ec4899; background: rgba(236, 72, 153, .12); }
.rh-repost-btn.active { color: var(--accent-blue); border-color: var(--accent-blue); background: rgba(79, 124, 255, .12); }
.rh-reply-toggle-btn.active { color: var(--text); border-color: var(--border-strong); }

/* ---------- Reply panel ---------- */
.rh-reply-panel {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
}
.rh-reply-panel.visible { display: block; padding-top: 16px; }

.rh-reply-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.rh-reply {
    display: flex;
    gap: 10px;
}
.rh-reply img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-strong); flex-shrink: 0; }
.rh-reply-body {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    flex: 1;
    min-width: 0;
}
.rh-reply-author { display: block; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text); }
.rh-reply-message { font-size: 13px; color: var(--text-muted); margin: 4px 0; line-height: 1.6; word-wrap: break-word; }
.rh-reply-time { font-size: 10px; color: var(--text-faint); }

.rh-reply-form { display: flex; gap: 10px; }
.rh-reply-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 10px 16px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
}
.rh-reply-input:focus { border-color: var(--accent-purple); }
.rh-reply-form button {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    flex-shrink: 0;
}
.rh-reply-form button:disabled { opacity: .6; cursor: default; }

@media (max-width: 640px) {
    .rh-discuss-page { padding-top: 120px; }
    .rh-post-head { flex-wrap: wrap; }
    .rh-post-actions { flex-wrap: wrap; }
}
