/* ══════════════════════════════════════════════════════════════════════════
   CYBE HUB — Cyberspace Forum: Additional Features (Part 3)
   Inset-only neumorphic styling, consistent with cyberspace.css tokens.
══════════════════════════════════════════════════════════════════════════ */

/* ── Pinned message tag (consistent with .cybe-cs-tag / BUSINESS badge) ── */
.cybe-cs-tag-pinned {
    background: var(--bg);
    color: #ffb400;
    box-shadow: var(--neu-in);
}

/* ── Pinned bar — sits above the thread, deep inset well ── */
.cybe-cs-pinned-bar {
    margin: 0 12px 8px;
    border-radius: var(--radius-sm, 12px);
    background: var(--bg);
    box-shadow: var(--neu-deep, inset 4.4px 4.4px 6.4px rgba(0,0,0,.4), inset -4.4px -4.4px 6.4px rgba(255,255,255,.06));
    overflow: hidden;
}
.cybe-cs-pinned-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--text);
    transition: box-shadow .2s;
}
.cybe-cs-pinned-row:hover { box-shadow: var(--neu-in); }
.cybe-cs-pinned-icon { flex-shrink: 0; font-size: 13px; }
.cybe-cs-pinned-content { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cybe-cs-pinned-content strong { color: var(--blue, #0000ff); }

/* Flash highlight when jumping to a pinned/original message */
.cybe-cs-forum-msg.cybe-cs-flash .cybe-cs-forum-bubble {
    box-shadow: var(--neu-in), 0 0 0 2px var(--blue, #0000ff);
    transition: box-shadow .3s;
}

/* ── Search bar ── */
.cybe-cs-forum-searchbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 8px;
    padding: 8px 10px;
    border-radius: 50px;
    background: var(--bg);
    box-shadow: var(--neu-in);
}
.cybe-cs-forum-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text);
    font-family: inherit;
}
.cybe-cs-forum-search-close {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: var(--neu-in);
    border: none;
    color: var(--text);
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}
.cybe-cs-forum-search-close:active { box-shadow: var(--neu-inner-deep, var(--neu-in)); }

/* ── Mention highlight inside message text ── */
.cybe-cs-mention {
    color: var(--blue, #0000ff);
    font-weight: 700;
    background: var(--bg);
    box-shadow: var(--neu-in);
    border-radius: 6px;
    padding: 0 4px;
}
.cybe-cs-forum-msg.is-own .cybe-cs-mention { color: #fff; background: rgba(255,255,255,.15); box-shadow: none; }

/* ── Mention autocomplete popover ── */
.cybe-cs-mention-box {
    position: fixed;
    z-index: 9999;
    min-width: 200px;
    max-width: 260px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg);
    box-shadow: var(--neu-out, var(--neu-in));
    border-radius: var(--radius-sm, 12px);
    padding: 6px;
}
.cybe-cs-mention-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: var(--bg);
    box-shadow: var(--neu-in);
    border: none;
    border-radius: 10px;
    padding: 7px 10px;
    margin-bottom: 4px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}
.cybe-cs-mention-item:last-child { margin-bottom: 0; }
.cybe-cs-mention-item:hover { box-shadow: var(--neu-deep, var(--neu-in)); }
.cybe-cs-mention-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    background-size: cover; background-position: center;
    box-shadow: var(--neu-in);
    flex-shrink: 0;
}

/* ── Typing indicator ── */
.cybe-cs-typing-indicator {
    margin: 0 16px 6px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-style: italic;
    color: var(--text-muted, #888aaa);
    background: var(--bg);
    box-shadow: var(--neu-in);
    border-radius: 20px;
    display: inline-block;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Extra message action buttons (pin/share/report) reuse existing pill style ── */
.cybe-cs-pin-btn.is-active { box-shadow: var(--neu-inner-deep, var(--neu-in)); color: #ffb400; }
.cybe-cs-report-btn:hover { color: #ff4d4d; }

/* ── Report confirmation modal ── */
.cybe-cs-report-modal-backdrop {
    position: fixed; inset: 0; z-index: 10500;
    background: rgba(0,0,10,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.cybe-cs-report-modal-backdrop[hidden] { display: none; }
.cybe-cs-report-modal {
    width: 100%; max-width: 380px;
    background: var(--bg);
    box-shadow: var(--neu-deep, inset 4.4px 4.4px 6.4px rgba(0,0,0,.4), inset -4.4px -4.4px 6.4px rgba(255,255,255,.06));
    border-radius: var(--radius, 16px);
    padding: 20px;
}
.cybe-cs-report-modal h3 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.cybe-cs-report-modal p { margin: 0 0 12px; font-size: 12.5px; opacity: .75; color: var(--text); }
.cybe-cs-report-modal-reason {
    width: 100%; box-sizing: border-box;
    background: var(--bg); box-shadow: var(--neu-in);
    border: none; outline: none; border-radius: var(--radius-sm, 12px);
    padding: 10px 12px; font-size: 13px; color: var(--text); font-family: inherit; resize: vertical;
}
.cybe-cs-report-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.cybe-cs-report-modal-cancel, .cybe-cs-report-modal-confirm {
    background: var(--bg); box-shadow: var(--neu-in); border: none; border-radius: 50px;
    padding: 9px 18px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--text);
}
.cybe-cs-report-modal-confirm { color: #ff4d4d; }
.cybe-cs-report-modal-cancel:active, .cybe-cs-report-modal-confirm:active { box-shadow: var(--neu-inner-deep, var(--neu-in)); }

/* ── Shimmer loading for avatars/media images ── */
.cybe-cs-shimmer-active {
    position: relative;
    overflow: hidden;
    background: var(--bg);
}
.cybe-cs-shimmer-active::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: cybe-cs-shimmer-sweep 1.3s ease-in-out infinite;
    pointer-events: none;
}
[data-theme="light"] .cybe-cs-shimmer-active::after {
    background: linear-gradient(100deg, transparent 30%, rgba(0,0,50,.08) 50%, transparent 70%);
    background-size: 200% 100%;
}
@keyframes cybe-cs-shimmer-sweep {
    0%   { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}

/* ── Responsive: drawer as overlay on both mobile and desktop ── */
@media (max-width: 900px) {
    .cybe-cs-forum-searchbar,
    .cybe-cs-pinned-bar { margin-left: 8px; margin-right: 8px; }
    .cybe-cs-mention-box { max-width: calc(100vw - 24px); }
    .cybe-cs-typing-indicator { max-width: calc(100% - 16px); margin-left: 10px; }
}
