/* community/moderation.css — report dialog, toast, admin moderation queue.
   Dark is the default; every rule that sets a colour has a
   body.light-theme override below it. */

/* ── Flag button in post actions ── */
.flag-btn.flagged,
.flag-btn:disabled { opacity: 0.55; cursor: default; }
.flag-btn-label { font-size: 0.8rem; }
.flag-admin-indicator {
    font-size: 0.8rem;
    color: #f0a500;
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
}

/* ── Report dialog ── */
.mod-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.mod-dialog {
    width: 100%; max-width: 440px;
    background: #1c1916;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    color: #e8dfcc;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.mod-dialog-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.mod-dialog-header h3 { margin: 0; font-size: 1.15rem; color: var(--primary-gold, #ffd700); }
.mod-dialog-close { background: none; border: none; color: #9a9080; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.mod-choice {
    display: flex; gap: 0.7rem; align-items: flex-start;
    padding: 0.75rem 0.85rem; margin-bottom: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; cursor: pointer;
}
.mod-choice:has(input:checked) { border-color: var(--primary-gold, #ffd700); background: rgba(255, 215, 0, 0.06); }
.mod-choice input { margin-top: 0.2rem; width: 18px; height: 18px; flex-shrink: 0; }
.mod-choice strong { display: block; font-size: 0.98rem; }
.mod-choice small { display: block; color: #a89e8c; font-size: 0.82rem; margin-top: 0.15rem; line-height: 1.35; }
.mod-reason {
    width: 100%; box-sizing: border-box;
    min-height: 80px; resize: vertical;
    margin: 0.4rem 0 1rem; padding: 0.65rem 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px; color: inherit; font: inherit; font-size: 0.92rem;
}
.mod-reason:focus { outline: none; border-color: var(--light-purple, #a78bfa); }
.mod-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ── Buttons ── */
.mod-btn {
    padding: 0.5rem 0.95rem;
    border-radius: 8px; border: 1px solid transparent;
    font: inherit; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
.mod-btn:disabled { opacity: 0.6; cursor: wait; }
.mod-btn-primary { background: var(--primary-gold, #ffd700); color: #1a1a1a; }
.mod-btn-good    { background: rgba(63, 185, 80, 0.16); color: #4ade80; border-color: rgba(63, 185, 80, 0.4); }
.mod-btn-warn    { background: rgba(248, 81, 73, 0.14); color: #f87171; border-color: rgba(248, 81, 73, 0.4); }
.mod-btn-ghost   { background: transparent; color: #a89e8c; border-color: rgba(255, 255, 255, 0.15); }
.mod-btn:hover:not(:disabled) { filter: brightness(1.12); }

/* ── Toast ── */
.mod-toast {
    position: fixed; left: 50%; bottom: 28px;
    transform: translate(-50%, 20px);
    background: #2a2420; color: #f3ead6;
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 0.7rem 1.1rem; border-radius: 10px;
    font-size: 0.92rem; z-index: 10001;
    opacity: 0; transition: opacity 0.25s, transform 0.25s;
    max-width: calc(100vw - 32px);
}
.mod-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Admin queue ── */
.mod-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
}
.mod-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.mod-title { font-size: 1.1rem; font-weight: 700; color: var(--primary-gold, #ffd700); }
.mod-refresh { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.mod-section { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 0.6rem 0; }
.mod-section summary { cursor: pointer; font-weight: 600; color: #e8dfcc; list-style-position: inside; }
.mod-count {
    display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 0.35rem;
    border-radius: 11px; background: rgba(255, 215, 0, 0.15); color: var(--primary-gold, #ffd700);
    font-size: 0.78rem; text-align: center;
}
.mod-empty { color: #8f8676; font-size: 0.88rem; margin: 0.6rem 0 0.2rem; }

.mod-item {
    margin-top: 0.75rem; padding: 0.85rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.mod-item-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.mod-status { font-size: 0.8rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 6px; }
.mod-status-pending { background: rgba(248, 81, 73, 0.15); color: #f87171; }
.mod-status-watch   { background: rgba(240, 165, 0, 0.15); color: #f0a500; }
.mod-status-removed { background: rgba(255, 255, 255, 0.08); color: #a89e8c; }
.mod-open { font-size: 0.8rem; color: var(--light-purple, #a78bfa); text-decoration: none; }

.mod-post { border-left: 3px solid rgba(255, 215, 0, 0.3); padding-left: 0.7rem; }
.mod-post-author { font-size: 0.88rem; color: #e8dfcc; }
.mod-post-author a { color: inherit; font-weight: 600; text-decoration: none; }
.mod-post-time { color: #8f8676; font-size: 0.8rem; }
.mod-post-text { margin-top: 0.35rem; color: #d6ccb8; font-size: 0.92rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.mod-post-img { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; margin-top: 0.5rem; cursor: pointer; }
.mod-post-video { margin-top: 0.4rem; font-size: 0.82rem; color: #a89e8c; word-break: break-all; }

.mod-reports { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.mod-report { padding: 0.45rem 0; border-top: 1px dashed rgba(255, 255, 255, 0.08); font-size: 0.85rem; color: #d6ccb8; }
.mod-report-head a { color: var(--light-purple, #a78bfa); text-decoration: none; }
.mod-report-time { color: #8f8676; font-size: 0.78rem; margin-left: 0.3rem; }
.mod-report-reason { margin-top: 0.2rem; color: #b9af9b; font-style: italic; }
.mod-chip { display: inline-block; font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 5px; margin-left: 0.25rem; }
.mod-chip-warn  { background: rgba(248, 81, 73, 0.15); color: #f87171; }
.mod-chip-muted { background: rgba(255, 255, 255, 0.08); color: #a89e8c; }

.mod-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }

@media (max-width: 480px) {
    .mod-actions .mod-btn { flex: 1 1 auto; }
}

/* ── Light theme ── */
body.light-theme .mod-dialog { background: #fffaf0; color: #3a3226; border-color: rgba(150, 120, 60, 0.3); }
body.light-theme .mod-dialog-close { color: #8a7d68; }
body.light-theme .mod-choice { border-color: rgba(0, 0, 0, 0.12); }
body.light-theme .mod-choice:has(input:checked) { border-color: #b8860b; background: rgba(184, 134, 11, 0.08); }
body.light-theme .mod-choice small { color: #7a6e5a; }
body.light-theme .mod-reason { background: #fff; border-color: rgba(0, 0, 0, 0.15); color: #3a3226; }
body.light-theme .mod-dialog-header h3,
body.light-theme .mod-title { color: #9a6f00; }
body.light-theme .mod-btn-primary { background: #b8860b; color: #fff; }
body.light-theme .mod-btn-good { background: rgba(22, 130, 60, 0.1); color: #157a3a; border-color: rgba(22, 130, 60, 0.35); }
body.light-theme .mod-btn-warn { background: rgba(190, 40, 40, 0.08); color: #b42318; border-color: rgba(190, 40, 40, 0.3); }
body.light-theme .mod-btn-ghost { color: #6b604c; border-color: rgba(0, 0, 0, 0.18); }
body.light-theme .mod-toast { background: #3a3226; color: #fffaf0; }
body.light-theme .mod-panel { background: rgba(255, 250, 235, 0.7); border-color: rgba(150, 120, 60, 0.3); }
body.light-theme .mod-section { border-top-color: rgba(0, 0, 0, 0.08); }
body.light-theme .mod-section summary { color: #3a3226; }
body.light-theme .mod-count { background: rgba(184, 134, 11, 0.15); color: #8a6200; }
body.light-theme .mod-empty { color: #8a7d68; }
body.light-theme .mod-item { background: #fff; border-color: rgba(0, 0, 0, 0.1); }
body.light-theme .mod-status-pending { background: rgba(190, 40, 40, 0.1); color: #b42318; }
body.light-theme .mod-status-watch { background: rgba(200, 130, 0, 0.12); color: #9a5b00; }
body.light-theme .mod-status-removed { background: rgba(0, 0, 0, 0.06); color: #6b604c; }
body.light-theme .mod-open,
body.light-theme .mod-report-head a { color: #6d4fd8; }
body.light-theme .mod-post { border-left-color: rgba(184, 134, 11, 0.4); }
body.light-theme .mod-post-author { color: #3a3226; }
body.light-theme .mod-post-time,
body.light-theme .mod-report-time { color: #8a7d68; }
body.light-theme .mod-post-text,
body.light-theme .mod-report { color: #4a4134; }
body.light-theme .mod-report { border-top-color: rgba(0, 0, 0, 0.1); }
body.light-theme .mod-report-reason { color: #6b604c; }
body.light-theme .mod-chip-warn { background: rgba(190, 40, 40, 0.1); color: #b42318; }
body.light-theme .mod-chip-muted,
body.light-theme .mod-post-video { color: #6b604c; }
body.light-theme .mod-chip-muted { background: rgba(0, 0, 0, 0.06); }
body.light-theme .flag-admin-indicator { color: #9a5b00; }
