/* Shared plumbing only: reset, RTL defaults, a11y helpers, demo bar.
   No fonts, colours or layout that would make demos look alike. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; overflow-x: clip; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:target { scroll-margin-top: 5rem; }
[id] { scroll-margin-top: 5rem; }

/* Phone numbers and prices stay left-to-right inside RTL text */
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Accessibility helpers */
.sr-only {
  position: absolute !important; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; inset-block-start: .75rem; inset-inline-start: .75rem; z-index: 1000;
  padding: .6rem 1rem; background: #000; color: #fff; border-radius: .4rem; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--focus-ring, currentColor); outline-offset: 3px; }

html.is-dialog-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Floating WhatsApp button: position only (look is per demo) ---------- */
.wa-float {
  position: fixed; z-index: 60;
  inset-inline-end: 1rem;
  inset-block-end: calc(1rem + env(safe-area-inset-bottom, 0px) + var(--demo-bar-offset, 0px));
  transition: inset-block-end .25s ease;
}

/* ---------- Demo bar (§7) — deliberately neutral so it reads as "outside" the demo ---------- */
.demo-bar {
  position: fixed; z-index: 70;
  inset-inline: 0; inset-block-end: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
  padding: .6rem 2.75rem calc(.6rem + env(safe-area-inset-bottom, 0px)) 1rem;
  padding-inline: 1rem 2.75rem;
  background: rgba(17, 17, 17, .94); color: #f5f5f5;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-size: .875rem; line-height: 1.35;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
  backdrop-filter: blur(6px);
}
.demo-bar__text { margin: 0; flex: 1 1 14rem; }
.demo-bar__cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-block-size: 2.5rem;
  padding: .45rem .9rem; border-radius: 999px;
  background: #25d366; color: #0b2e17; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.demo-bar__cta:hover { background: #3be07a; }
.demo-bar__close {
  position: absolute; inset-block-start: .35rem; inset-inline-end: .35rem;
  inline-size: 2.25rem; block-size: 2.25rem; border: 0; border-radius: 50%;
  background: transparent; color: #f5f5f5; font-size: 1.4rem; line-height: 1;
}
.demo-bar__close:hover { background: rgba(255, 255, 255, .12); }
.demo-bar :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Mobile: make room for the bar at the bottom; lift the floating button above it */
@media (max-width: 767.98px) {
  html.has-demo-bar { --demo-bar-offset: var(--demo-bar-h, 0px); }
  html.has-demo-bar body { padding-block-end: var(--demo-bar-h, 0px); }
}

/* Desktop: a compact one-row card in the bottom inline-start corner (right in RTL); the WhatsApp button sits on the other side */
@media (min-width: 768px) {
  .demo-bar {
    inset-inline: 1.25rem auto; inset-block-end: 1.25rem;
    flex-wrap: nowrap; max-inline-size: min(36rem, calc(100vw - 7rem));
    padding: .5rem .5rem .5rem .9rem; padding-inline: 1rem 2.6rem;
    border-radius: 999px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); font-size: .84rem;
  }
  .demo-bar__text { flex: 1 1 auto; }
  .demo-bar__close { inset-block-start: 50%; translate: 0 -50%; inset-inline-end: .3rem; }
}
