/* The Zombie hub in "Your Zombies" (used to be the My Zombies tool): wallet lookup, status dots, filter, card sizes,
   Certificate buttons, certificate window and collage maker. On top of ed.css and style.css. */
.lookup{ display:flex; gap:10px; flex-wrap:wrap; margin:0 0 6px; max-width:720px; }
.lookup input{ flex:1 1 320px; min-width:0; font:13px var(--font-ui); padding:11px 14px; background:var(--panel); color:var(--text); border:1px solid var(--border); }
.lookup input:focus{ outline:none; border-color:var(--accent); }
#lookupNote{ margin:0 0 18px; min-height:1em; }

/* Certificate button on each card (a span inside the card button) */
.zcert{ display:block; margin-top:10px; padding:7px 6px; text-align:center; font:700 11px var(--font-ui); letter-spacing:.5px; color:var(--text);
  background:var(--accent-dim); border:1px solid var(--accent); cursor:pointer; }
.zcert:hover, .zcert:focus-visible{ background:var(--accent); color:#0e0c14; outline:none; }
#yoursBody.size-small .zcert{ margin-top:6px; padding:4px; font-size:10px; }
/* cards that can't be picked for the lab (already onchain, or someone else's wallet) */
.ztile.locked{ cursor:default; }
.ztile.locked:hover{ border-color:var(--border); }
.ztile[data-kind="onchain"]{ opacity:1; }
#yoursBody.size-small .ztile.sel::after, #yoursBody.size-small .ztile.pick::after, #yoursBody.size-small .ztile.fresh::after{ font-size:8px; padding:2px 4px; top:4px; left:4px; }

/* View size switch above the grid */
.mz-view{ max-width:1100px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:0 0 14px; }
.mz-view-gap{ flex:1; }
.mz-view .seg button b{ margin-left:4px; color:var(--text); font-weight:700; }
.mz-view .seg .zdot{ position:static; display:inline-block; vertical-align:-1px; margin-right:6px; width:9px; height:9px; box-shadow:none; }
#yoursBody.only-on .ztile[data-chain="off"], #yoursBody.only-off .ztile[data-chain="on"]{ display:none; }

/* onchain status dot on every card, in every view: green fully onchain, red not yet */
.zdot{ position:absolute; top:8px; right:8px; z-index:2; width:14px; height:14px; border-radius:50% !important; /* the site squares every corner; these stay round */ border:2px solid #0e0c14; }
.zdot.on{ background:#3ddc84; box-shadow:0 0 0 2px rgba(61,220,132,.35), 0 0 10px rgba(61,220,132,.6); }
.zdot.off{ background:#ff4d5e; box-shadow:0 0 0 2px rgba(255,77,94,.3); }
#yoursBody.size-small .zdot{ top:5px; right:5px; width:11px; height:11px; }
.ztile .ztag.off{ color:#ff7a86; }
.ztile .ztag.off a{ color:var(--accent); }
#yoursBody.size-medium{ grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:12px; }
#yoursBody.size-medium .zname{ font-size:12px; }
#yoursBody.size-medium .ztag{ font-size:9px; letter-spacing:.5px; }
#yoursBody.size-small{ grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:8px; }
#yoursBody.size-small .zbody{ padding:6px 7px 7px; }
#yoursBody.size-small .zname{ font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#yoursBody.size-small .ztag{ display:none; }
#yoursBody.size-small .zcert-row{ margin-top:6px; }
#yoursBody.size-small .zcert-row .btn{ padding:4px 4px; font-size:10px; }
.zcert-row{ display:flex; gap:6px; margin-top:10px; }
.zcert-row .btn{ flex:1; padding:7px 6px; font-size:11px; }

/* "Certificates and collages" call to action above the grid */
.mz-cta{ max-width:1100px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin:0 0 18px; padding:16px 18px; }
.mz-cta > div > b{ display:block; font-size:15px; margin-bottom:4px; }
.mz-cta .small{ display:block; }

/* Collage maker: a page of its own over the dashboard (which is hidden meanwhile) */
body.maker-open main.content, body.maker-open .sitenav{ display:none; }
.maker{ position:fixed; inset:0; z-index:150; background:var(--void); overflow:auto; padding:22px clamp(16px, 3vw, 40px) 40px; }
.maker-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.maker-head h2{ margin:4px 0 0; }
.maker-body{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.7fr); gap:20px; align-items:start; }
.maker-pick, .maker-out{ padding:16px; }
.maker-out{ position:sticky; top:0; }
.maker-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.maker-row b{ margin-right:auto; }
.pick-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(64px, 1fr)); gap:6px; max-height:calc(100vh - 260px); overflow:auto; padding:2px; }
.pk{ position:relative; padding:0; border:2px solid transparent; background:var(--panel2); cursor:pointer; aspect-ratio:1; }
.pk img{ width:100%; height:100%; display:block; image-rendering:pixelated; }
.pk:hover{ border-color:var(--border); }
.pk.on{ border-color:var(--accent); }
.pk:not(.on) img{ opacity:.55; }
.pk-n{ position:absolute; top:2px; right:2px; min-width:18px; height:18px; padding:0 4px; display:flex; align-items:center; justify-content:center;
  background:var(--accent); color:#0e0c14; font:700 10px var(--font-ui); }
.pk-gif, .pk-key{ font:700 8px var(--font-ui); letter-spacing:.5px; padding:2px 3px; background:#ff2ea0; color:#fff; }
.pk-gif{ position:absolute; left:2px; bottom:2px; }
.seg{ display:inline-flex; border:1px solid var(--border); }
.seg button{ font:12px var(--font-ui); padding:8px 12px; background:var(--panel); color:var(--muted); border:none; cursor:pointer; }
.seg button + button{ border-left:1px solid var(--border); }
.seg button.on{ background:var(--accent-dim); color:var(--text); }
.maker-canvas{ background:#0e0c14; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; min-height:220px; }
.maker-canvas canvas{ width:100%; height:auto; max-height:calc(100vh - 280px); object-fit:contain; display:block; image-rendering:pixelated; }
.maker-empty{ color:var(--muted); font:12px var(--font-ui); padding:30px; text-align:center; }
.gif-progress{ position:relative; height:22px; margin-top:12px; background:var(--panel2); border:1px solid var(--border); }
.gif-progress i{ position:absolute; inset:0 auto 0 0; width:0; background:#ff2ea0; opacity:.55; }
.gif-progress span{ position:relative; display:block; text-align:center; font:11px/22px var(--font-ui); }


.modal{ position:fixed; inset:0; z-index:200; background:rgba(5,5,10,.78); display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box{ position:relative; background:var(--panel); border:1px solid var(--border); box-shadow:6px 6px 0 var(--px-shadow); padding:18px;
  max-height:calc(100vh - 40px); overflow:auto; width:min(560px, 100%); }
.modal-box canvas{ width:100%; height:auto; display:block; image-rendering:pixelated; }
.modal-x{ position:absolute; top:6px; right:8px; background:none; border:none; color:var(--muted); font-size:18px; cursor:pointer; z-index:1; }
.modal-x:hover{ color:var(--text); }
body.modal-open{ overflow:hidden; }

@media (max-width:900px){
  #yoursBody.size-medium{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
  #yoursBody.size-small{ grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; }
  #yoursBody.size-medium .ztag{ display:none; }
  .maker-body{ grid-template-columns:1fr; }
  .maker-out{ position:static; order:-1; }
  .pick-grid{ grid-template-columns:repeat(5, minmax(0, 1fr)); max-height:none; }
  .modal{ padding:10px; }
  .modal-box{ padding:12px; }
}

/* while a GIF is being made: the picker's thumbnails are taken off the page (dozens of moving SVGs cost phones memory) */
#collageMaker.gif-busy #pickGrid{ display:none; }
.pick-paused{ display:none; font-size:13px; color:var(--muted); padding:18px 4px; }
#collageMaker.gif-busy .pick-paused{ display:block; }
