/* ============================================================
   BARRA DE DEMONSTRAÇÃO — One Analytic
   Fica por cima da landing page de demonstração e não faz parte
   dela. Tudo com prefixo oa-demo- para não colidir com o CSS
   da página.
   ============================================================ */

:root { --oa-demo-h: 52px; }

html.oa-demo-on { scroll-padding-top: calc(var(--oa-demo-h) + 80px); }
body.oa-demo-on { padding-top: var(--oa-demo-h); }

.oa-demo-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2147483000;
  height: var(--oa-demo-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: #0D0D0D;
  color: #fff;
  font: 500 13px/1.2 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.oa-demo-bar * { box-sizing: border-box; }

.oa-demo-tag {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #E8001D;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oa-demo-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.oa-demo-title strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.oa-demo-title span { color: rgba(255, 255, 255, 0.55); }

.oa-demo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.oa-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.oa-demo-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }
.oa-demo-btn:focus-visible { outline: 2px solid #E8001D; outline-offset: 2px; }
.oa-demo-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.oa-demo-btn.primary { background: #E8001D; border-color: #E8001D; }
.oa-demo-btn.primary:hover { background: #C0001A; border-color: #C0001A; }

.oa-demo-btn[aria-pressed="false"] { color: rgba(255, 255, 255, 0.55); }

/* ── Painel "O que está incluso" ── */
.oa-demo-panel {
  position: fixed;
  top: calc(var(--oa-demo-h) + 10px);
  right: 20px;
  z-index: 2147483001;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - var(--oa-demo-h) - 30px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 16px;
  background: #141414;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  font: 400 14px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.oa-demo-panel[hidden] { display: none; }

.oa-demo-panel h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.oa-demo-panel .oa-demo-price {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.oa-demo-panel .oa-demo-price b { color: #fff; font-size: 18px; }

.oa-demo-list { list-style: none; margin: 0; padding: 0; }

.oa-demo-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.oa-demo-list li::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: #E8001D url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.oa-demo-list li small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.oa-demo-panel .oa-demo-note {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.oa-demo-panel .oa-demo-note a { color: #ff4d5a; }

.oa-demo-panel .oa-demo-h3 {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* Lista de páginas do site */
.oa-demo-pages { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.oa-demo-pages a {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}
.oa-demo-pages a:hover { background: rgba(255, 255, 255, 0.06); }
.oa-demo-pages a[aria-current="page"] { background: rgba(232, 0, 29, 0.16); }
.oa-demo-pages a span { grid-row: span 2; color: #ff4d5a; font-weight: 800; font-size: 12px; padding-top: 2px; }
.oa-demo-pages a small { color: rgba(255, 255, 255, 0.45); font-weight: 400; font-size: 12px; }

/* Entregáveis extras (ex.: relatório de auditoria) */
.oa-demo-extras { display: grid; gap: 8px; }
.oa-demo-extras a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.oa-demo-extras a:hover { border-color: #E8001D; }
.oa-demo-extras a small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.5); font-weight: 400; font-size: 12px; }

/* ── Analytics ao vivo ── */
.oa-demo-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 700;
}
.oa-demo-btn.pulse .oa-demo-count { animation: oa-pulse 0.6s ease; }
@keyframes oa-pulse { 0% { background: #22C55E; transform: scale(1.25); } 100% { background: rgba(255, 255, 255, 0.14); transform: none; } }

.oa-demo-ga { width: min(420px, calc(100vw - 24px)); }
.oa-demo-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.oa-demo-events li {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
}
.oa-demo-events li.conv { border-left-color: #22C55E; background: rgba(34, 197, 94, 0.08); }
.oa-demo-events li.empty { border-left-color: transparent; color: rgba(255, 255, 255, 0.45); }
.oa-demo-events li > div:first-child { display: flex; align-items: center; gap: 8px; }
.oa-demo-events b { font: 600 13px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; color: #fff; }
.oa-demo-events em { padding: 2px 7px; border-radius: 999px; background: #22C55E; color: #052e16; font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.oa-demo-events time { margin-left: auto; color: rgba(255, 255, 255, 0.4); font-size: 11px; }
.oa-demo-events .params { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.oa-demo-events code { padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, 0.35); color: rgba(255, 255, 255, 0.7); font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.oa-demo-ga-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

/* ── Etiqueta de cada seção ── */
.oa-demo-section-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.82);
  color: #fff;
  font: 600 11px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.oa-demo-section-label b { color: #ff4d5a; font-weight: 800; }

html.oa-demo-labels-off .oa-demo-section-label { display: none; }

/* ── Aviso rápido (toast) ── */
.oa-demo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2147483002;
  max-width: min(460px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 12px;
  background: #0D0D0D;
  color: #fff;
  font: 500 14px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.oa-demo-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Mobile ── */
@media (max-width: 860px) {
  .oa-demo-title span { display: none; }
}

@media (max-width: 640px) {
  :root { --oa-demo-h: 48px; }
  .oa-demo-bar { gap: 8px; padding: 0 10px; }
  .oa-demo-title { display: none; }
  .oa-demo-btn { height: 32px; padding: 0 10px; font-size: 12px; }
  .oa-demo-btn .oa-demo-long { display: none; }
  .oa-demo-panel { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .oa-demo-toast { transition: none; }
}
