/* Entity.ID demo shell — banner, welcome modal, checklist, modals, toasts, tours.
   Layered on top of css/app.css. */

/* ---------- Demo banner ---------- */
:root { --demo-banner-h: 38px; }

body.has-demo-banner { padding-top: var(--demo-banner-h); }
body.has-demo-banner .sidebar,
body.has-demo-banner .wiz-rail { top: var(--demo-banner-h); height: calc(100vh - var(--demo-banner-h)); }
body.has-demo-banner .topbar { top: var(--demo-banner-h); }

.demo-banner {
  position: fixed; top: 0; left: 0; right: 0; height: var(--demo-banner-h);
  z-index: 300;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  background: #0b0d1a; color: #c9cede;
  font-size: 12.5px;
}
.demo-banner .demo-chip {
  font-size: 10px; font-weight: 800; letter-spacing: .09em;
  color: #fff; background: var(--primary);
  border-radius: 5px; padding: 3px 7px;
}
.demo-banner .demo-msg b { color: #eef0fa; font-weight: 600; }
.demo-banner .demo-reset {
  background: none; border: none; color: #8b90a5; font-size: 12px;
  text-decoration: underline; text-underline-offset: 2px; padding: 2px 4px;
}
.demo-banner .demo-reset:hover { color: #d4d8e8; }
.demo-banner .demo-cta {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; padding: 6px 12px;
  transition: background .12s;
}
.demo-banner .demo-cta:hover { background: var(--primary-strong); }
.demo-banner .demo-cta-lead { color: #8b90a5; font-size: 12px; margin-left: auto; }
.demo-banner .demo-cta-lead + .demo-cta { margin-left: 0; }

/* ---------- Modal framework ---------- */
.eid-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(13, 16, 33, 0.44);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: eidFade .18s ease;
  overflow-y: auto;
}
@keyframes eidFade { from { opacity: 0; } }
.eid-modal {
  background: #fff; border-radius: 14px;
  width: 480px; max-width: 100%;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(10, 13, 30, .28);
  animation: eidRise .22s cubic-bezier(.2, .9, .3, 1);
}
@keyframes eidRise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.eid-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 0; }
.eid-modal-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.eid-modal-sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.eid-modal-x {
  margin-left: auto; border: none; background: #f2f3f8; color: var(--muted);
  width: 28px; height: 28px; border-radius: 8px; font-size: 15px; line-height: 1;
  flex-shrink: 0;
}
.eid-modal-x:hover { background: #e8eaf2; color: var(--text); }
.eid-modal-body { padding: 18px 24px 4px; }
.eid-modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 24px 22px;
}
.eid-modal-foot .note { margin-right: auto; font-size: 12px; color: var(--faint); }

/* confirm summary rows inside modals */
.eid-confirm { border: 1px solid var(--border); border-radius: 10px; padding: 6px 16px; margin-bottom: 6px; }
.eid-confirm .def-row dd { max-width: 60%; }

/* ---------- Welcome modal ---------- */
.eid-welcome { width: 520px; }
.eid-welcome-hero {
  background: linear-gradient(135deg, #101430 0%, #1b2570 60%, #2f45f4 130%);
  border-radius: 14px 14px 0 0;
  padding: 26px 28px 22px; color: #fff;
}
.eid-welcome-hero .demo-chip {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .09em;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  border-radius: 5px; padding: 3px 8px; margin-bottom: 14px;
}
.eid-welcome-hero h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.eid-welcome-hero p { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,.82); }
.eid-try { list-style: none; margin: 4px 0 2px; }
.eid-try li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); align-items: center; }
.eid-try li:last-child { border-bottom: none; }
.eid-try .n {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.eid-try b { font-size: 13.5px; }
.eid-try span.d { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.eid-kbd-hint { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eid-kbd-hint .kbd { background: #f4f5f9; }

/* ---------- Toasts ---------- */
.eid-toasts {
  position: fixed; top: calc(var(--demo-banner-h) + 14px); left: 50%;
  transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.eid-toast {
  display: flex; align-items: center; gap: 11px;
  background: #10142b; color: #fff;
  border-radius: 11px; padding: 11px 16px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 34px rgba(10, 13, 30, .3);
  animation: eidToastIn .25s cubic-bezier(.2, .9, .3, 1);
  min-width: 260px;
}
.eid-toast.leaving { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
@keyframes eidToastIn { from { opacity: 0; transform: translateY(-10px); } }
.eid-toast .tick {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); display: flex; align-items: center; justify-content: center;
}
.eid-toast .tick svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; }
.eid-toast .sub { display: block; font-size: 12px; font-weight: 400; color: #a9aec4; margin-top: 1px; }

/* ---------- Explore checklist ---------- */
.eid-explore {
  position: fixed; right: 20px; bottom: 20px; z-index: 350;
  width: 288px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 44px rgba(16, 20, 43, .16);
  overflow: hidden;
  font-size: 13px;
}
.eid-explore-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  cursor: pointer; user-select: none;
  background: #fff; border: none; width: 100%; text-align: left;
}
.eid-explore-head b { font-size: 13.5px; }
.eid-explore-count {
  font-size: 11.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: 2px 9px;
}
.eid-explore-caret { margin-left: auto; color: var(--faint); transition: transform .2s; font-size: 11px; }
.eid-explore.collapsed .eid-explore-caret { transform: rotate(180deg); }
.eid-explore-bar { height: 3px; background: #edeff5; }
.eid-explore-bar > span { display: block; height: 100%; background: var(--primary); transition: width .5s cubic-bezier(.2, .7, .3, 1); }
.eid-explore-list { list-style: none; padding: 6px 8px 10px; }
.eid-explore.collapsed .eid-explore-list,
.eid-explore.collapsed .eid-explore-done { display: none; }
.eid-explore-list li {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 9px; border-radius: 8px; cursor: pointer;
  color: var(--text-2); font-weight: 500;
}
.eid-explore-list li:hover { background: #f5f6fa; }
.eid-explore-list .ck {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  border: 1.6px solid #ccd1de;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.eid-explore-list .ck svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3.2; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.eid-explore-list li.done .ck { background: var(--green); border-color: var(--green); }
.eid-explore-list li.done .ck svg { opacity: 1; transform: scale(1); }
.eid-explore-list li.done { color: var(--faint); }
.eid-explore-list li.just-done { animation: eidRowGlow 1.1s ease; }
@keyframes eidRowGlow { 30% { background: var(--green-soft); } }
.eid-explore-done { padding: 4px 16px 14px; }
.eid-explore-done .btn { width: 100%; justify-content: center; }

/* ---------- New-row highlight ---------- */
tr.eid-row-new > td, .eid-row-new { animation: eidNewRow 2.2s ease; }
@keyframes eidNewRow { 0% { background: #eef1ff; } 60% { background: #eef1ff; } 100% { background: transparent; } }

/* ---------- Public record specimen ---------- */
.eid-record { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.eid-record-head {
  background: #0b0d1a; color: #fff; padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
}
.eid-record-head .seal {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
.eid-record-head .t { font-size: 11px; letter-spacing: .12em; font-weight: 700; color: #9aa2c0; }
.eid-record-head .a { font-family: var(--mono); font-size: 13.5px; margin-top: 3px; }
.eid-record-body { padding: 8px 20px 14px; }
.eid-record-marks { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px dashed var(--border); }
.eid-record-mark {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--green-text);
  background: var(--green-soft); border-radius: 999px; padding: 4px 11px;
}
.eid-record-mark svg { width: 12px; height: 12px; stroke: var(--green-text); stroke-width: 2.6; }
.eid-record-verify { font-size: 12px; color: var(--faint); text-align: center; margin-top: 10px; }
.eid-record-verify code { font-family: var(--mono); color: var(--muted); }

/* ---------- Tours ---------- */
.eid-tour-hole {
  position: absolute; z-index: 420;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(13, 16, 33, 0.5), 0 0 0 3px rgba(47, 69, 244, .65);
  pointer-events: none;
  transition: all .3s cubic-bezier(.2, .8, .3, 1);
}
.eid-tour-tip {
  position: absolute; z-index: 430;
  width: 300px;
  background: #fff; border-radius: 12px;
  box-shadow: 0 16px 48px rgba(10, 13, 30, .3);
  padding: 16px 18px 14px;
  animation: eidRise .22s cubic-bezier(.2, .9, .3, 1);
}
.eid-tour-tip .step { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .05em; margin-bottom: 6px; }
.eid-tour-tip h4 { font-size: 14.5px; font-weight: 700; }
.eid-tour-tip p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-top: 5px; }
.eid-tour-tip .row { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.eid-tour-tip .skip { background: none; border: none; color: var(--muted); font-size: 12.5px; padding: 4px 2px; }
.eid-tour-tip .skip:hover { color: var(--text); }
.eid-tour-tip .row .btn { margin-left: auto; }
.eid-tour-blocker { position: fixed; inset: 0; z-index: 410; }

/* "?" tour pill */
.tb-tour {
  border: 1px solid var(--border); border-radius: 10px;
  width: 34px; height: 34px;
  background: var(--bg); color: var(--text-2);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tb-tour:hover { border-color: #cfd4e4; background: #fafbfe; color: var(--primary); }

/* keyboard quick-nav hint chip */
.eid-gkey {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 500;
  background: #10142b; color: #cfd3e6;
  border-radius: 10px; padding: 9px 14px; font-size: 12.5px;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 10px 34px rgba(10, 13, 30, .3);
}
.eid-gkey .kbd { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }

/* footer demo note */
.demo-foot {
  margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border-soft);
  font-size: 12px; color: var(--faint); text-align: center;
}

/* keep the checklist clear of the wizard's sticky footer */
body.eid-wizard .eid-explore { bottom: 96px; }

/* ---------- small screens ---------- */
.eid-mobile-note { display: none; }
@media (max-width: 1023px) {
  .eid-mobile-note {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 360;
    background: #10142b; color: #cfd3e6;
    font-size: 12.5px; padding: 10px 16px; text-align: center;
  }
  .eid-explore { display: none; }
}
