/* Admin area */

.admin { padding-top: 24px; }
.admin .section__title { margin-top: 32px; font-size: 1.15rem; }
.admin__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; align-items: start; }
.admin__cards .card + .card { margin-top: 0; }
.admin__cards p { margin: 0 0 12px; }
.admin__staff, .admin__recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.925rem; }
.admin__links { margin: 0 0 16px; font-size: 0.925rem; }
.admin__activity { margin-top: 14px; }
.admin__more { margin: 14px 0 0; font-size: 0.925rem; }
.admin__activity li > .muted { white-space: nowrap; }
.admin__activity li { display: grid; grid-template-columns: 12.5em 1fr; gap: 10px; align-items: baseline; }
@media (max-width: 480px) { .admin__activity li { grid-template-columns: 1fr; gap: 0; } }
.admin__columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.admin__columns .card + .card { margin-top: 0; }
.admin__section { margin-top: 16px; }
.admin__section-gap { margin-top: 32px; }
.admin__ipinfo { margin-left: 6px; font-size: 0.8rem; }

/* Throttled visitors: which day, and the filters */
.throttled__day { margin: 0 0 12px; }
.throttled__filters { margin-bottom: 12px; font-size: 0.875rem; }
.throttled__filters input[type="date"] { width: auto; padding: 0.35em 0.6em; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--paper); color: var(--ink); font: inherit; }
.throttled__filter { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; }
.throttled__count, .throttled__listed-about { margin: 0 0 8px; font-size: 0.875rem; }
/* A block can list every limit: wide enough not to run to one a line. (On the text, since a
   table cell ignores min-width.) */
.throttled__limits { min-width: 8rem; }
/* "Exempt" or "Refuse" under an address or block */
.throttled__action { font-size: 0.75rem; }
/* "Refused" or "Exempted" beside an address: a small tag that opens the list it's on. */
.admin a.listing-tag { display: inline-block; margin-top: 4px; padding: 2px 9px; border: 1px solid currentcolor; border-radius: 999px; font-size: 0.7rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em; text-decoration: none; white-space: nowrap; }
.admin a.listing-tag--refused { background: var(--red-soft); color: var(--red); }
.admin a.listing-tag--exempt { background: var(--paper-2); color: var(--ink-2); }
.admin a.listing-tag:hover { text-decoration: underline; }

/* A round "i" that opens an explanation (popover) */
.info-button { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; margin-left: 4px; padding: 0; border: 1px solid currentcolor; border-radius: 50%; background: none; color: var(--ink-3); font-family: Georgia, serif; font-size: 0.8rem; font-style: italic; font-weight: 700; line-height: 1; text-transform: none; vertical-align: middle; cursor: pointer; }
.info-button:hover { color: var(--red); }
.limits-help { width: min(36rem, calc(100% - 32px)); max-height: 85vh; margin: auto; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-size: 0.9rem; }
.limits-help::backdrop { background: rgb(0 0 0 / 0.35); }
.limits-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0 0 16px; }
.limits-help dt { font-weight: 700; white-space: nowrap; }
.limits-help dd { margin: 0; }
@media (max-width: 520px) { .limits-help dl { grid-template-columns: 1fr; gap: 2px; } .limits-help dd { margin-bottom: 10px; } }
/* Where an IP address is: the facts, with the map beside them on wide screens. */
.ip-location__found { display: grid; gap: 20px; align-items: start; margin-bottom: 12px; }
.ip-location__facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 0.925rem; }
.ip-location__facts dt { color: var(--ink-3); }
.ip-location__facts dd { margin: 0; overflow-wrap: anywhere; }
.ip-location__map { height: 320px; }
@media (min-width: 52rem) { .ip-location__found--map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }

.admin__subtitle { margin: 18px 0 8px; font-size: 0.95rem; }
.admin__actions { display: grid; gap: 14px; }
.admin__label { min-width: 6.5em; color: var(--ink-3); font-size: 0.875rem; }
.admin-inline__form input.admin__number { width: 8em; padding: 0.4em 0.6em; }
.admin__search { margin-bottom: 20px; }
.admin__search input[type="search"], .admin__cards input[type="search"] { flex: 1 1 200px; }
.admin__prefix-input { width: 5em; text-transform: uppercase; }
.admin__row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.admin__row-actions form { margin: 0; }
.admin__row-actions--stacked { flex-direction: column; align-items: stretch; }
/* Prefixes to review: room for who first tried it and how long they've been a member. */
.admin__prefix-first { min-width: 13rem; }
.admin__prefix-detail { font-size: 0.8rem; }
.admin__block-form { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; max-width: 560px; margin-bottom: 16px; }
.admin__block-form label { color: var(--ink-3); font-size: 0.875rem; }
.admin__block-form > div { grid-column: 2; }
@media (max-width: 520px) {
  .admin__block-form { grid-template-columns: 1fr; }
  .admin__block-form > div { grid-column: 1; }
}

/* A row of small controls: a field or two and a button */
.admin-inline { margin-top: 10px; }
.admin-inline__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.admin-inline__form form { margin: 0; }
.admin-inline__form input[type="text"], .admin-inline__form input[type="search"], .admin-inline__form select { width: auto; padding: 0.4em 0.6em; }

/* Refused entries: how often each reason has come up */
.refused__reasons { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.925rem; }
.refused__reasons a.is-current { color: var(--ink); font-weight: 700; }

/* Email totals */
.admin__totals { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
.admin__totals th, .admin__totals td { padding: 4px 0; text-align: left; }
.admin__totals .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin__totals tfoot th { border-top: 1px solid var(--line); padding-top: 8px; }

/* Series */
.admin__series-form { max-width: 640px; }
.admin__url { max-width: 22em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.note-exclusion { margin-bottom: 24px; }
.admin-inline__form input.note-exclusion__reason { flex: 1 1 100%; width: 100%; min-width: 0; box-sizing: border-box; }
.hit-flag__hit + .hit-flag__hit { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hit-flag__flags { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.hit-flag__source { font-weight: 700; font-size: 0.85rem; padding: 2px 8px; border-radius: var(--radius-small); background: var(--paper-2); }
.hit-flag__source--note_owner { background: var(--red-soft); }
.hit-flag__reason { display: block; margin-top: 4px; }

/* Past decisions: a compact table whose rows open to show the flags (row_toggle_controller.js). */
.flag-table .flag-row__summary { cursor: pointer; }
.flag-table .flag-row__summary:hover { background: var(--paper-2); }
.flag-table .flag-row__chevron { width: 1%; padding-right: 0; }
.flag-table .flag-row__toggle { border: 0; background: none; padding: 2px 6px; color: var(--ink-3); cursor: pointer; font-size: 0.9rem; line-height: 1; }
.flag-table .flag-row__detail td { background: var(--paper-2); }
.flag-table .flag-row__detail p:first-child { margin-top: 0; }
.flag-table .flag-row.is-open .flag-row__summary { background: var(--paper-2); }
.flag-table tbody.flag-row + tbody.flag-row { border-top: 1px solid var(--line); }
.flag-table .flag-row__detail td { border-bottom: 0; }
.flag-outcome { font-weight: 700; font-size: 0.85rem; padding: 2px 8px; border-radius: var(--radius-small); background: var(--paper-2); white-space: nowrap; }
.flag-outcome--hit_removed { background: var(--red-soft); }
.health { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.health__check { display: flex; align-items: flex-start; gap: 14px; }
.health__status { flex: none; width: 6.5em; padding: 2px 8px; border-radius: var(--radius-small); background: var(--paper-3); color: var(--ink); font-size: 0.8rem; font-weight: 700; text-align: center; }
.health__status--ok { background: color-mix(in srgb, var(--note-20) 30%, var(--paper-2)); }
.health__status--warning { background: color-mix(in srgb, var(--note-100) 40%, var(--paper-2)); }
.health__status--problem { background: var(--red); color: var(--paper); }
.health__summary, .health__detail, .health__fix { margin: 2px 0 0; font-size: 0.9rem; }
.health__detail code { overflow-wrap: anywhere; }
.health__fix { color: var(--ink-3); }
.health__overall--problem { background: var(--red-soft); }
/* Outlined in red while something's wrong (the same on the overview and the Site health page). */
.health__overall--warning, .health__overall--problem { border: 2px solid var(--red); }
.admin__prefix-result { margin: 12px 0 8px; }

/* Reported members */
.member-report__profile { margin: 16px 0; }
.member-report__heading { margin: 32px 0 12px; font-size: 1.25rem; }
.member-report__reason { margin: 8px 0 0; padding: 10px 14px; border-left: 3px solid var(--red); border-radius: var(--radius-small);
  background: var(--paper-2); color: var(--ink); overflow-wrap: anywhere; }
.member-report__reason-label { display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; }
.member-report__reason-text { white-space: pre-line; }
.member-report__profile dd { overflow-wrap: anywhere; }
.member-report__profile .profile-photo { width: 64px; height: 64px; }
.admin__keep-hits { flex: 1 1 100%; margin-bottom: 4px; }

/* A hit an admin deleted, shown among a note's sightings. */
.timeline__stop--deleted .timeline__card { opacity: 0.75; border-style: dashed; }
.timeline__stop--deleted .timeline__badge { text-decoration: line-through; }

/* A faint line between the last entered/hit/forum visit dates and the activity list. */
.admin__activity-summary { padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--line); }

/* What looked like a bot about a new registration (admin/registrations). */
.signal { display: inline-block; padding: 1px 8px; margin: 1px 0; border: 1px solid var(--line); border-radius: 999px; font-size: 0.8rem; white-space: nowrap; }
.registrations__reviewed { font-size: 0.85rem; }
