/* Selectors are scoped under .demo-bar and the bar/children get explicit resets,
   so host-page global styles (a, a:hover, a:visited, *, etc.) cannot alter it. */
.demo-bar,
.demo-bar * {
  box-sizing: border-box;
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
  line-height: 1.2;
  text-shadow: none;
}
.demo-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  /* Above FAB (55), splash (50), grain (40); below calendar sheet (60) and lightboxes (80/100). */
  z-index: 58;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
.demo-bar.demo-bar--visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
.demo-bar .demo-bar__note { display: block; line-height: 1.15; font-size: 10.5px; color: #7A6A64; }
.demo-bar .demo-bar__note-title { display: block; line-height: 1.15; font-size: 11px; font-weight: 700; color: #3B2F2C; }
.demo-bar .demo-bar__note-sub { display: block; line-height: 1.15; }
.demo-bar .demo-bar__cta-wrap { position: relative; display: inline-flex; border-radius: 999px; }
.demo-bar a.demo-bar__link,
.demo-bar a.demo-bar__link:link,
.demo-bar a.demo-bar__link:visited,
.demo-bar a.demo-bar__link:hover,
.demo-bar a.demo-bar__link:active {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 6px;
  background: none;
  border: 0;
  color: #5a45b0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.demo-bar a.demo-bar__cta,
.demo-bar a.demo-bar__cta:link,
.demo-bar a.demo-bar__cta:visited,
.demo-bar a.demo-bar__cta:hover,
.demo-bar a.demo-bar__cta:active {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  /* WhatsApp-like green; white on it is 4.71:1 (#1FAF55 would be 2.87:1). */
  background: #16853F;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.demo-bar a.demo-bar__cta:hover { background: #136C34; }
.demo-bar .demo-bar__ico { width: 16px; height: 16px; flex: none; }
.demo-bar .demo-bar__spark {
  position: absolute;
  pointer-events: none;
  font-size: 11px;
  color: #f3c64e;
  text-shadow: 0 0 6px rgba(255, 220, 120, 0.9);
  opacity: 0;
  animation: demo-bar-spark 2.8s ease-in-out infinite;
}
.demo-bar .demo-bar__spark--s1 { top: -9px; left: 8px; animation-delay: 0s; }
.demo-bar .demo-bar__spark--s2 { top: -12px; right: 14px; animation-delay: 0.7s; font-size: 9px; }
.demo-bar .demo-bar__spark--s3 { bottom: -9px; right: 2px; animation-delay: 1.4s; }
.demo-bar .demo-bar__spark--s4 { bottom: -10px; left: 30%; animation-delay: 2.1s; font-size: 8px; }
@keyframes demo-bar-spark {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0); }
  20% { opacity: 1; transform: scale(1) rotate(25deg); }
  45% { opacity: 0; transform: scale(0.6) rotate(60deg) translateY(-4px); }
}
.demo-bar a:focus-visible {
  outline: 3px solid #1f1750;
  outline-offset: 2px;
}
.demo-bar .demo-bar__link-short { display: none; }
/* Narrow screens: tighten (short link text, smaller gaps) instead of hiding the note. */
@media (max-width: 480px) {
  .demo-bar { padding-left: 12px; gap: 8px; }
}
@media (max-width: 400px) {
  .demo-bar .demo-bar__link-full { display: none; }
  .demo-bar .demo-bar__link-short { display: inline; }
  .demo-bar a.demo-bar__link, .demo-bar a.demo-bar__link:link, .demo-bar a.demo-bar__link:visited,
  .demo-bar a.demo-bar__link:hover, .demo-bar a.demo-bar__link:active { padding: 0 4px; font-size: 12.5px; }
}
@media (max-width: 360px) {
  .demo-bar { padding-left: 10px; gap: 4px; }
  .demo-bar a.demo-bar__cta, .demo-bar a.demo-bar__cta:link, .demo-bar a.demo-bar__cta:visited,
  .demo-bar a.demo-bar__cta:hover, .demo-bar a.demo-bar__cta:active { padding: 0 12px; gap: 5px; font-size: 12.5px; }
}
/* Smallest phones (320): the note no longer fits next to the link and the CTA. */
@media (max-width: 340px) {
  .demo-bar .demo-bar__note { display: none; }
  .demo-bar { padding-left: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-bar { transition: none; }
  .demo-bar .demo-bar__spark { display: none; animation: none; }
}
