/*
  pages.css — SLIM
  Only page-specific styles that can't be expressed inline with Tailwind.
  Mostly: JS-generated HTML from app.js, dynamic states, settings sidebar active, etc.
*/

/* ── Feed skeleton cards ────────────────────────────────────── */
.post-skeleton { border-radius: 18px; padding: 1rem; border: 1px solid var(--border); }

/* ── Filter tab active underline ────────────────────────────── */
.filter-tab { position: relative; padding-bottom: .75rem; }
.filter-tab.active { color: var(--accent); }
.filter-tab.active::after {
    content: '';
    position: absolute; bottom: -.5rem; left: 0; right: 0;
    height: 2px; background: var(--accent); border-radius: 1px;
}

/* ── Wallet balance card ─────────────────────────────────────── */
.balance-card {
    background: linear-gradient(135deg, rgba(var(--accent-rgb),.15) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
    border: 1px solid rgba(var(--accent-rgb), .2);
    border-radius: 22px; padding: 1.5rem; position: relative; overflow: hidden;
}
.balance-card::before {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(var(--accent-rgb),.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Chat sidebar items ──────────────────────────────────────── */
.sidebar-item.active { background: rgba(var(--accent-rgb), .12); }

/* ── Settings sidebar active ────────────────────────────────── */
.settings-sidebar .sidebar-item.active {
    background: rgba(var(--accent-rgb), .12);
    color: var(--accent);
    border-right: 2px solid var(--accent);
}

/* ── Ticket / support status pills ──────────────────────────── */
.status-open     { background: rgba(34,197,94,.12);  color: var(--ok); }
.status-closed   { background: rgba(107,112,153,.12);color: var(--ink-muted); }
.status-pending  { background: rgba(245,158,11,.12); color: var(--warn); }
.priority-high   { background: rgba(240,80,112,.12); color: var(--danger); }
.priority-medium { background: rgba(245,158,11,.12); color: var(--warn); }
.priority-low    { background: rgba(34,197,94,.12);  color: var(--ok); }

/* ── Ticket messages (JS-generated) ────────────────────────── */
.ticket-message.staff {
    background: rgba(var(--accent-rgb),.06);
    border-left: 3px solid var(--accent);
    padding: .75rem 1rem; border-radius: 0 12px 12px 12px; margin-bottom: 10px;
}
.ticket-message.user {
    background: var(--bg-3);
    border: 1px solid var(--border);
    padding: .75rem 1rem; border-radius: 12px 0 12px 12px; margin-bottom: 10px;
}
.ticket-msg-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ticket-msg-author { font-size: .78rem; font-weight: 600; color: var(--accent); }
.ticket-msg-time   { font-size: .72rem; color: var(--ink-muted); }
.ticket-msg-body   { font-size: .88rem; color: var(--ink); line-height: 1.55; }

/* ── Theme & color buttons (toggled active by JS) ───────────── */
.theme-btn.active  { border-color: var(--accent) !important; color: var(--accent) !important; }
.color-btn.active  { outline: 3px solid white; outline-offset: 2px; }
.faq-cat-btn.active { background: rgba(var(--accent-rgb),.12); color: var(--accent); border-color: var(--accent); }

/* ── Voice message waveform bars ────────────────────────────── */
.voice-bar { width: 3px; background: rgba(var(--accent-rgb),.35); border-radius: 2px; }
.voice-bar.active { background: var(--accent); }

/* ── Crypto deposit buttons ──────────────────────────────────── */
.crypto-btn.selected { border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }

/* ── Reply indicator line ────────────────────────────────────── */
.reply-line { width: 3px; height: 36px; background: var(--accent); border-radius: 2px; flex-shrink: 0; }

/* ── Responsive: chat sidebar ───────────────────────────────── */
@media (max-width: 640px) {
    .chat-sidebar { display: none; }
    .chat-sidebar.open {
        display: flex; position: absolute;
        left: 0; top: 0; bottom: 0; z-index: 50;
        width: 280px; box-shadow: 8px 0 40px rgba(0,0,0,.6);
    }
    .menu-btn { display: flex !important; }
}

/* ── Accessibility ───────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Connection Status Banner */
.connection-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f05070;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.connection-status.show {
    transform: translateY(0);
}
/* ── Notification Badge ──────────────────────────────────────────────────── */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger, #f05070);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Attachment Menu (JS-generated) ─────────────────────────────────────── */
.attachment-menu {
    position: fixed;
    z-index: 9999;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    display: flex;
    gap: 4px;
    animation: scale-in 0.12s ease-out;
    transform-origin: bottom left;
}
.attachment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    min-width: 60px;
}
.attachment-option:hover { background: var(--bg-3); }
.option-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
    font-size: 16px;
}
.option-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
}

/* ── Emoji Search Input ───────────────────────────────────────────────────── */
.emoji-search {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
}
.emoji-search:focus { border-color: rgba(var(--accent-rgb), 0.5); }
.emoji-cat {
    background: transparent; border: none; cursor: pointer;
    border-radius: 6px; transition: background 0.15s; flex-shrink: 0; line-height: 1;
}
.emoji-cat:hover { background: var(--bg-3); }
.emoji-cat.active { background: rgba(var(--accent-rgb), 0.15); }



/* Typing Indicator Animation */
.typing-animation {
    display: inline-flex;
    align-items: center;
}

.typing-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.6;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Typing Avatars */
.typing-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    border: 2px solid var(--bg-2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Message Search Highlight */
.message-search-highlight {
    background: rgba(0, 212, 170, 0.15);
    border-radius: 8px;
}

/* Emoji Picker */
.emoji-picker.visible {
    display: block;
}

.emoji-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.emoji-btn:hover {
    background-color: var(--bg-3);
}

/* Context Menu */
.message-context-menu {
    min-width: 180px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    padding: 4px 0;
    animation: scale-in 0.1s ease-out;
    transform-origin: top left;
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-reaction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
}

.context-menu-reaction:hover {
    background-color: var(--bg-3);
}

.context-menu-item {
    padding: 8px 12px;
    font-size: 14px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background-color: var(--bg-3);
}

.context-menu-item svg {
    width: 16px;
    height: 16px;
    color: var(--ink-muted);
}

/* Quick Actions */
.quick-actions {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
}

.quick-action-item {
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.quick-action-item:hover {
    background-color: var(--bg-3);
}

.quick-action-item .command {
    color: var(--accent);
    font-weight: 600;
    font-size: 12px;
}

.quick-action-item .description {
    color: var(--ink-muted);
    font-size: 12px;
}

/* Message Reactions */
.reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: var(--bg-3);
    border-radius: 12px;
    font-size: 11px;
    color: var(--ink-muted);
    transition: all 0.2s;
}

.reaction-badge.user-reacted {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

.reaction-badge:hover {
    background: var(--bg-2);
    transform: scale(1.05);
}

/* Message Status */
.message-status {
    font-size: 10px;
    margin-left: 4px;
    color: var(--ink-muted);
}

.message-status.read {
    color: var(--accent);
}

/* Upload Progress */
.upload-progress-bar {
    height: 2px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.upload-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.2s ease;
}

/* Mobile Sidebar */
@media (max-width: 640px) {
    .chat-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .chat-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* Date Separator */
.date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.date-separator span {
    background: var(--bg-3);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    color: var(--ink-muted);
}

/* No Messages */
.no-messages {
    text-align: center;
    padding: 32px 16px;
    color: var(--ink-muted);
    font-size: 14px;
}

/* Modal Animation */
.animate-slide-up {
    animation: slide-up 0.2s ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Invite Code Display */
.invite-code-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-3);
    padding: 8px 12px;
    border-radius: 8px;
}

.invite-code-display code {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    color: var(--accent);
}

.copy-code-btn {
    padding: 4px 8px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--ink-muted);
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background: var(--bg-3);
    color: var(--ink);
}

/* ════════════════════════════════════════════════════════════════
   POST CARD — JS-rendered by renderPostCard()
   ════════════════════════════════════════════════════════════════ */

.post-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s;
    cursor: pointer;
    position: relative;
}
.post-card:hover { border-color: var(--border-hi); }

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #0c0e14;
    flex-shrink: 0;
    position: relative;
}

/* Online indicator dot */
.author-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    background: #4ade80;
    border-radius: 50%;
    border: 2px solid var(--bg-2);
}

.author-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.author-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--ink-muted);
}

.post-meta-dot {
    font-size: 11px;
    color: var(--ink-muted);
}

.post-time-tag {
    color: var(--accent);
    font-weight: 500;
}

.post-time {
    font-size: 11px;
    color: var(--ink-muted);
}

.more-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 15px;
}
.more-btn:hover { background: var(--bg-3); color: var(--ink); }

.delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}
.delete-btn:hover { background: rgba(240,80,112,.12); color: var(--danger); }

.post-content {
    font-size: 15px;
    color: var(--ink);
    line-height: 1.55;
    word-break: break-word;
}
.post-content p { margin: 0; }

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
}
.tag:hover { background: rgba(var(--accent-rgb), 0.18); }

.post-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.post-actions-right {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--ink-muted);
    transition: all 0.2s;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
}
.action-btn:hover { background: var(--bg-3); color: var(--ink); }
.action-btn span { font-size: 13px; }
.action-btn i { font-size: 15px; }

.action-btn.like-btn.liked { color: var(--danger); }
.action-btn.like-btn.liked svg { fill: var(--danger); }

.bookmark-btn.saved svg { fill: var(--accent); stroke: var(--accent); }

.tip-btn { color: var(--accent); }
.tip-btn:hover { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }

/* Post detail secondary actions */
.post-detail-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--ink-muted);
    transition: all 0.2s;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
}
.post-action-btn:hover { background: var(--bg-3); color: var(--ink); }
.post-action-btn svg { flex-shrink: 0; }


/* ════════════════════════════════════════════════════════════════
   COMMENTS — JS-rendered by renderComment()
   ════════════════════════════════════════════════════════════════ */

.comment-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.2s;
}
.comment-item:hover { border-color: var(--border-hi); }
.comment-item.optimistic { opacity: 0.65; }

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #0c0e14;
    flex-shrink: 0;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.comment-author-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
}

.comment-time {
    font-size: 11px;
    color: var(--ink-muted);
}

.edited-indicator {
    font-size: 11px;
    color: var(--ink-muted);
    font-style: italic;
}

.comment-actions-dropdown { position: relative; flex-shrink: 0; }

.comment-actions-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}
.comment-actions-btn:hover { background: var(--bg-3); color: var(--ink); }

.comment-body { padding: 0 2px; }

.comment-content {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.5;
    word-break: break-word;
}

.comment-reply-preview {
    display: flex;
    gap: 8px;
    background: var(--bg-3);
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 6px;
    cursor: pointer;
}
.comment-reply-preview .reply-line { width: 3px; align-self: stretch; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.comment-reply-preview .reply-text { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comment-actions-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--ink-muted);
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}
.comment-like-btn:hover { background: var(--bg-3); }
.comment-like-btn.liked { color: var(--danger); }

.comment-reply-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--ink-muted);
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}
.comment-reply-btn:hover { background: var(--bg-3); color: var(--accent); }

.no-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 16px;
    color: var(--ink-muted);
    text-align: center;
}
.no-comments svg { opacity: 0.2; }
.no-comments h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0; }
.no-comments p { font-size: 13px; margin: 0; }

/* Dropdown menus for comment actions */
.comment-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 4px 0;
    z-index: 100;
    min-width: 150px;
    animation: scale-in 0.12s ease-out;
    transform-origin: top right;
}
.comment-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ink);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
.comment-dropdown-item:hover { background: var(--bg-3); }
.comment-dropdown-item.danger { color: var(--danger); }


/* ════════════════════════════════════════════════════════════════
   CHAT MESSAGES — JS-rendered by renderSingleMessage
   ════════════════════════════════════════════════════════════════ */

/* Messages list is a flex column — width:100% required so message-sent can align-self:flex-end */
.messages-list { display: flex; flex-direction: column; padding: 8px 0; width: 100%; }

/* Base message row */
.message {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    max-width: 78%;
    margin-bottom: 2px;
    position: relative;
}

/* RECEIVED — avatar on left, bubble on right of avatar */
.message-received {
    align-self: flex-start;
    flex-direction: row;
}

/* SENT — no avatar, bubble pushed to right edge */
.message-sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* Spacing between new conversation groups */
.message.msg-new { margin-top: 10px; }
.message.msg-continued { margin-top: 1px; }

/* Faded while optimistic */
.message.optimistic { opacity: 0.6; }

/* Avatar circle (received messages only) */
.message-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #0c0e14;
    flex-shrink: 0;
    align-self: flex-end;
    position: relative;
}
.avatar-spacer { width: 30px; flex-shrink: 0; }

/* Message content column */
.message-content {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 0;
}

/* Bubble */
.message-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    word-break: break-word;
    position: relative;
}
.message-bubble p { margin: 0; font-size: 14px; line-height: 1.5; }

/* Received bubble — dark with left-bottom sharp corner */
.message-received .message-bubble {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--ink);
    border-bottom-left-radius: 4px;
}

/* Sent bubble — solid accent with dark text */
.message-sent .message-bubble {
    background: var(--accent);
    border: none;
    color: #071a16;
    border-bottom-right-radius: 4px;
}

/* Footer: time + ticks */
.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 3px;
}

.message-time {
    font-size: 10px;
    color: var(--ink-muted);
    opacity: 0.65;
    white-space: nowrap;
}
/* Time inside sent bubble is dark since bubble is accent-colored */
.message-sent .message-time { color: rgba(7, 26, 22, 0.65); opacity: 1; }

/* Delivery ticks */
.message-status { font-size: 11px; line-height: 1; display: inline-flex; align-items: center; }
.message-status.sending   { color: rgba(7,26,22,0.4); }
.message-status.sent      { color: rgba(7,26,22,0.45); }
.message-status.delivered { color: rgba(7,26,22,0.45); }
.message-status.read      { color: #071a16; }

/* Meta row: shown BELOW the bubble for received messages */
.message-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    padding-left: 4px;
}
.message-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
}
.message-meta .message-time {
    font-size: 10px;
    color: var(--ink-muted);
    opacity: 0.55;
}

/* Deleted */
.deleted-message { color: var(--ink-muted) !important; font-style: italic; }

/* Reply preview inside a bubble */
.message-reply-preview {
    display: flex;
    gap: 6px;
    background: var(--bg-3);
    border-radius: 8px;
    padding: 5px 8px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background 0.2s;
}
.message-reply-preview:hover { background: var(--border-hi); }
.message-reply-preview .reply-line { width: 3px; background: var(--accent); border-radius: 2px; flex-shrink: 0; align-self: stretch; }
.message-reply-preview .reply-content { display: flex; flex-direction: column; min-width: 0; }
.message-reply-preview .reply-sender { font-size: 11px; font-weight: 600; color: var(--accent); }
.message-reply-preview .reply-text { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Reactions */
.message-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* Edited indicator */
.edited-indicator { font-size: 10px; color: var(--ink-muted); font-style: italic; }

/* Online badge on avatar */
.online-badge {
    position: absolute;
    bottom: 0; right: 0;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ok);
    border: 2px solid var(--bg-2);
}

/* Message highlight (search) */
.message.highlight .message-bubble { box-shadow: 0 0 0 2px var(--accent); }

/* ════════════════════════════════════════════════════════════════
   CHAT SIDEBAR ITEMS — JS-rendered by renderRoomsList / renderDMsList
   ════════════════════════════════════════════════════════════════ */

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.sidebar-item:hover { background: var(--bg-3); }
.sidebar-item.active { background: rgba(var(--accent-rgb), 0.12); }

.item-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #0c0e14;
    flex-shrink: 0;
    position: relative;
}

.item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-preview {
    font-size: 12px;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.item-time {
    font-size: 10px;
    color: var(--ink-muted);
    white-space: nowrap;
}

.unread-badge {
    background: var(--accent);
    color: #0c0e14;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-empty {
    font-size: 12px;
    color: var(--ink-muted);
    text-align: center;
    padding: 12px 8px;
}

/* ════════════════════════════════════════════════════════════════
   SEARCH PAGE PREVIEWS — JS-rendered
   ════════════════════════════════════════════════════════════════ */

.popular-post-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.popular-post-item:hover { border-color: var(--border-hi); }

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.search-result-item:hover { border-color: var(--border-hi); }
.search-result-item .result-author { font-size: 12px; color: var(--ink-muted); }
.search-result-item .result-content { font-size: 14px; color: var(--ink); line-height: 1.45; }

.trending-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.trending-tag-chip:hover { background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.3); }

/* ════════════════════════════════════════════════════════════════
   COMMENT ACTION ROW ALIASES — renderComment uses .comment-actions
   ════════════════════════════════════════════════════════════════ */

.comment-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

/* Smaller action buttons inside comments */
.comment-actions .action-btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 14px;
}
.comment-actions .action-btn i,
.comment-actions .action-btn svg { font-size: 13px; }

/* Comment edit textarea */
.comment-edit-container { display: flex; flex-direction: column; gap: 6px; }
.comment-edit-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--ink);
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}
.comment-edit-input:focus { border-color: rgba(var(--accent-rgb), 0.5); }
.comment-edit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.edit-char-count { font-size: 11px; color: var(--ink-muted); }
.save-edit-btn, .cancel-edit-btn {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.save-edit-btn { background: var(--accent); color: #071a16; }
.save-edit-btn:hover { background: #00edbc; }
.cancel-edit-btn { background: var(--bg-3); color: var(--ink-muted); border: 1px solid var(--border); }
.cancel-edit-btn:hover { color: var(--ink); }

/* Comment link */
.comment-link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.comment-link:hover { opacity: 0.8; }

/* Comment replies */
.comment-replies { margin-top: 4px; }
.view-replies-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s;
}
.view-replies-btn:hover { opacity: 0.75; }
.replies-list { padding-left: 12px; border-left: 2px solid var(--border); margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }

/* Comment content (hyperlinks processed) */
.comment-content {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.55;
    word-break: break-word;
}

/* ════════════════════════════════════════════════════════════════
   BUTTON ICON UTILITY
   ════════════════════════════════════════════════════════════════ */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* ════════════════════════════════════════════════════════════════
   POSTS LIST container
   ════════════════════════════════════════════════════════════════ */
.posts-list { display: flex; flex-direction: column; gap: 12px; }

/* ════════════════════════════════════════════════════════════════
   SEARCH PAGE — Popular preview cards (loadPopularPreview)
   ════════════════════════════════════════════════════════════════ */

.preview-post-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.preview-post-card:hover { border-color: var(--border-hi); }

.preview-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-post-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #0c0e14;
    flex-shrink: 0;
}

.preview-post-info {
    flex: 1;
    min-width: 0;
}

.preview-post-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-post-content {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.45;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tag chips in trending section */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.tag-chip:hover { background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.3); }
.tag-chip span { color: var(--ink-muted); font-size: 11px; }

/* Recent search items */
.recent-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: color 0.15s;
}
.recent-search-item:hover { color: var(--accent); }
.recent-search-item span { font-size: 13px; color: var(--ink-muted); }
.recent-search-item button { font-size: 11px; color: var(--ink-muted); background: none; border: none; cursor: pointer; }

/* User result cards */
.user-result-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.user-result-card:hover { border-color: var(--border-hi); }

.user-avatar-large {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #0c0e14;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 14px; font-weight: 700; color: var(--ink); }

/* New DM modal — user search results */
.user-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}
.user-search-item:hover {
    background: var(--bg-3);
    border-color: var(--border);
}
.user-search-item .user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #0c0e14;
    flex-shrink: 0;
}
.user-search-item .user-info { flex: 1; min-width: 0; }
.user-search-item .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-search-item .user-id {
    font-size: 11px;
    color: var(--ink-muted);
    margin-top: 1px;
}
.user-search-item .user-search-action {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
}
.user-search-item:hover .user-search-action { opacity: 1; }
.no-results {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: var(--ink-muted);
}
.user-stats { display: flex; gap: 12px; margin-top: 2px; }
.user-stats span { font-size: 12px; color: var(--ink-muted); display: flex; align-items: center; gap: 4px; }

/* Hashtag result cards */
.hashtag-result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.hashtag-result-card:hover { border-color: var(--border-hi); }
.hashtag-info h4 { font-size: 14px; font-weight: 700; color: var(--accent); margin: 0; }
.hashtag-info p { font-size: 12px; color: var(--ink-muted); margin: 2px 0 0; }
.hashtag-count { font-size: 12px; color: var(--ink-muted); }

/* ════════════════════════════════════════════════════════════════
   PROFILE PAGE TABS
   ════════════════════════════════════════════════════════════════ */
.profile-tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.profile-tab:hover { color: var(--ink); }
.profile-tab.active {
    color: var(--accent);
    font-weight: 600;
}
.profile-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}

/* ════════════════════════════════════════════════════════════════
   CHAT — MOBILE LIST VIEW
   Full-screen conversation list (like WhatsApp) shown on mobile
   when no room is selected.
   ════════════════════════════════════════════════════════════════ */

#chat-list-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: var(--bg);
}

/* Hide list view on desktop — sidebar handles it */
@media (min-width: 640px) {
    #chat-list-view { display: none !important; }
}

/* Show list view on mobile by default; hide when chatting */
@media (max-width: 639px) {
    #chat-list-view { display: flex; }
    #chat-list-view.hidden { display: none !important; }

    /* When list view is hidden, chat header gets a back button */
    .chat-back-btn { display: flex !important; }

    /* Sidebar on mobile is a modal overlay (existing behaviour) */
}

.chat-list-header {
    padding: 16px 16px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}
.chat-list-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 12px;
}

/* Direct / Groups tabs */
.chat-list-tabs {
    display: flex;
    gap: 8px;
    padding-bottom: 0;
    margin-bottom: 1.25rem;
}
.chat-list-tab {
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    background: var(--bg-3);
    color: var(--ink-muted);
}
.chat-list-tab.active {
    background: var(--accent);
    color: #071a16;
}

/* Scrollable conversation list */
.chat-list-scroll {
    flex: 1;
    overflow-y: auto;
}

/* Individual conversation row */
.chat-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.12s;
    text-align: left;
    width: 100%;
    background: transparent;
}
.chat-list-row:hover,
.chat-list-row:active { background: var(--bg-2); }

.chat-list-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #0c0e14;
    position: relative;
    flex-shrink: 0;
}
.chat-list-avatar .online-dot {
    position: absolute;
    bottom: 1px; right: 1px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--ok);
    border: 2px solid var(--bg);
}

.chat-list-body {
    flex: 1;
    min-width: 0;
}
.chat-list-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-list-preview {
    font-size: 13px;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-list-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.chat-list-time {
    font-size: 11px;
    color: var(--ink-muted);
    white-space: nowrap;
}
.chat-list-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent);
    color: #071a16;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--ink-muted);
    text-align: center;
}
.chat-list-empty i { font-size: 40px; opacity: 0.2; margin-bottom: 12px; }
.chat-list-empty p { font-size: 13px; }

/* Chat back button (mobile only, hidden by default) */
.chat-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    color: var(--ink-muted);
    transition: background 0.15s, color 0.15s;
}
.chat-back-btn:hover { background: var(--bg-3); color: var(--ink); }

/* Room member count subtitle in header */
#chat-subtitle {
    font-size: 10px;
    color: var(--ink-muted);
    display: block;
    text-align: center;
}

/* ── Wallet Transactions ─────────────────────────────────────── */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 8px;
}
.transaction-item:last-child { border-bottom: none; }
.transaction-item:hover { background: var(--bg-3); }

.tx-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.tx-icon.deposit       { background: rgba(0,200,120,0.12); color: var(--ok, #00c878); }
.tx-icon.withdrawal    { background: rgba(239,68,68,0.12);  color: var(--danger, #ef4444); }
.tx-icon.tip_sent      { background: rgba(0,212,170,0.12);  color: var(--accent); }
.tx-icon.tip_received  { background: rgba(0,212,170,0.12);  color: var(--accent); }

.tx-info {
    flex: 1;
    min-width: 0;
}
.tx-type {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tx-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.tx-date {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--ink-muted);
}
.tx-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 20px;
    text-transform: capitalize;
}
.tx-status.completed, .tx-status.success {
    background: rgba(0,200,120,0.12);
    color: var(--ok, #00c878);
}
.tx-status.pending {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}
.tx-status.failed {
    background: rgba(239,68,68,0.12);
    color: var(--danger, #ef4444);
}
.tx-amount {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.tx-amount.positive { color: var(--ok, #00c878); }
.tx-amount.negative { color: var(--danger, #ef4444); }

/* Transaction detail modal */
.tx-detail { display: flex; flex-direction: column; gap: 4px; }
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row > span:first-child { color: var(--ink-muted); flex-shrink: 0; }
.detail-row > span:last-child  { color: var(--ink); font-weight: 600; text-align: right; }
.tx-hash {
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
    text-align: right;
}
.tx-address {
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
}
.tx-type-badge, .tx-status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: capitalize;
}
.tx-type-badge.deposit, .tx-status-badge.completed {
    background: rgba(0,200,120,0.12); color: var(--ok, #00c878);
}
.tx-type-badge.withdrawal {
    background: rgba(239,68,68,0.12); color: var(--danger, #ef4444);
}
.tx-type-badge.tip_sent, .tx-type-badge.tip_received {
    background: rgba(0,212,170,0.12); color: var(--accent);
}
.tx-status-badge.pending {
    background: rgba(245,158,11,0.12); color: #f59e0b;
}
.tx-status-badge.failed {
    background: rgba(239,68,68,0.12); color: var(--danger, #ef4444);
}
.tx-amount-detail {
    font-size: 16px;
    font-weight: 800;
}
.tx-amount-detail.positive { color: var(--ok, #00c878); }
.tx-amount-detail.negative { color: var(--danger, #ef4444); }
/* ── Post context menu ───────────────────────────────────────── */
.post-context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 180px;
    background: var(--bg-2);
    border: 1px solid var(--border-hi);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    animation: fadeSlideIn .15s ease;
}

.pcm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
.pcm-item:hover { background: var(--bg-3); }
.pcm-item.pcm-danger { color: var(--danger); }
.pcm-item.pcm-danger:hover { background: rgba(240,80,112,.1); }

/* ── Hashtag pill filter bar ─────────────────────────────────── */
.hashtag-filter-bar {
    position: sticky;
    top: 0;
    z-index: 39;
    background: var(--bg);
    padding: 10px 0 10px;
    border-bottom: 1px solid var(--border);
}

.hashtag-filter-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Cap width on desktop so it doesn't stretch edge-to-edge */
    max-width: 42rem;
    margin: 0 auto;
}
.hashtag-filter-inner::-webkit-scrollbar { display: none; }

.hashtag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
    background: var(--bg-2);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.18s;
    flex-shrink: 0;
}
.hashtag-pill:hover { border-color: var(--border-hi); color: var(--ink); }
.hashtag-pill.active {
    background: var(--accent);
    color: #071a16;
    border-color: var(--accent);
    font-weight: 700;
}

/* ── Ensure inputs are always full width ─────────────────────── */
.message-input-row { width: 100%; }
textarea.message-input, textarea.comment-input { width: 100%; min-width: 0; }