/* Bilah aksi demo tema (/preview) — gaya platform Undanganku (tinta + emas, Cinzel).
   Disuntik InvitationRenderer::buildDemoBar; hanya di jendela utama. Lihat demo-bar.js. */
.inv-demobar {
  --db-bg: rgba(20, 17, 13, .94);
  --db-ink: #efe9dd;
  --db-dim: rgba(239, 233, 221, .62);
  --db-line: rgba(200, 169, 106, .38);
  --db-accent: #c8a96a;
  --db-on-accent: #14110d;
  --db-hover: rgba(200, 169, 106, .14);
  position: fixed;
  z-index: 2147482100;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100vw - 20px);
  padding: 5px;
  border: 1px solid var(--db-line);
  border-radius: 3px;
  background: var(--db-bg);
  color: var(--db-ink);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  font: 400 13px/1.2 'Inv Demo Jost', 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -160%);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .35s ease, left .35s ease;
}
.inv-demobar[data-mode="light"] {
  --db-bg: rgba(251, 248, 241, .96);
  --db-ink: #2b2118;
  --db-dim: rgba(43, 33, 24, .66);
  --db-line: rgba(168, 127, 46, .34);
  --db-accent: #a87f2e;
  --db-on-accent: #fff;
  --db-hover: rgba(168, 127, 46, .12);
  box-shadow: 0 18px 40px -20px rgba(80, 55, 20, .45);
}
.inv-demobar[hidden] { display: none; }
.inv-demobar.show { transform: translate(-50%, 0); opacity: 1; }
.inv-demobar * { box-sizing: border-box; }
.inv-db-tool {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--db-ink);
  cursor: pointer;
  font: 500 10px/1 'Inv Demo Cinzel', 'Cinzel', Georgia, serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.inv-db-tool:hover, .inv-db-tool[aria-pressed="true"] { background: var(--db-hover); color: var(--db-accent); }
.inv-db-tool[hidden] { display: none; }
.inv-db-tool svg { width: 18px; height: 18px; flex: none; }
.inv-db-name {
  flex: none;
  max-width: 180px;
  padding: 0 8px 0 10px;
  border-left: 1px solid var(--db-line);
  color: var(--db-dim);
  font: italic 400 15px/1.1 'Inv Demo Cormorant', 'Cormorant Garamond', Georgia, serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inv-db-name b { display: block; margin-bottom: 2px; color: var(--db-accent); font: 500 9px/1 'Inv Demo Cinzel', 'Cinzel', Georgia, serif; font-style: normal; letter-spacing: .2em; text-transform: uppercase; }
.inv-demobar a.inv-db-cta {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--db-accent);
  border-radius: 2px;
  background: var(--db-accent);
  color: var(--db-on-accent);
  font: 500 11px/1 'Inv Demo Cinzel', 'Cinzel', Georgia, serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease;
}
.inv-demobar a.inv-db-cta:hover { background: transparent; color: var(--db-accent); }
.inv-db-cta svg { width: 16px; height: 16px; flex: none; }
.inv-db-short { display: none; }
.inv-demobar a:focus-visible, .inv-demobar button:focus-visible { outline: 2px solid var(--db-accent); outline-offset: 2px; }
/* Panel tweaks tema terbuka → bilah ringkas di kiri (sampul, tampilan, tutup) agar tak menutupi panel. */
.inv-demobar.tw-open { left: max(10px, env(safe-area-inset-left)); }
.inv-demobar.tw-open.show { transform: none; }
.inv-demobar.tw-open a.inv-db-cta, .inv-demobar.tw-open .inv-db-name, .inv-demobar.tw-open .inv-db-label { display: none; }
/* Selama mengatur tampilan, panel tweaks tema berada di atas sampul (di bawah bilah). */
html.inv-demo-tweaking #tweaks-panel { z-index: 2147482050 !important; }
@media (max-width: 760px) {
  .inv-db-name, .inv-db-label { display: none; }
  .inv-db-tool { padding: 0; }
}
@media (max-width: 480px) {
  .inv-demobar { left: 10px; right: 10px; max-width: none; transform: translateY(-160%); }
  .inv-demobar.show { transform: none; }
  .inv-demobar.tw-open { right: auto; }
  .inv-db-long { display: none; }
  .inv-db-short { display: inline; }
  .inv-demobar a.inv-db-cta { padding: 0 12px; letter-spacing: .14em; }
}
@media (prefers-reduced-motion: reduce) { .inv-demobar { transition: opacity .2s linear; } }
@media print { .inv-demobar { display: none !important; } }
