/* The demo layer: everything a visitor to a real operator would never see. Kept in its own
 * stylesheet so the storefront reads as a storefront, and so the census can tell the two apart.
 */

/* Confirmation card, rendered in the same second the visitor acted, because the
 * Dengage App Inbox fills only from a campaign or a journey and no transactional send can
 * answer the moment. */
.dps-confirm {
  position: fixed; right: 20px; bottom: 20px; z-index: 900; max-width: 340px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-left: 4px solid var(--red); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-lift); display: grid; gap: 4px;
  transform: translateY(14px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.dps-confirm.in { transform: none; opacity: 1; }
.dps-confirm strong { font-size: 15px; }
.dps-confirm span { font-size: 13.5px; color: var(--muted); }

/* The recognition band. Ordinary visitors never see it; a visitor the site has seen twice on
 * one product sees it above everything else. */
.recog {
  display: flex; gap: 26px; align-items: center; background: var(--pink);
  border: 1px solid var(--pink-deep); border-radius: var(--radius-lg); padding: 22px 26px;
}
.recog img { border-radius: var(--radius); background: var(--surface); flex: none; width: 160px; height: 160px; }
.recog-copy { display: grid; gap: 8px; }
.recog-actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.price-big { font-size: 24px; font-weight: 800; }
.why { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.rule {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
  background: var(--surface); color: var(--red-deep); padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--pink-deep);
}
.reco-item { display: grid; gap: 8px; }

/* The ?debug=1 readout. It calls the SDK for nothing and listens only. */
#dps-debug {
  position: fixed; left: 12px; bottom: 12px; z-index: 950; width: 430px; max-width: calc(100vw - 24px);
  max-height: 52vh; overflow: auto; background: #0C0D10; color: #DFE2E8; border-radius: 12px;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; box-shadow: 0 18px 44px rgba(0,0,0,.45);
}
#dps-debug header {
  position: sticky; top: 0; display: flex; gap: 8px; align-items: center; padding: 9px 12px;
  background: #14161B; border-bottom: 1px solid #23262D;
}
#dps-debug header strong { flex: 1; font-size: 12px; letter-spacing: .04em; }
#dps-debug header button {
  background: #23262D; border: 0; color: #C9CDD6; border-radius: 6px; padding: 3px 9px; cursor: pointer;
}
#dps-debug.folded ol,
#dps-debug.folded .dps-sdk { display: none; }
/* The SDK parameters, pinned above the event log for reconciliation. Labels dim, values bright and
   monospace so a token or a device id reads and copies cleanly. */
.dps-sdk { margin: 0; padding: 6px; display: grid; gap: 3px; border-bottom: 1px solid #2A2F38; }
.dps-sdk > div { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: baseline;
  padding: 3px 3px; }
.dps-sdk dt { color: #98A0AE; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.dps-sdk dd { margin: 0; color: #F2F4F8; font: 500 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all; user-select: all; }
.dps-sdk dd i { color: #6B7280; font-style: normal; }
#dps-debug ol { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; }
#dps-debug li { padding: 7px 9px; border-radius: 7px; background: #14161B; border-left: 3px solid #3A3F49; }
#dps-debug li b { display: block; color: #F2F4F8; font-weight: 600; }
#dps-debug li span { color: #98A0AE; word-break: break-all; }
#dps-debug li.sent { border-left-color: #4B9BFF; }
#dps-debug li.net { border-left-color: #7C5CFF; }
#dps-debug li.focus { border-left-color: #FFC24B; }
#dps-debug li.moment { border-left-color: #37C98B; }
#dps-debug li.bad { border-left-color: #FF4B5C; }

@media (max-width: 760px) {
  .recog { flex-direction: column; align-items: flex-start; }
  .recog img { width: 120px; height: 120px; }
  #dps-debug { width: calc(100vw - 24px); max-height: 40vh; }
}

/* The message drawer. Dengage's inbox and the demo's own message centre in one list, with only
   Dengage's reported back, because Dengage never issued the others. */
#dps-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw; z-index: 940;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lift);
  transform: translateX(102%); transition: transform .22s ease; display: flex; flex-direction: column;
}
#dps-drawer.open { transform: none; }
#dps-drawer header {
  display: flex; gap: 10px; align-items: center; padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
#dps-drawer header strong { flex: 1; font-size: 16px; }
#dps-drawer ul { list-style: none; margin: 0; padding: 10px; overflow: auto; display: grid; gap: 8px; }
#dps-drawer .empty { padding: 26px 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
#dps-drawer .msg {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
#dps-drawer .msg.unread { border-left: 3px solid var(--red); }
#dps-drawer .msg .thumb { width: 56px; }
#dps-drawer .msg .thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
#dps-drawer .msg .body { display: grid; gap: 3px; font-size: 13.5px; }
#dps-drawer .msg .body strong { font-size: 14.5px; }
