/* .common-frame and main.content set font-size: 0 - every page sets its own */
.common-frame.chat-moderation { font-size: 14px; }
.chat-moderation h1 { margin: 0 0 16px; font-size: 32px; font-weight: 400; }
.chat-moderation .none { display: none !important; }

/* the filter row as on /employees/: 200px fields from the left, buttons on the right */
.chat-moderation-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.chat-moderation-filter .classowl-input-frame { width: 200px; }
.chat-moderation-filter .ctrls { margin-left: auto; display: flex; gap: 10px; }
.chat-moderation-filter .ctrls .classowl-button { width: auto; }

/* tables are the app's .classowl-table-large; only the clickable rows are ours */
.chat-moderation-table tr[data-link], .chat-moderation-table tr[data-block] { cursor: pointer; }
.chat-moderation-table tr[data-link]:hover td, .chat-moderation-table tr[data-block]:hover td { background: #f7f9fb; }
.chat-moderation-table td.go { width: 24px; text-align: right; }

.chat-moderation-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chat-moderation-person .photo { width: 28px; height: 28px; border-radius: 50%; background-size: cover; background-position: center; flex: none; }
.chat-moderation-person .email { display: block; color: var(--chat-text-muted); font-size: 12px; }

/* Status chips: the app's hues, darkened until the text clears 4.5:1 on its soft background */
.chat-moderation-status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.chat-moderation-status.status-new { color: #1f6bcc; background: #edf2fb; }
.chat-moderation-status.status-in_review { color: #c2410c; background: #fff4e5; }
.chat-moderation-status.status-resolved { color: #0b7a45; background: #e7f7ef; }
.chat-moderation-status.status-dismissed { color: var(--chat-text-muted); background: #f0f3f8; }

.chat-moderation-empty { padding: 32px; text-align: center; color: var(--chat-text-muted); background: #fff; }

.chat-moderation-pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.chat-moderation-pagination .pages { display: flex; gap: 4px; }
.chat-moderation-pagination .page { min-width: 28px; height: 28px; line-height: 28px; text-align: center; border: 1px solid #e3e6ea; border-radius: 4px; }
.chat-moderation-pagination .page.current { background: #1e6fd9; color: #fff; border-color: #1e6fd9; }
.chat-moderation-pagination .page.disabled { pointer-events: none; opacity: .4; }

@media (max-width: 768px) {
    .common-frame.chat-moderation { padding: 16px; }
    .chat-moderation-filter .classowl-input-frame { width: 100%; }
    .chat-moderation-filter .ctrls { margin-left: 0; }
    /* Status is the column a moderator scans for: the reporter and the type give way, names wrap */
    .chat-moderation-reports .reporter, .chat-moderation-reports .type { display: none; }
    .chat-moderation-reports .chat-moderation-person .nowrap { white-space: normal; overflow-wrap: anywhere; }
}

.chat-moderation-report .back { display: inline-block; margin-bottom: 16px; }
.chat-moderation-report .panels { display: grid; grid-template-columns: 300px 1fr 300px; gap: 16px; align-items: start; }
.chat-moderation-report .panel { background: #fff; border: 1px solid #e3e6ea; border-radius: 6px; padding: 16px; }
.chat-moderation-report .panel h2 { font-size: 15px; margin: 0 0 12px; }
.chat-moderation-report dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 16px; }
.chat-moderation-report dt { color: var(--chat-text-muted); }
.chat-moderation-report dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* A 1000-character comment scrolls in its own box instead of pushing Status and Block User far down */
.chat-moderation-report dd.details { max-height: 8em; overflow-y: auto; white-space: pre-wrap; }
.chat-moderation-report .info form, .chat-moderation-report .info > .classowl-button { display: block; margin-bottom: 8px; }
.chat-moderation-report .info .classowl-button { width: 100%; box-sizing: border-box; text-align: center; }
.chat-moderation-report .note { margin-top: 12px; padding: 8px 10px; background: #fff7d6; border: 1px solid #f0d878; border-radius: 4px; font-size: 12px; }
.chat-moderation-blocked { display: block; margin-bottom: 8px; color: #c0392b; }

.chat-moderation-message { padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; background: #f5f7f9; }
.chat-moderation-message .meta { font-size: 12px; color: var(--chat-text-muted); margin-bottom: 2px; }
.chat-moderation-message .sender { font-weight: 600; color: #333; }
.chat-moderation-message .text { max-height: 16em; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-moderation-message.reported { background: #fdecea; border: 1px solid #f5b7b1; }
.chat-moderation-message .mark { color: #c0392b; font-weight: 600; }
.chat-moderation-message.tombstone .text { font-style: italic; color: var(--chat-text-muted); }
.chat-moderation-report .context-note { font-size: 12px; color: var(--chat-text-muted); margin-bottom: 8px; }
.chat-moderation-report .notes textarea { width: 100%; resize: vertical; }
.chat-moderation-saved { margin-left: 8px; color: #2e8b57; }
.chat-moderation-warning { margin: 12px 0; padding: 8px 10px; background: #eef4fd; border-radius: 4px; font-size: 12px; }

@media (max-width: 1100px) { .chat-moderation-report .panels { grid-template-columns: 1fr; } }
/* the info column is narrow: a moderator needs the whole name, so it wraps instead of trailing off */
.chat-moderation-report .info .chat-moderation-person .nowrap { white-space: normal; overflow-wrap: anywhere; }


/* room between a field and its button, and between the status group and the actions */
.chat-moderation-report .info form.status label { display: block; margin-bottom: 4px; }
.chat-moderation-report .info form.status .classowl-input-frame { margin-bottom: 8px; }
.chat-moderation-report .info form.status { margin-bottom: 16px; }
.chat-moderation-report .notes .classowl-input-frame { margin-bottom: 8px; }

/* Blocked Users: heading with Block User, row actions, dialogs */
.chat-moderation-table td.actions .classowl-button.more { height: 34px; line-height: 32px; }
.chat-moderation-card { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; padding: 12px; background: #f5f7f9; border-radius: 6px; }
.chat-moderation-card .photo { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; flex: none; }
.chat-moderation-card .name { font-weight: 600; }
.chat-moderation-card .email, .chat-moderation-card .role { font-size: 13px; color: var(--chat-text-muted); }
.chat-moderation-details { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0 0 20px; font-size: 14px; }
.chat-moderation-details dt { color: var(--chat-text-muted); }
.chat-moderation-details dd { margin: 0; overflow-wrap: anywhere; }
.chat-moderation-details dd.comment { white-space: pre-wrap; }
.chat-moderation-details a.disabled { pointer-events: none; color: inherit; }
.chat-moderation-status.status-blocked { color: #c0392b; }

/* the right column: notes, then the Actions panel with its quick actions */
.chat-moderation-report .side { display: flex; flex-direction: column; gap: 16px; }
.chat-moderation-report .actions p { margin: 0 0 10px; font-size: 13px; color: #555; }
.chat-moderation-report .actions .quick-title { font-size: 13px; margin-bottom: 6px; }
.chat-moderation-report .actions ul.quick { margin: 0; padding-left: 18px; list-style: disc; font-size: 13px; }
.chat-moderation-report .actions ul.quick li { margin: 4px 0; display: list-item; list-style: disc outside; }
.chat-moderation-report .actions ul.quick form { display: inline; margin: 0; }
.chat-moderation-report .actions ul.quick button { min-height: 32px; padding: 0; border: 0; background: none; font: inherit; color: #1f6bcc; cursor: pointer; }
.chat-moderation-report .actions ul.quick a { display: inline-block; min-height: 32px; line-height: 32px; color: #1f6bcc; }
.chat-moderation-report .actions ul.quick button:hover, .chat-moderation-report .actions ul.quick a:hover { text-decoration: underline; }
/* The report's current status, kept in place so the list does not shift under the pointer */
.chat-moderation-report .actions ul.quick button:disabled { color: var(--chat-text-muted); cursor: default; text-decoration: none; }
