/* eggs-w3e.css — W3-E easter-egg FRAMEWORK + Egg Basket styling (2026-07-06).
 *
 * Vanilla, self-contained styles for the framework in eggs-w3e.js:
 *   - #w3eOverlayRoot        framework-owned fixed overlay root (eggs mount here)
 *   - .w3e-egg-indicator     the small fixed 🥚 basket indicator button
 *   - .w3e-basket            the retro "Egg Basket" panel (mounted into overlay)
 *   - .w3e-cert__*           the "Certified Meme Archaeologist" certificate block
 *   - .w3e-toast             toast (styles also inlined in JS as a fallback)
 *
 * LOADING: this stylesheet is linked by index.html alongside eggs-w3e.js. It is
 * OPTIONAL — every egg-critical style is ALSO inlined in JS (see toast()/overlay
 * root) so the framework degrades gracefully if the CSS 404s. Sibling egg files
 * ship their own eggs-w3e-<id>.css if they need styling; they must NOT rely on
 * classes defined here except the shared surface tokens documented below.
 *
 * Everything is namespaced under `w3e` / a dedicated id so it can never collide
 * with the canon Netscape chrome, eggs-w3b, alive, or dashboard-easter-eggs.
 * z-indexes sit above the frame but BELOW eggs-w3b's top overlays.
 */

/* ---------- overlay root ----------------------------------------------- */
#w3eOverlayRoot {
  position: fixed;
  inset: 0;
  z-index: 2147483300;
  pointer-events: none; /* the root never blocks the page; children opt in */
}
/* Any direct child that is interactive re-enables pointer events on itself. */
#w3eOverlayRoot > * { pointer-events: auto; }

/* ---------- 🥚 basket indicator ---------------------------------------- */
.w3e-egg-indicator {
  position: fixed;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 7px;
  font-family: "MS Sans Serif", "Tahoma", "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #001a3d;
  background: #d9e6ff;
  border: 2px outset #ffffff;
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 1.2, 0.5, 1);
  z-index: 2147483310;
}
.w3e-egg-indicator--embedded {
  position: static;
  flex: 0 0 auto;
  opacity: 0.82;
  transform: none;
  margin-left: 2px;
  z-index: auto;
}
.w3e-egg-indicator--visible { opacity: 0.72; transform: translateY(0); }
.w3e-egg-indicator--embedded.w3e-egg-indicator--visible {
  opacity: 0.82;
  transform: none;
}
.w3e-egg-indicator:hover { opacity: 1; }
.w3e-egg-indicator:active { border-style: inset; }
.w3e-egg-indicator__egg { font-size: 15px; line-height: 1; }
.w3e-egg-indicator__count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---------- Egg Basket panel ------------------------------------------- */
.w3e-basket {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.98);
  width: 360px;
  max-width: calc(100vw - 28px);
  max-height: min(80vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "MS Sans Serif", "Tahoma", "Segoe UI", system-ui, sans-serif;
  color: #000;
  background: #c0c7d0;
  border: 2px outset #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45), 0 0 0 1px #4a5568;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 1.2, 0.5, 1);
  z-index: 2147483320;
}
.w3e-basket--in { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.w3e-basket__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 4px 8px;
  color: #fff;
  background: linear-gradient(90deg, #000080, #1084d0);
  font-weight: bold;
  font-size: 13px;
}
.w3e-basket__close {
  width: 18px;
  height: 18px;
  line-height: 14px;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  color: #000;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  cursor: pointer;
}
.w3e-basket__close:active { border-style: inset; }

.w3e-basket__meter {
  padding: 8px 10px 6px;
  font-size: 13px;
  font-weight: bold;
  color: #001a3d;
  text-align: center;
  background: #e6ecf5;
  border-bottom: 1px solid #8a94a6;
}

.w3e-basket__list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  overflow-y: auto;
  background: #ffffff;
  border: 2px inset #ffffff;
  margin: 8px;
  flex: 1 1 auto;
}
.w3e-basket__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 4px;
  font-size: 12.5px;
  line-height: 1.35;
  border-bottom: 1px dotted #d4d9e2;
}
.w3e-basket__row:last-child { border-bottom: none; }
.w3e-basket__mark { flex: 0 0 auto; width: 16px; text-align: center; }
.w3e-basket__label { flex: 1 1 auto; }
.w3e-basket__row--found .w3e-basket__label {
  color: #0a5c2e;
  font-weight: bold;
}
.w3e-basket__row:not(.w3e-basket__row--found) .w3e-basket__label {
  color: #4a5568;
  font-style: italic;
}
.w3e-basket__row--mobile .w3e-basket__label { opacity: 0.6; }

.w3e-basket__foot {
  padding: 6px 10px 8px;
  font-size: 11px;
  color: #33415c;
  text-align: center;
  background: #e6ecf5;
  border-top: 1px solid #8a94a6;
}

/* ---------- certificate block ------------------------------------------ */
.w3e-basket__cert:empty { display: none; }
.w3e-basket__cert {
  margin: 0 8px 8px;
  padding: 10px;
  background: #fffef2;
  border: 2px inset #ffffff;
  text-align: center;
}
.w3e-cert__banner {
  font-size: 13px;
  font-weight: bold;
  color: #7a5c00;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.w3e-cert__loading { font-size: 12px; color: #33415c; }
.w3e-cert__img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 8px;
  border: 3px double #b8860b;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}
.w3e-cert__text {
  font-size: 12px;
  line-height: 1.5;
  color: #3a2f00;
  padding: 6px 4px;
}
.w3e-cert__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.w3e-cert__download,
.w3e-cert__share {
  display: inline-block;
  padding: 5px 12px;
  font: inherit;
  font-weight: bold;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  color: #fff;
  background: #000080;
  border: 2px outset #6a6aff;
}
.w3e-cert__download:active,
.w3e-cert__share:active { border-style: inset; }

/* ---------- shared toast (styles ALSO inlined in JS as a fallback) ------ */
.w3e-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2147483501;
  background: #000;
  color: #0f0;
  border: 2px solid #0f0;
  padding: 8px 16px;
  font-family: monospace;
  font-size: 14px;
  box-shadow: 0 0 12px #0f0;
  pointer-events: none;
}

/* ---------- reduced motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .w3e-egg-indicator,
  .w3e-basket { transition: opacity 0.2s ease; transform: none; }
  .w3e-egg-indicator--visible { transform: none; }
  .w3e-basket--in { transform: translate(-50%, -50%); }
}
body.motion-off .w3e-egg-indicator,
body.motion-off .w3e-basket { transition: none; }

/* ---------- mobile ----------------------------------------------------- */
@media (max-width: 480px) {
  .w3e-basket { width: calc(100vw - 20px); }
  .w3e-egg-indicator { left: 10px; bottom: 10px; }
}
