/* Public demo chrome for Mamas Gift — slim, unobtrusive, fast. */
:root { --mg-demo-h: 44px; }
html { scroll-padding-top: calc(var(--mg-demo-h) + 20px); }
body { padding-top: var(--mg-demo-h); }

.mg-demo-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 3000;
  height: var(--mg-demo-h); display: flex; align-items: center;
  gap: 10px; padding: 0 14px; color: #fff;
  background: linear-gradient(90deg, #2b1830, #3d2039);
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 4px 18px rgba(20,10,24,.24);
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, sans-serif;
  letter-spacing: .01em;
}
.mg-demo-bar .mg-tag {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  color: #f4d79a; font-size: 9px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; white-space: nowrap;
}
.mg-demo-bar .mg-tag::before {
  width: 6px; height: 6px; border-radius: 50%; background: #7bd8a4;
  box-shadow: 0 0 0 3px rgba(123,216,164,.16); content: "";
}
.mg-demo-bar .mg-links { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.mg-demo-bar a, .mg-demo-bar button, .mg-demo-bar summary {
  color: #f6e9ef; text-decoration: none; cursor: pointer;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  padding: 7px 12px; background: rgba(255,255,255,.06);
  font: 700 11px/1 system-ui, -apple-system, Segoe UI, sans-serif;
  transition: background .18s, border-color .18s;
}
.mg-demo-bar a:hover, .mg-demo-bar button:hover, .mg-demo-bar summary:hover {
  background: rgba(255,255,255,.14); border-color: rgba(244,215,154,.55);
}
.mg-demo-bar a[aria-current="page"] {
  background: rgba(244,215,154,.16); border-color: rgba(244,215,154,.5); color: #ffe6b6;
}
.mg-demo-bar .mg-spacer { flex: 1 1 auto; }
.mg-demo-bar .mg-reset { border-color: rgba(244,215,154,.42); color: #ffe6b6; }
.mg-demo-bar .mg-reset:disabled { opacity: .65; cursor: wait; }

.mg-accounts { position: relative; flex: 0 0 auto; }
.mg-accounts summary { list-style: none; }
.mg-accounts summary::-webkit-details-marker { display: none; }
.mg-accounts summary::after { content: " ▾"; font-size: 9px; opacity: .75; }
.mg-accounts[open] summary::after { content: " ▴"; }
.mg-accounts-panel {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 3100;
  width: min(360px, calc(100vw - 24px)); padding: 14px;
  border: 1px solid rgba(244,215,154,.28); border-radius: 12px;
  background: #2b1830; color: #fff; box-shadow: 0 18px 44px rgba(15,8,18,.42);
  font: 12px/1.55 system-ui, -apple-system, Segoe UI, sans-serif;
}
.mg-accounts-panel h4 { margin: 0 0 4px; font-size: 13px; color: #ffe6b6; }
.mg-accounts-panel p { margin: 0 0 10px; color: rgba(255,255,255,.62); font-size: 11px; }
.mg-role { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.mg-role b { display: block; font-size: 11px; color: #f4d79a; }
.mg-role code { color: #fff; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.mg-role button {
  border: 1px solid rgba(244,215,154,.42); border-radius: 7px; padding: 5px 10px;
  background: rgba(244,215,154,.1); color: #ffe6b6; font-weight: 700; font-size: 10px;
}
.mg-role button:hover { background: rgba(244,215,154,.22); }

/* Shift the app's own fixed/sticky chrome below the demo bar. */
.nav { top: var(--mg-demo-h) !important; }
.nav.scrolled { padding-top: 10px; }
#progress { top: var(--mg-demo-h) !important; }
.sidebar { top: var(--mg-demo-h) !important; }
.topbar { top: var(--mg-demo-h) !important; }
.login-wrap { padding-top: calc(24px + var(--mg-demo-h)) !important; }
.back-top, .toast { bottom: calc(24px + env(safe-area-inset-bottom,0px)); }

@media (max-width: 720px) {
  .mg-demo-bar { gap: 6px; padding: 0 9px; }
  .mg-demo-bar .mg-tag { font-size: 8px; letter-spacing: .08em; }
  .mg-demo-bar a, .mg-demo-bar button, .mg-demo-bar summary { padding: 6px 9px; font-size: 10px; }
  .mg-demo-bar .mg-links { margin-left: 0; gap: 4px; }
  .mg-accounts-panel { right: -6px; }
}
