/* Ambient: sign-up panel styles. Two forms: the QR code on a computer,
   and on a phone, when Messages does not open, the copy box (number and
   message to copy). See main.js.
   Same structure as the "Signup modal (EkaSignupFlow)" block in
   ekaplace/public/styles.css, restyled in the page's visual language:
   only #000000, #FFFFFF, #202020 and #00FF00, DejaVu Sans Mono Bold, 1px #202020
   frames, square corners, outlined terminal buttons with no brackets. */
.modal-backdrop {
  --m-bg: #000000;
  --m-fg: #FFFFFF;
  --m-grid: #202020;
  --m-live: #00FF00;
  --m-mono: "DejaVu Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-backdrop.is-open { display: flex; }
.modal-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 460px;
  margin: auto;
  padding: 28px;
  border: 1px solid var(--m-grid);
  background: var(--m-bg);
  color: var(--m-fg);
  font-family: var(--m-mono);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-backdrop *, .modal-backdrop *::before, .modal-backdrop *::after { box-sizing: border-box; font-family: inherit; }
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  border: 0;
  padding: 4px 6px;
  background: transparent;
  color: var(--m-fg);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover, .modal-close:focus-visible { color: var(--m-live); }
.modal-close:focus-visible { outline: 1px solid var(--m-fg); outline-offset: 2px; }
.modal-form { display: flex; flex-direction: column; gap: 18px; }
.modal-h2 { margin: 0; padding-right: 36px; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--m-fg); }
.modal-cursor { font-weight: 700; animation: modal-blink 1.1s steps(1, end) infinite; }
@keyframes modal-blink { 50% { opacity: 0; } }
.modal-outline {
  border: 1px solid var(--m-fg);
  border-radius: 0;
  background: transparent;
  color: var(--m-fg);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.modal-outline:hover, .modal-outline:focus-visible { border-color: var(--m-live); color: var(--m-live); }
.modal-copy-box { border: 1px solid var(--m-grid); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-copy-label { font-size: 11px; font-weight: 700; color: var(--m-fg); }
.modal-copy-value { font-size: 14px; font-weight: 700; }
.modal-copy-divider { height: 1px; background: var(--m-grid); }
.modal-copy-msg-wrap { display: flex; flex-direction: column; gap: 8px; }
.modal-copy-msg { border: 1px solid var(--m-grid); padding: 12px; font-size: 12px; line-height: 1.6; color: var(--m-live); overflow-wrap: anywhere; }
/* The computer form: the panel fits its content; the heading, the QR code
   and the line share one left edge. main.js sizes the QR code near
   --qr-size so each module is whole screen pixels. */
.modal-card.is-qr { width: auto; }
.modal-qr { --qr-size: 200px; position: relative; align-self: flex-start; line-height: 0; }
.modal-qr .qr { display: block; background: #FFFFFF; }
.modal-qr-line { margin: 0; align-self: flex-start; max-width: 100%; font-size: 12px; line-height: 1.6; color: var(--m-fg); }
.modal-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }
@media (max-width: 480px) {
  .modal-card { padding: 22px 18px; }
  .modal-h2 { font-size: 18px; }
  .modal-qr { --qr-size: 176px; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-cursor { animation: none; }
}
