/* ==============================================================================================
   report.css — site-wide reactive reporting: ONE stylesheet for the shared report flow (the flag
   trigger, the modal, and the post-report confirmation strip).

   ONE FILE, LOADED BY EVERY HOST PAGE, rather than the same rules copied into posts.css and
   social.css. The report flow is a single component that happens to appear on several pages, and
   duplicating it into each page stylesheet is how two copies of a component drift apart. It also
   keeps this pass out of messages.css, which is actively being iterated by the direct-messaging
   work — the DM report keeps its own .dm-modal rules untouched.

   DESIGN LAW, per the locked system:
     · --bb-* tokens ONLY. Not one hardcoded colour in this file.
     · Hard 2px borders and hard OFFSET shadows. Zero blur, zero glass, no backdrop-filter, no
       rgba() hover overlays.
     · --bb-radius (2px) corners. Nothing rounded.
     · Buttons come from the shared .bb-btn family and are never restyled here; hover is
       filter: brightness() only, inherited from components.css.
     · 44px minimum touch targets throughout (WCAG 2.5.5).
     · Mobile-first: the modal is sized in vw with a desktop cap, so it needs no breakpoint to fit
       a 375px screen.
   ============================================================================================== */

/* ── the trigger: a small, quiet flag ─────────────────────────────────────────────────────────
   Deliberately understated. Reporting must be findable without reading as an invitation — a loud
   "REPORT" beside every doll and comment sets the wrong tone on a feed of teenagers' creative
   work. So: no border, no fill, a muted glyph that comes forward on hover and focus. */

.rp-trigger { display: inline-flex; }

.rp-trigger__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44px of TARGET around an 18px glyph — the icon is small, the hit area is not. */
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--bb-radius);
  color: var(--bb-berry);
  /* Quiet, but still findable. 0.55 was tried first and rendered as a smudge a member would not read as a
     control at all — "unobtrusive" has to stop short of "invisible", or the safety feature is decorative. */
  opacity: 0.75;
  cursor: pointer;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.rp-trigger__btn:hover,
.rp-trigger__btn:focus-visible {
  opacity: 1;
  color: var(--bb-frame);
}

.rp-trigger__btn:focus-visible {
  outline: 2px solid var(--bb-gold);
  outline-offset: 2px;
}

.rp-trigger__icon {
  inline-size: 18px;
  block-size: 18px;
  flex-shrink: 0;
}

/* On a warm-white surface (a comment row, a guestbook entry) the flag reads better in berry; on the
   mulberry post panel it needs the light treatment instead. */
.rp-trigger--on-dark .rp-trigger__btn { color: var(--bb-warmwhite); }
.rp-trigger--on-dark .rp-trigger__btn:hover,
.rp-trigger--on-dark .rp-trigger__btn:focus-visible { color: var(--bb-gold); }

/* ── the modal (overlays tier — z 500, matching the site's layer convention) ─────────────────── */

.rp-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);   /* so the dialog never touches the edge of a small screen */
}

.rp-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: var(--bb-black);
  opacity: 0.55;              /* a flat scrim — no blur, no rgba literal */
}

.rp-modal__dialog {
  position: relative;
  z-index: 1;
  inline-size: min(92vw, 420px);
  max-block-size: 90dvh;
  overflow-y: auto;           /* a long support line on a short phone scrolls the dialog, not the page */
  padding: var(--space-lg);
  background-color: var(--bb-warmwhite);
  border: 2px solid var(--bb-black);
  border-radius: var(--bb-radius);
  box-shadow: 4px 4px 0 0 var(--bb-black);   /* hard offset — never blur */
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.rp-modal__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--bb-frame);
}

.rp-modal__text {
  color: var(--bb-frame);
  font-size: var(--fs-sm);
  margin-block-end: var(--space-sm);
}

.rp-modal__label {
  color: var(--bb-frame);
  font-family: var(--font-condensed);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Field surfaces match the DM composer's exactly — warm-white fill, hard border, --bb-radius. */
.rp-modal__select,
.rp-modal__textarea {
  inline-size: 100%;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--bb-warmwhite);
  color: var(--bb-frame);
  border: 2px solid var(--bb-black);
  border-radius: var(--bb-radius);
  font-size: var(--fs-md);
  line-height: 1.5;
  min-block-size: 44px;
}

.rp-modal__textarea {
  max-block-size: 140px;
  resize: vertical;
}

.rp-modal__select:focus-visible,
.rp-modal__textarea:focus-visible {
  outline: 2px solid var(--bb-gold);
  outline-offset: 2px;
}

.rp-modal__counter {
  color: var(--bb-berry);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  text-align: end;
}

/* The wellbeing note. The dialog is warm-white, so the note goes light-pink with a gold edge to
   stand apart without shouting. */
.rp-modal__support {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--bb-dimpink);
  border: 2px solid var(--bb-gold);
  border-radius: var(--bb-radius);
  color: var(--bb-frame);
  font-size: var(--fs-sm);
}

.rp-modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-md);
  margin-block-start: var(--space-sm);
}

/* Cancel is a plain text action, never an outline-only button — matching the DM modal's own cancel. */
.rp-modal__cancel {
  min-block-size: 44px;
  padding-inline: var(--space-sm);
  background: none;
  border: 0;
  color: var(--bb-berry);
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: var(--fs-md);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: underline;
  cursor: pointer;
}

.rp-modal__cancel:hover { color: var(--bb-frame); }

.rp-modal__cancel:focus-visible {
  outline: 2px solid var(--bb-gold);
  outline-offset: 2px;
}

/* ── the post-report confirmation strip ──────────────────────────────────────────────────────── */

.rp-feedback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-block-end: var(--space-md);
  border: 2px solid var(--bb-black);
  border-radius: var(--bb-radius);
  font-size: var(--fs-sm);
}

/* Success reads as calm and warm; a refusal borrows the site's own live semantic danger token rather
   than inventing a second red. */
.rp-feedback--ok {
  background-color: var(--bb-warmwhite);
  color: var(--bb-frame);
}

.rp-feedback--error {
  background-color: var(--bb-warmwhite);
  border-color: var(--color-danger);
  color: var(--bb-frame);
}

.rp-feedback__star { color: var(--bb-gold); }

.rp-feedback__text { font-weight: 700; }

/* The support line wraps onto its own row on a narrow screen — flex-wrap on the parent does it, so
   this needs no breakpoint. */
.rp-feedback__support {
  flex-basis: 100%;
  color: var(--bb-berry);
  font-size: var(--fs-sm);
}

/* The help link inside the wellbeing copy is styled in header.css, not here: the same copy renders on
   the notifications page, which does not load this stylesheet, and two definitions of one link would
   drift the moment either was touched. */
