/* PrintR add-on module "openapp": "On a phone? Open PrintR in your wallet app first", at the top of /launch and of each
 * coin page, on phones only (openapp.js decides). PrintR style: the site's own tokens when they exist (Geist, white
 * cards on #efeff1, ink #111114), magenta #c41c70 (#ff4fa3 in dark); no gradient, no glow, no status dot, no outlined
 * pill. At 390 px wide it stays under 120 px tall: the title and its line flow in one paragraph. */
.pw-open {
  --po-card: var(--bg-1, #fff);
  --po-text: var(--text, #111114);
  --po-text-2: var(--text-2, #45454d);
  --po-fill: var(--fill-2, rgba(17, 17, 20, 0.09));
  --po-fill-on: var(--fill-3, rgba(17, 17, 20, 0.13));
  --po-ink: #c41c70;
  --po-ok: var(--ok, #0e6f40);
  --po-shadow: var(--shadow, 0 1px 2px rgba(17, 17, 20, 0.05), 0 1px 1px rgba(17, 17, 20, 0.03));
  --po-font: var(--font-ui, "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
  --po-ring: rgba(196, 28, 112, 0.55);
}
html[data-theme="dark"] .pw-open {
  --po-card: var(--bg-1, #18181c);
  --po-text: var(--text, #f2f2f5);
  --po-text-2: var(--text-2, #b4b4be);
  --po-fill: var(--fill-2, rgba(245, 245, 247, 0.1));
  --po-fill-on: var(--fill-3, rgba(245, 245, 247, 0.15));
  --po-ink: #ff4fa3;
  --po-ok: var(--ok, #4ad685);
  --po-shadow: var(--shadow, 0 0 0 1px rgba(245, 245, 247, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4));
  --po-ring: rgba(255, 79, 163, 0.6);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .pw-open {
    --po-card: var(--bg-1, #18181c);
    --po-text: var(--text, #f2f2f5);
    --po-text-2: var(--text-2, #b4b4be);
    --po-fill: var(--fill-2, rgba(245, 245, 247, 0.1));
    --po-fill-on: var(--fill-3, rgba(245, 245, 247, 0.15));
    --po-ink: #ff4fa3;
    --po-ok: var(--ok, #4ad685);
    --po-shadow: var(--shadow, 0 0 0 1px rgba(245, 245, 247, 0.05), 0 1px 2px rgba(0, 0, 0, 0.4));
    --po-ring: rgba(255, 79, 163, 0.6);
  }
}

.pw-open {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 14px;
  padding: 9px 10px 10px 13px;
  border-radius: 14px;
  border-left: 3px solid var(--po-ink);
  background: var(--po-card);
  box-shadow: var(--po-shadow);
  color: var(--po-text);
  font: 400 13px/17px var(--po-font);
  letter-spacing: -0.003em;
  text-align: left;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.pw-open *,
.pw-open *::before,
.pw-open *::after {
  box-sizing: border-box;
}
/* the coin page: the card sits between the coin's top bar and its price card */
.pw-open[data-route="coin"] {
  margin: 4px 0 12px;
}
.pw-open-x {
  float: right;
  width: 32px;
  height: 32px;
  margin: -6px -8px 0 6px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--po-text-2);
  font: 400 22px/32px var(--po-font);
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pw-open-x:hover {
  background: var(--po-fill);
  color: var(--po-text);
}
.pw-open-txt {
  margin: 0;
  padding: 0;
  color: var(--po-text-2);
  font: inherit;
  overflow-wrap: break-word;
}
.pw-open-t {
  color: var(--po-text);
  font-weight: 650;
}
.pw-open.is-copied .pw-open-s {
  color: var(--po-ok);
  font-weight: 600;
}
/* four columns sized to their words first, then the room left shared out: "Backpack" (the longest) stays whole at
 * 360 and 375 px (iPhone SE, mini), where four equal columns cut it to "Backpa..." */
.pw-open-row {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 6px;
  margin-top: 8px;
  clear: both;
}
.pw-open-b {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  font: 600 13px/1 var(--po-font);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.pw-open-b.is-wallet,
.pw-open-b.is-wallet:visited {
  background: var(--po-text);
  color: var(--po-card);
}
.pw-open-b.is-wallet:hover {
  opacity: 0.88;
}
.pw-open-b.is-copy {
  background: var(--po-fill);
  color: var(--po-text);
}
.pw-open-b.is-copy:hover {
  background: var(--po-fill-on);
}
.pw-open-b:active {
  transform: translateY(1px);
}
.pw-open-x:focus-visible,
.pw-open-b:focus-visible,
.pw-open-field:focus-visible {
  outline: 2px solid var(--po-ring);
  outline-offset: 2px;
}
/* copying failed: the address, selected, to copy by hand */
.pw-open-field {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--po-fill);
  color: var(--po-text);
  font: 400 16px/34px var(--po-font);
}
/* the old way of copying needs a field in the page: out of sight */
.pw-open-ta {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  pointer-events: none;
}
/* very narrow phones: two buttons a row */
@media (max-width: 359px) {
  .pw-open-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .pw-open-b:active {
    transform: none;
  }
}
@media print {
  .pw-open {
    display: none !important;
  }
}
