/* ============================================================================
   Result gating - shared, site-wide. Pairs with js/mew-gate.js.

   Anonymous visitors can generate, read and regenerate. What they cannot do is
   take the result away without an account: Copy is refused and the result text
   cannot be selected.

   Worth being plain about what this is: friction, not protection. The text is
   in the DOM and anyone who opens devtools can still lift it. The point is that
   the ordinary route out of the page - select, or press Copy - asks for an
   account first.
   ========================================================================== */

/* Applied by the script to each tool's result panel while nobody is signed in.
   Never applied to a panel that contains a form control, so a visitor can
   always select and edit what they typed in. */
.mew-locked,
.mew-locked * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Links inside a locked panel are navigation, not the result - a "Verify this
   source" link has to stay usable. */
.mew-locked a {
  cursor: pointer;
}

/* The panel is not editable while locked either: a contenteditable you cannot
   put a caret in is a broken control, so the script takes the attribute off and
   this keeps the cursor honest about it. */
.mew-locked[contenteditable="false"] {
  cursor: default;
}

/* Lock pip on a gated Copy button. Positioned by the script, which also gives
   the button a positioning context if it has none. */
.mew-gate-lock {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 13px;
  height: 13px;
  background: #F59E0B;
  border-radius: 50%;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
}
.mew-gate-lock svg { width: 7px; height: 7px; display: block; }
