/*
 * Styles for safety: the Report button and its pop-up, the community rules page, and the team's
 * moderation queue (pages/moderation.js). Loaded on every page by index.html.
 */

/* ---------- Report button and dialog ---------- */

.report-link {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.report-link:hover {
  color: var(--ink);
}

.report {
  max-width: 420px;
}

.report__reasons {
  display: grid;
  gap: 4px;
  margin: 4px 0 12px;
}

.report__reason {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.report__reason:hover,
.report__reason:has(input:checked) {
  background: var(--surface-muted);
}

.report__reason input {
  accent-color: var(--accent);
}

/* ---------- Community rules (a public page, always light like the home page) ---------- */

.rules {
  min-height: 100svh;
  padding: 24px 16px 64px;
}

.rules__brand {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--e-ink);
  font-weight: 700;
}

.rules__main {
  display: grid;
  gap: 20px;
  max-width: 720px;
  margin: 32px auto 0;
}

.rules__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.02em;
}

.rules__subtitle {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.rules__lead {
  color: var(--e-ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.rules__lead .icon {
  vertical-align: -2px;
}

.rules__list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.rules__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--e-line);
  border-radius: var(--radius);
  background: var(--surface);
}

.rules__item h2 {
  font-size: 1.05rem;
}

.rules__item p {
  margin-top: 4px;
  color: var(--e-ink-soft);
  line-height: 1.55;
}

.rules__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--e-moss);
}

.rules__plain {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--e-ink-soft);
  line-height: 1.55;
}

.rules .btn {
  justify-self: start;
}

/* ---------- Moderation queue ---------- */

.mod-lookup {
  display: flex;
  gap: 8px;
}

.mod-lookup .input {
  flex: 1;
}

/* One reported thing in the moderation queue, with its reports and the actions to take. */
.mod-case {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.mod-case--urgent {
  border-color: var(--danger);
  box-shadow: inset 4px 0 0 var(--danger);
}

.mod-case__header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mod-case__kind {
  font-weight: 700;
}

.mod-chip {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.mod-chip--priority {
  background: var(--danger);
  color: #fff;
}

.mod-chip--auto {
  background: var(--surface-sunken);
  color: var(--ink-soft);
}

.mod-case__text {
  max-height: 240px;
  overflow: auto;
  padding: 10px 14px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mod-case__details {
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.mod-case__owner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mod-case__owner > div {
  flex: 1;
  min-width: 180px;
}

.mod-case__actions {
  display: grid;
  gap: 8px;
}

.mod-case__days {
  width: auto;
  height: 32px;
  padding: 0 8px;
}

.mod-record h3 {
  margin-top: 8px;
  font-size: 1rem;
}

.mod-history {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  font-size: 0.9rem;
}
