/* Barra e modal exibidos em todos os sites-modelo.
   Cada modelo deve posicionar seu cabeçalho fixo em top: var(--demo-bar-h). */
:root { --demo-bar-h: 44px; }
@media (max-width: 639px) { :root { --demo-bar-h: 40px; } }

body { padding-top: var(--demo-bar-h); }

.demo-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9990;
  height: var(--demo-bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 max(12px, env(safe-area-inset-left)) 0 max(12px, env(safe-area-inset-right));
  background: #080B2A;
  color: #F5F3EE;
  font: 500 13px/1.2 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0;
  box-shadow: 0 1px 0 rgba(245, 243, 238, .08);
}
.demo-bar * { box-sizing: border-box; }
.demo-bar a { color: inherit; text-decoration: none; }
.demo-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 4px;
  opacity: .88;
  white-space: nowrap;
}
.demo-bar__back:hover { opacity: 1; }
.demo-bar__back svg { width: 16px; height: 16px; flex: none; }
.demo-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(245, 243, 238, .78);
}
.demo-bar__label b { color: #F5F3EE; font-weight: 700; }
.demo-bar__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #B3A3FF; }
.demo-bar__cta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: #6C4CF5;
  color: #fff !important;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .2s;
}
.demo-bar__cta:hover { background: #5B3BE8; }
.demo-bar a:focus-visible,
.demo-modal button:focus-visible,
.demo-modal a:focus-visible { outline: 3px solid #8DBBFF; outline-offset: 2px; border-radius: 6px; }

@media (max-width: 639px) {
  .demo-bar { font-size: 12px; gap: 8px; }
  .demo-bar__label .long { display: none; }
  .demo-bar__back span { display: none; }
  .demo-bar__cta { padding: 0 11px; font-size: 11px; }
}
@media (max-width: 359px) {
  .demo-bar__label { display: none; }
}

/* Modal */
.demo-modal[hidden] { display: none; }
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 9995;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 29, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: demoFade .25s ease;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.demo-modal__box {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px 24px 24px;
  border-radius: 22px;
  background: #F5F3EE;
  color: #171821;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
  animation: demoPop .3s cubic-bezier(.2, .7, .2, 1);
  text-align: left;
  letter-spacing: 0;
}
.demo-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 24, 33, .06);
  color: #171821;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.demo-modal__tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ECE7FF;
  color: #5536E0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.demo-modal h2 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.02em;
  font-family: inherit;
  color: #171821;
}
.demo-modal p { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: #4A4B5C; }
.demo-modal__preview {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  border: 1px solid rgba(23, 24, 33, .08);
  font-size: 14px;
  line-height: 1.5;
  color: #171821;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}
.demo-modal__preview small {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1B8A45;
}
.demo-modal__actions { display: grid; gap: 10px; }
.demo-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #6C4CF5;
  color: #fff !important;
  font: 700 13px/1.2 inherit;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.demo-modal__btn:hover { background: #5B3BE8; }
.demo-modal__btn--ghost { background: transparent; color: #171821 !important; box-shadow: inset 0 0 0 1px rgba(23, 24, 33, .18); }
.demo-modal__btn--ghost:hover { background: rgba(23, 24, 33, .05); }

@keyframes demoFade { from { opacity: 0; } }
@keyframes demoPop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .demo-modal, .demo-modal__box { animation: none; }
}
