/* Agora v2 — copy.css: copying the text of a message. The "Copier" button
   of a code block (discreet on desktop, visible without hover on a phone),
   "Copier le texte" under the emojis of the long press palette, the "Texte
   copié" notice at the bottom of the screen, and the off-screen textarea of
   the execCommand fallback. Loaded after agora.css. */

.code-block { position: relative; }
.code-block > pre { padding-right: 76px; }
.copy-b { position: absolute; top: 6px; right: 6px; z-index: 1;
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--panel); color: var(--muted); font: 500 12px var(--sans); cursor: pointer;
  opacity: .55; transition: opacity .12s; }
.code-block:hover > .copy-b, .copy-b:focus-visible, .copy-b.ok, .copy-b.refus { opacity: 1; }
.copy-b:hover { color: var(--text); border-color: var(--edging); }
.copy-b.ok { color: var(--live); border-color: var(--live); }
.copy-b.refus { color: var(--bad); border-color: var(--bad); }
/* By finger: no hover, the button is visible and can be touched. */
@media (hover: none) {
  .copy-b { opacity: 1; padding: 7px 12px; font-size: 13px; top: 4px; right: 4px; }
  .code-block > pre { padding-right: 92px; }
}

/* In the phone palette, under the emojis. */
.rx-palette.tel button.rx-copy { width: auto; height: 44px; font: 500 15px var(--sans); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }

/* The notice, at the bottom of the screen (above the palette's veil). */
.copy-notice { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 9px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text); font: 500 14px var(--sans);
  box-shadow: 0 10px 28px rgba(var(--shadow-rgb),.45); pointer-events: none; }
.copy-notice.refus { color: var(--bad); border-color: var(--bad); }

.copy-fold { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
