/* Reporting a person (#159): the shared report dialog's person mode and
   success step, the DM header action, and person cases in the moderation
   queue. Uses only existing tokens. */

/* ---- Report dialog ---- */
.report-person { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--raised); }
.report-person > div { display: grid; gap: 0.2rem; min-width: 0; }
.report-person strong { overflow-wrap: anywhere; }
.report-person p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.report-person-avatar { flex: none; display: grid; }
.report-person-avatar > * { width: 3rem; height: 3rem; font-size: 1rem; }
.report-context { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.report-count { margin: -0.6rem 0 0; color: var(--text-muted); font-size: 0.8rem; text-align: right; }
.message-report-dialog .error-text:empty { display: none; }

.report-done { padding: 1.5rem; }
.report-done h2 { margin: 0; }
.report-done h2:focus { outline: none; }
.report-done p { margin: 0; }
.report-follow-up { display: grid; gap: 0.6rem; padding-top: 0.25rem; }
.report-follow-up-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.report-follow-up-status:empty { display: none; }

@media (max-width: 30rem) {
  /* A bottom sheet on phones, with the actions in reach. */
  .message-report-dialog {
    width: 100%;
    max-width: none;
    max-height: 90dvh;
    margin: auto 0 0;
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: auto;
  }
  .message-report-dialog .action-row { position: sticky; bottom: 0; padding-top: 0.5rem; background: var(--surface); }
}

/* ---- Direct-message header ---- */
.conversation-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 0 0 auto; }

/* ---- Moderation queue ---- */
.moderation-queue-heading:has(.moderation-kind) { flex-wrap: wrap; }
/* Below 40rem the heading is a column (moderation.css); wrapping a flex column
   would start a second column beside it and overflow. */
@media (max-width: 40rem) {
  .moderation-queue-heading:has(.moderation-kind) { flex-wrap: nowrap; }
}
/* A fieldset's default min-width is its content, which overflows narrow queues; let it shrink and wrap. */
.moderation-kind { display: flex; flex: 1 1 100%; flex-wrap: wrap; min-width: 0; gap: 0.25rem; margin: 0; padding: 0.2rem; border: 1px solid var(--field-line); border-radius: 0.8rem; }
.moderation-kind legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.moderation-kind label { position: relative; flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; align-items: center; min-height: 2.75rem; padding: 0 0.6rem; border-radius: 0.6rem; color: var(--text); font-size: 0.9rem; cursor: pointer; }
.moderation-kind input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.moderation-kind label:has(input:checked) { background: var(--raised); font-weight: 700; box-shadow: inset 0 0 0 1px var(--field-line); }
.moderation-kind label:has(input:focus-visible) { outline: 2px solid var(--signature-text); outline-offset: 1px; }

.person-case-glyph {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.35em;
  vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 20a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.moderation-person-evidence { display: grid; gap: 0.6rem; }
.moderation-person-evidence h3 { margin: 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.person-evidence { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; }
.person-evidence-picture { position: relative; display: grid; place-items: center; min-width: 8rem; min-height: 8rem; border-radius: 1rem; overflow: hidden; background: var(--raised); }
.person-evidence-picture p { margin: 0; padding: 0.75rem; max-width: 12rem; font-size: 0.9rem; }
.person-evidence-picture img { display: block; width: 8rem; height: 8rem; object-fit: cover; filter: blur(16px); transform: scale(1.1); }
.person-evidence-picture.revealed img { filter: none; transform: none; }
.person-evidence-picture img:focus-visible { outline: 2px solid var(--signature-text); outline-offset: -2px; }
.person-evidence-reveal { position: absolute; }
.person-evidence-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.9rem; margin: 0; }
.person-evidence-facts dt { color: var(--text-muted); }
.person-evidence-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

@media (forced-colors: active) {
  /* Without the blur effect, keep the picture covered until revealed. */
  .person-evidence-picture:not(.revealed) img { visibility: hidden; }
  .moderation-kind label:has(input:checked) { outline: 2px solid CanvasText; }
}
