/* ============================================================
   demo-panel.css
   --------------------------------------------------------------
   Visuals for the lightweight demo customization mode:

     • #demo-customize-fab   — floating "Customize Demo" button
                                (bottom-right, premium pill)
     • #demo-customize-panel — slide-out drawer (right edge)

   Style direction: dark, premium, minimal, modern automotive.
   No SaaS / dashboard / form-builder vibe. Subtle accent glow,
   thin hairlines, generous spacing, tabular numerics, calm
   motion. The active accent reads through var(--accent) so a
   theme switch in the panel re-skins the panel itself.

   Z-index policy
     fab     : 9990
     panel   : 9998
     backdrop: inert; no visual dimming or interaction blocking

   Mobile
     - drawer goes near-full-width with a hairline of bg behind it
     - fab moves slightly inward and shrinks
     - vertical scroll is on the panel body only
   ============================================================ */

:root {
  --demo-panel-width: min(390px, calc(100vw - 34px));
}

/* ------ Floating button ------------------------------------- */

#demo-customize-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9990;

  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 11px 18px 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;

  /* Dark glassy chip with a faint accent edge underneath. */
  background:
    linear-gradient(180deg, rgba(28, 29, 33, 0.94) 0%, rgba(14, 15, 18, 0.94) 100%);
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(var(--accent-rgb), 0.18) inset,
    0 14px 38px -22px rgba(var(--accent-rgb), 0.55);

  color: #f1f1f3;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition:
    transform .22s cubic-bezier(.2,.8,.2,1),
    box-shadow .22s cubic-bezier(.2,.8,.2,1),
    border-color .22s cubic-bezier(.2,.8,.2,1);
}

#demo-customize-fab:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow:
    0 14px 36px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(var(--accent-rgb), 0.32) inset,
    0 22px 48px -18px rgba(var(--accent-rgb), 0.6);
}

#demo-customize-fab:focus-visible {
  outline: none;
  box-shadow:
    0 14px 36px -12px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(var(--accent-rgb), 0.7),
    0 22px 48px -18px rgba(var(--accent-rgb), 0.6);
}

#demo-customize-fab .demo-fab-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), 0.18),
    0 0 10px rgba(var(--accent-rgb), 0.7);
  flex-shrink: 0;
}

#demo-customize-fab .demo-fab-label {
  white-space: nowrap;
}

/* When the panel is open, fade the fab out so it doesn't compete. */
#demo-customize-fab.is-hidden {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
}

@media (max-width: 640px) {
  #demo-customize-fab {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px 10px 12px;
    font-size: 11.5px;
  }
}

/* ------ Backdrop -------------------------------------------- */

#demo-customize-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s cubic-bezier(.2,.8,.2,1);
}

#demo-customize-backdrop.is-open {
  opacity: 0;
  pointer-events: none;
}

/* ------ Drawer ---------------------------------------------- */

#demo-customize-panel {
  position: fixed;
  top: 0;
  left: 0;          /* anchored to LEFT edge */
  bottom: 0;
  z-index: 9998;

  width: var(--demo-panel-width);
  max-width: 100vw;

  /* Dark premium surface with a single hairline. The faint
     accent line on the trailing edge replaces a chunky border. */
  background:
    linear-gradient(180deg, #0e0f12 0%, #0a0b0d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    24px 0 60px -28px rgba(0, 0, 0, 0.7),
    inset -1px 0 0 rgba(var(--accent-rgb), 0.10);

  color: #ececef;
  font-family: var(--font-ui, system-ui, sans-serif);

  display: flex;
  flex-direction: column;

  /* Closed state: slide entirely off the left edge. */
  transform: translateX(calc(-1 * var(--demo-panel-width)));
  transition: transform .32s cubic-bezier(.2,.8,.2,1);

  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

#demo-customize-panel.is-open {
  transform: translateX(0);
}

/* "Retracted" state - the panel slides off-screen entirely when
   collapsed. The user pulls it back via the floating toggle button. */
#demo-customize-panel.is-collapsed {
  transform: translateX(calc(-1 * var(--demo-panel-width)));
}

/* When collapsed, dim the inner content (defensive in case the
   panel becomes briefly visible during the slide animation). */
#demo-customize-panel.is-collapsed > * {
  opacity: 0.6;
  transition: opacity .25s;
}

/* =====================================================================
   FLOATING TOGGLE TAB
   ---------------------------------------------------------------------
   The slide toggle is a STANDALONE button appended to <body>, NOT
   nested inside the panel. This keeps it unaffected by the panel's
   transform - the toggle's position never moves when the panel slides
   in or out.
   ===================================================================== */
.demo-panel-toggle {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 10000;                    /* above the panel and toolbar */
  display: none;                      /* hidden by default; .is-visible shows it */
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 70px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background:
    linear-gradient(180deg, rgba(24, 25, 29, 0.98), rgba(9, 10, 12, 0.98)),
    rgba(14, 14, 16, 0.98);
  color: #f5f5f7;
  cursor: pointer;
  box-shadow:
    8px 0 28px -12px rgba(0, 0, 0, 0.72),
    inset -1px 0 0 rgba(var(--accent-rgb, 225 29 72), 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    left .32s cubic-bezier(.2,.8,.2,1),
    background .2s,
    border-color .2s,
    transform .18s,
    box-shadow .2s;
  font-family: var(--font-ui, system-ui, sans-serif);
}
.demo-panel-toggle.is-visible {
  display: inline-flex;
}
/* Expanded state: panel is showing, toggle sits just past the panel
   edge. */
.demo-panel-toggle.is-visible:not(.is-collapsed) {
  left: var(--demo-panel-width);
}
/* Collapsed state: panel is off-screen, toggle is glued to the left
   edge of the viewport so the user can pull the panel back. */
.demo-panel-toggle.is-visible.is-collapsed {
  left: 0;
}
.demo-panel-toggle:hover {
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb, 225 29 72), 0.24), rgba(12, 13, 16, 0.98)),
    rgba(14, 14, 16, 0.98);
  border-color: rgba(var(--accent-rgb, 225 29 72), 0.7);
  box-shadow:
    8px 0 28px -8px rgba(0, 0, 0, 0.7),
    inset -1px 0 0 rgba(var(--accent-rgb, 225 29 72), 0.6);
}
.demo-panel-toggle:active {
  transform: translateY(-50%) scale(0.97);
}
.demo-panel-toggle:focus-visible {
  outline: none;
  box-shadow:
    8px 0 28px -8px rgba(0, 0, 0, 0.7),
    0 0 0 3px rgba(var(--accent-rgb, 225 29 72), 0.55);
}
.demo-panel-toggle .demo-panel-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.demo-panel-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
/* When EXPANDED, chevron points LEFT (click to collapse). When
   COLLAPSED, chevron points RIGHT (click to expand). Default SVG is
   a right-pointing chevron, so we flip it when NOT collapsed. */
.demo-panel-toggle:not(.is-collapsed) svg {
  transform: rotate(180deg);
}

/* Subtle attention-pulse on the toggle when first shown so users
   notice it. Disabled when collapsed (less visually noisy). */
@keyframes demo-panel-toggle-pulse {
  0%, 100% { box-shadow: 8px 0 28px -12px rgba(0, 0, 0, 0.72), inset -1px 0 0 rgba(var(--accent-rgb, 225 29 72), 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  50%      { box-shadow: 8px 0 28px -12px rgba(0, 0, 0, 0.72), inset -1px 0 0 rgba(var(--accent-rgb, 225 29 72), 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 6px rgba(var(--accent-rgb, 225 29 72), 0.12); }
}
.demo-panel-toggle.is-visible.is-collapsed {
  animation: demo-panel-toggle-pulse 2.6s ease-in-out 2;   /* runs twice then stops */
}
@media (prefers-reduced-motion: reduce) {
  .demo-panel-toggle { animation: none !important; }
}

/* Subtle accent aura behind the panel header */
#demo-customize-panel::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -80px;
  width: 320px;
  height: 320px;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.18) 0%, transparent 60%);
  filter: blur(10px);
  opacity: 0.9;
}

/* ------ Header ---------------------------------------------- */

.demo-panel-header {
  position: relative;
  flex-shrink: 0;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 8px;
}

.demo-panel-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
}

.demo-panel-title {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: #fafafa;
  margin: 0;
}

.demo-panel-subtitle {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

.demo-panel-close {
  position: absolute;
  top: 18px;
  right: 16px;

  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color .18s var(--ease, ease), background .18s var(--ease, ease), border-color .18s var(--ease, ease);
}

.demo-panel-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.demo-panel-close:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.35);
}

.demo-panel-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ------ Body (scrollable) ----------------------------------- */

.demo-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 22px;

  /* Custom scrollbar to keep things clean. */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.demo-panel-body::-webkit-scrollbar { width: 8px; }
.demo-panel-body::-webkit-scrollbar-track { background: transparent; }
.demo-panel-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
}
.demo-panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ------ Sections -------------------------------------------- */

.demo-section {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.demo-section:first-child { padding-top: 4px; }
.demo-section:last-child  { border-bottom: 0; padding-bottom: 4px; }

.demo-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.demo-section-label::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.demo-section-manager-note {
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.11), rgba(255, 255, 255, 0.025)),
    rgba(7, 7, 9, 0.92);
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  line-height: 1.45;
}

/* ============================================================
   Search bar
   ------------------------------------------------------------
   Sticky-ish at the top of the panel body. Filters group +
   sub-block visibility based on substring match against
   data-search-text on the elements.
   ============================================================ */
.demo-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 12px;
  padding: 0 12px 0 36px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), box-shadow .18s var(--ease, ease);
}

.demo-search:focus-within {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.demo-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.demo-search-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: #f5f5f7;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Hide the native clear button on Edge/WebKit so our own clear
   button is the only one shown. */
.demo-search-input::-webkit-search-decoration,
.demo-search-input::-webkit-search-cancel-button,
.demo-search-input::-webkit-search-results-button,
.demo-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.demo-search-input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.demo-search-clear {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color .18s var(--ease, ease), background .18s var(--ease, ease);
}

.demo-search-clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.demo-search-clear svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ============================================================
   Group accordion (top level, 11 of these)
   ------------------------------------------------------------
   More prominent than sub-block accordions: stronger border,
   richer hover, larger title row, accent-tinted index. The
   group head is the entire button; clicking anywhere on it
   toggles open/closed.
   ============================================================ */
.demo-group {
  margin: 0 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(8, 8, 10, 0.92);
  overflow: hidden;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), opacity .18s var(--ease, ease);
}

.demo-group.is-open {
  border-color: rgba(var(--accent-rgb), 0.32);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.014)),
    rgba(8, 8, 10, 0.94);
  box-shadow:
    0 14px 36px -22px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(var(--accent-rgb), 0.12);
}

.demo-group-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease, ease);
}

.demo-group-title:hover {
  background: rgba(255, 255, 255, 0.04);
}

.demo-group-title:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), 0.35);
}

.demo-group-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.13);
  color: #fff;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.demo-group.is-open .demo-group-index {
  border-color: rgba(var(--accent-rgb), 0.7);
  background: rgba(var(--accent-rgb), 0.22);
}

.demo-group-label-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.demo-group-label {
  font-family: "Bebas Neue", system-ui, sans-serif;
  color: #fff;
  font-size: 17px;
  letter-spacing: 0.04em;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-group-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.demo-group.is-open .demo-group-desc {
  -webkit-line-clamp: unset;
}

.demo-group-chevron {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
  transition: transform .22s var(--ease, ease), color .22s var(--ease, ease);
}

.demo-group-chevron svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-group.is-open .demo-group-chevron {
  color: rgba(var(--accent-rgb), 0.95);
  transform: rotate(180deg);
}

.demo-group-content {
  padding: 4px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-group-content[hidden] {
  display: none;
}

/* Each group ends with a "Reset this section" button. Visually
   secondary to the group head + sub-blocks, but clearly available. */
.demo-group-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-group-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color .18s var(--ease, ease), border-color .18s var(--ease, ease), background .18s var(--ease, ease);
}

.demo-group-reset:hover {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.12);
}

.demo-group-reset svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-group-reset:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.65);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.28);
}

/* ============================================================
   Sub-block accordion (inner blocks within a group)
   ------------------------------------------------------------
   Visually quieter than .demo-group. No accent index, smaller
   typography, less padding. The enable toggle + reorder
   buttons live on the right of the head row.
   ============================================================ */
.demo-subblock {
  margin: 0 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), opacity .18s var(--ease, ease);
}

.demo-subblock.is-open {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.045);
}

.demo-subblock.is-disabled {
  opacity: .58;
}

.demo-subblock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px;
}

.demo-subblock-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease, ease);
}

.demo-subblock-title:hover {
  background: rgba(255, 255, 255, 0.04);
}

.demo-subblock-title:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.28);
}

.demo-subblock-label {
  min-width: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-subblock-chevron {
  display: inline-flex;
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.48);
  transition: transform .2s var(--ease, ease), color .2s var(--ease, ease);
}

.demo-subblock-chevron svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-subblock.is-open .demo-subblock-chevron {
  color: rgba(var(--accent-rgb), 0.95);
  transform: rotate(180deg);
}

.demo-subblock-locked {
  align-self: center;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-subblock-enable {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.demo-subblock-actions {
  gap: 3px;
}

.demo-subblock .demo-block-content {
  padding: 4px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.demo-block-accordion {
  margin: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(8, 8, 10, 0.88);
  overflow: hidden;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), opacity .18s var(--ease, ease);
}

.demo-block-accordion.is-open {
  border-color: rgba(var(--accent-rgb), 0.22);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.055), rgba(255, 255, 255, 0.014)),
    rgba(8, 8, 10, 0.92);
}

.demo-block-accordion.is-disabled {
  opacity: .62;
}

.demo-block-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.demo-block-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease, ease), color .18s var(--ease, ease);
}

.demo-block-title:hover {
  background: rgba(255, 255, 255, 0.045);
}

.demo-block-title:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.32);
}

.demo-block-index {
  color: rgba(var(--accent-rgb), 0.95);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.demo-block-label {
  min-width: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-block-chevron {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.52);
  transition: transform .2s var(--ease, ease), color .2s var(--ease, ease);
}

.demo-block-chevron svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-block-accordion.is-open .demo-block-chevron {
  color: rgba(var(--accent-rgb), 0.95);
  transform: rotate(180deg);
}

.demo-block-enable {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.demo-block-actions {
  gap: 4px;
}

.demo-block-reset {
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s var(--ease, ease), color .18s var(--ease, ease), background .18s var(--ease, ease);
}

.demo-block-reset:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.1);
  color: #fff;
}

.demo-block-locked {
  align-self: center;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-block-content {
  padding: 4px 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.demo-block-content[hidden] {
  display: none;
}

.demo-block-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-grouped-section {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.016);
}

.demo-mini-action {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 9px;
  background: rgba(var(--accent-rgb), 0.095);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s var(--ease, ease), border-color .18s var(--ease, ease), background .18s var(--ease, ease);
}

.demo-mini-action:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.44);
  background: rgba(var(--accent-rgb), 0.14);
}

.demo-block-fields {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.demo-block-fields .demo-section-label,
.demo-block-controls > .demo-section-label {
  margin-bottom: 0;
}

.demo-upload-box {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(9, 9, 11, 0.9);
}

.demo-upload-box.has-upload {
  border-color: rgba(var(--accent-rgb), 0.28);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.018)),
    rgba(9, 9, 11, 0.92);
}

.demo-upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.demo-upload-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.demo-upload-title {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  font-weight: 800;
}

.demo-upload-meta {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  line-height: 1.35;
}

.demo-logo-preview {
  min-height: 70px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.13), transparent 62%),
    rgba(0, 0, 0, 0.24);
}

.demo-logo-preview img {
  max-width: 180px;
  max-height: 58px;
  object-fit: contain;
}

.demo-logo-preview span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.demo-logo-settings {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.demo-range-field .demo-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-range-value {
  color: rgba(var(--accent-rgb), 0.92);
  font-size: 11px;
  font-weight: 900;
}

.demo-range-input {
  width: 100%;
  accent-color: var(--accent);
}

.demo-field-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.62) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.62) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.demo-field-select option,
.demo-compact-select option {
  background: #121216;
  color: #f5f5f7;
}

.demo-custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.demo-custom-select-trigger {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    rgba(10, 10, 12, 0.88);
  color: #f5f5f7;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), box-shadow .18s var(--ease, ease);
}

.demo-custom-select-trigger:hover,
.demo-custom-select.is-open .demo-custom-select-trigger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.024)),
    rgba(12, 12, 15, 0.96);
  border-color: rgba(255, 255, 255, 0.16);
}

.demo-custom-select-trigger:focus-visible,
.demo-custom-select.is-open .demo-custom-select-trigger {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.demo-custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-custom-select-caret {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.55);
  transition: transform .18s var(--ease, ease), color .18s var(--ease, ease);
}

.demo-custom-select-caret svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-custom-select.is-open .demo-custom-select-caret {
  transform: rotate(180deg);
  color: rgba(var(--accent-rgb), 0.95);
}

.demo-custom-select-menu {
  position: absolute;
  z-index: 10080;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(260px, 44vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.02)),
    rgba(12, 12, 15, 0.98);
  box-shadow:
    0 22px 55px -26px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top;
  pointer-events: none;
  transition: opacity .16s var(--ease, ease), transform .16s var(--ease, ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.demo-custom-select.is-open .demo-custom-select-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.demo-custom-select-menu::-webkit-scrollbar { width: 6px; }
.demo-custom-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.demo-custom-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.demo-custom-select-option:hover,
.demo-custom-select-option:focus-visible {
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.065);
}

.demo-custom-select-option.is-selected {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.16);
}

.demo-custom-select-option.is-disabled,
.demo-custom-select-option:disabled {
  cursor: not-allowed;
  opacity: .46;
  color: rgba(255, 255, 255, 0.42);
}

.demo-custom-select-option.is-disabled:hover,
.demo-custom-select-option.is-disabled:focus-visible,
.demo-custom-select-option:disabled:hover,
.demo-custom-select-option:disabled:focus-visible {
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
}

.demo-custom-select-option.is-selected::after {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
  color: rgba(var(--accent-rgb), 0.95);
}

.demo-custom-select.is-compact .demo-custom-select-trigger {
  min-height: 34px;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 12.5px;
}

.demo-custom-select.is-compact .demo-custom-select-menu {
  z-index: 10090;
}

.demo-color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.demo-color-input {
  width: 44px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.demo-upload-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 42px;
  padding: 10px;
  border: 1px dashed rgba(var(--accent-rgb), 0.42);
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.07);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease);
}

.demo-upload-drop:hover {
  border-color: rgba(var(--accent-rgb), 0.72);
  background: rgba(var(--accent-rgb), 0.11);
}

.demo-upload-drop.is-dragging {
  border-color: rgba(var(--accent-rgb), 0.9);
  background: rgba(var(--accent-rgb), 0.16);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.demo-gallery-drop {
  min-height: 74px;
}

.demo-upload-drop small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 600;
}

.demo-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.demo-upload-status {
  min-height: 16px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11.5px;
  line-height: 1.35;
}

.demo-upload-remove {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.demo-upload-remove:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: #fff;
}

.demo-gallery-editor-list {
  display: grid;
  gap: 10px;
}

.demo-gallery-editor-card {
  display: grid;
  grid-template-columns: minmax(112px, 132px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.demo-gallery-editor-card.is-disabled {
  opacity: .58;
}

.demo-gallery-editor-preview {
  width: 100%;
  height: 132px;
  max-height: 132px;
  aspect-ratio: 1 / 1;
  align-self: start;
  overflow: hidden;
  min-height: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}

.demo-gallery-editor-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.demo-gallery-editor-card-large {
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
}

.demo-gallery-editor-preview-large {
  aspect-ratio: 4 / 3;
  height: 135px;
  max-height: 135px;
  border-radius: 12px;
}

.demo-structured-editor-body {
  padding-left: 38px;
}

.demo-structured-editor-body .demo-gallery-editor-preview {
  width: min(180px, 100%);
  height: 128px;
  max-height: 128px;
  margin-bottom: 2px;
}

.demo-gallery-editor-body {
  min-width: 0;
}

.demo-gallery-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

@media (max-width: 460px) {
  .demo-gallery-editor-card {
    grid-template-columns: 1fr;
  }

  .demo-gallery-editor-preview,
  .demo-gallery-editor-preview-large,
  .demo-structured-editor-body .demo-gallery-editor-preview {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 10;
  }

  .demo-field-row-3 {
    grid-template-columns: 1fr;
  }
}

/* Optional helper text under a section label, used by the
   Simulator Services and Add-ons sections to explain what the
   toggles do without crowding the section label. */
.demo-section-hint {
  margin: -6px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.52);
}

/* Add-on row layout: title on top, "from $price" muted underneath.
   Lives inside the same .demo-service-row shell as the Services
   section toggles so vertical rhythm stays consistent. */
.demo-addon-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;       /* let .demo-service-name truncate cleanly */
  flex: 1;
}
.demo-addon-price {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.46);
}

/* Subheading inside a section — used by the Add-ons section to
   group the 25 add-on toggles by category. Visually quieter than
   .demo-section-label so the section stays one cohesive block. */
.demo-subsection-label {
  margin: 14px 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}
.demo-subsection-label:first-child { margin-top: 0; }

.demo-config-card {
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(8, 9, 12, 0.78);
  box-shadow: 0 14px 36px -30px rgba(0, 0, 0, 0.85);
}

.demo-config-card-title {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Empty-state copy for sections where the user has disabled
   every item. Calmer than a row of off toggles; reassures the
   shop owner that re-enabling brings tiles back. */
.demo-empty-state {
  margin: 0 0 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

/* ------ Field --------------------------------------------- */

.demo-field {
  margin-bottom: 12px;
}
.demo-field:last-child { margin-bottom: 0; }

.demo-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 6px;
}

.demo-field-input,
.demo-field-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #f5f5f7;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), box-shadow .18s var(--ease, ease);

  /* Defang the default form look on iOS / mobile. */
  -webkit-appearance: none;
  appearance: none;
}

.demo-field-textarea {
  resize: vertical;
  min-height: 70px;
  max-height: 160px;
}

.demo-field-input::placeholder,
.demo-field-textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.demo-field-input:hover,
.demo-field-textarea:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.demo-field-input:focus,
.demo-field-textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}

.demo-field-note {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  line-height: 1.35;
}

/* Inline 2-column layout for City + State */
.demo-field-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.demo-field-row-3 {
  grid-template-columns: 1.5fr .72fr .9fr;
}

.demo-address-field {
  position: relative;
}

.demo-address-suggestions {
  position: absolute;
  z-index: 80;
  top: 67px;
  left: 0;
  right: 0;
  display: grid;
  gap: 5px;
  max-height: 230px;
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(18, 19, 23, 0.98), rgba(9, 10, 12, 0.98));
  box-shadow:
    0 18px 40px -22px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overscroll-behavior: contain;
}

.demo-address-suggestions[hidden] {
  display: none;
}

.demo-address-suggestion {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.demo-address-suggestion:hover,
.demo-address-suggestion:focus-visible,
.demo-address-suggestion.is-active {
  outline: none;
  background: rgba(var(--accent-rgb), 0.11);
  color: #fff;
}

.demo-address-suggestion strong {
  font-size: 12.5px;
  font-weight: 850;
}

.demo-address-suggestion span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11.5px;
  line-height: 1.35;
}

.demo-address-provider,
.demo-address-status {
  margin: 0;
  padding: 6px 8px 2px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.demo-address-status {
  padding: 6px 1px 0;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}

.demo-address-status[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .demo-address-suggestions {
    top: 64px;
    max-height: min(260px, 42vh);
  }

  .demo-address-suggestion {
    padding: 11px 10px;
  }
}

.demo-toggle-field {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.demo-toggle-field-label {
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.demo-card-editor {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

.demo-card-editor .demo-toggle-field {
  margin-bottom: 10px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0;
  background: transparent;
}

.demo-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-config-item {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

.demo-config-item.is-disabled .demo-service-name {
  color: rgba(255, 255, 255, 0.32);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.18);
}

.demo-config-row {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.demo-config-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.demo-config-row-head strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.demo-config-row-head span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.demo-mini-btn,
.demo-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
}

.demo-action-btn {
  width: 100%;
  margin-top: 2px;
  min-height: 36px;
}

.demo-mini-btn:hover,
.demo-action-btn:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.16);
}

.demo-mini-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.demo-mini-btn.demo-danger {
  color: #ffb8b8;
}

.demo-config-item-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.demo-package-editor-list {
  gap: 8px;
}

.demo-package-editor {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
    rgba(9, 10, 13, 0.82);
  overflow: hidden;
}

.demo-package-editor[open] {
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow: 0 18px 44px -34px rgba(var(--accent-rgb), 0.62);
}

.demo-package-editor.is-disabled {
  opacity: 0.62;
}

.demo-package-editor-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.demo-package-editor-head::-webkit-details-marker {
  display: none;
}

.demo-package-editor-head:hover {
  background: rgba(255, 255, 255, 0.035);
}

.demo-package-editor-chevron {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.42);
  transition: transform .18s var(--ease, ease), color .18s var(--ease, ease);
}

.demo-package-editor-chevron svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-package-editor[open] .demo-package-editor-chevron {
  transform: rotate(90deg);
  color: rgba(var(--accent-rgb), 0.9);
}

.demo-package-editor-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-package-editor-title {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 850;
}

.demo-package-editor-subtitle {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
}

.demo-package-editor-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.demo-package-editor-toggle {
  margin-right: 2px;
}

.demo-package-editor-body {
  display: grid;
  gap: 10px;
  padding: 0 10px 12px 38px;
}

.demo-package-add {
  justify-content: center;
  min-height: 36px;
  margin-top: 2px;
  border-style: dashed;
}

.demo-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.demo-compact-grid-stats {
  grid-template-columns: .75fr 1fr .85fr;
}

.demo-compact-grid-stats .demo-compact-field:last-child {
  grid-column: 1 / -1;
}

.demo-compact-grid-benefits {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-compact-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.demo-compact-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.demo-compact-input {
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 12.5px;
}

.demo-compact-select {
  appearance: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(9, 9, 11, 0.92);
  color: rgba(255, 255, 255, 0.88);
}

/* ------ Accent picker --------------------------------------- */

.demo-design-theme-field {
  gap: 10px;
}

.demo-design-theme-grid {
  display: grid;
  gap: 9px;
}

.demo-design-theme-card {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(7, 8, 10, 0.9);
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s var(--ease, ease), background .18s var(--ease, ease), transform .18s var(--ease, ease);
}

.demo-design-theme-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--inline-accent-rgb, 225, 29, 72), 0.34);
  background:
    linear-gradient(135deg, rgba(var(--inline-accent-rgb, 225, 29, 72), 0.11), rgba(255, 255, 255, 0.025)),
    rgba(7, 8, 10, 0.92);
}

.demo-design-theme-card.is-active {
  border-color: rgba(var(--inline-accent-rgb, 225, 29, 72), 0.62);
  box-shadow:
    0 0 0 1px rgba(var(--inline-accent-rgb, 225, 29, 72), 0.18),
    0 16px 30px -24px rgba(var(--inline-accent-rgb, 225, 29, 72), 0.8);
}

.demo-design-theme-card.is-disabled {
  opacity: .62;
  cursor: not-allowed;
  transform: none;
}

.demo-design-theme-preview {
  min-height: 56px;
  display: grid;
  gap: 5px;
  padding: 7px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 75% 30%, rgba(var(--inline-accent-rgb, 225, 29, 72), 0.28), transparent 38%),
    linear-gradient(145deg, #17181d, #07080a);
}

.demo-design-theme-preview-bar,
.demo-design-theme-preview-hero,
.demo-design-theme-preview-line {
  display: block;
  border-radius: 999px;
}

.demo-design-theme-preview-bar {
  width: 68%;
  height: 6px;
  background: rgba(255, 255, 255, .34);
}

.demo-design-theme-preview-hero {
  height: 22px;
  background: linear-gradient(90deg, rgba(var(--inline-accent-rgb, 225, 29, 72), .72), rgba(255,255,255,.08));
}

.demo-design-theme-preview-line {
  width: 45%;
  height: 5px;
  background: rgba(255,255,255,.18);
}

.demo-design-theme-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.demo-design-theme-topline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-design-theme-topline strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.demo-design-theme-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.64);
  background: rgba(255,255,255,.055);
  font-style: normal;
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.demo-design-theme-card.is-active .demo-design-theme-badge {
  border-color: rgba(var(--inline-accent-rgb, 225, 29, 72), .42);
  color: #fff;
  background: rgba(var(--inline-accent-rgb, 225, 29, 72), .20);
}

.demo-design-theme-description {
  color: rgba(255,255,255,.54);
  font-size: 10.5px;
  line-height: 1.35;
}

.demo-accent-grid {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 10px;
  align-items: start;
}

.demo-accent-swatch {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  transition: transform .18s var(--ease, ease), border-color .18s var(--ease, ease), box-shadow .18s var(--ease, ease);
}

.demo-accent-swatch-disc {
  position: absolute;
  inset: 5px;
  border-radius: 10px;
  background: var(--swatch, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.demo-accent-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
}

.demo-accent-swatch:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.demo-accent-swatch.is-active {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 8px 24px -10px var(--swatch, transparent);
}

.demo-accent-swatch.is-active::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-image:
    linear-gradient(45deg, transparent 40%, #fff 40%, #fff 55%, transparent 55%),
    linear-gradient(-45deg, transparent 55%, #fff 55%, #fff 70%, transparent 70%);
  background-size: 8px 8px;
  background-position: center;
  background-repeat: no-repeat;
}

.demo-custom-accent-control {
  display: grid;
  gap: 6px;
  width: 48px;
  min-width: 0;
}

.demo-custom-accent-control .demo-accent-swatch {
  width: 48px;
  height: 48px;
}

.demo-custom-accent-input {
  width: 48px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.demo-custom-accent-label {
  color: rgba(255,255,255,.68);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

/* ------ Services list --------------------------------------- */

.demo-services-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;

  padding: 9px 10px 9px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: background .18s var(--ease, ease), border-color .18s var(--ease, ease);
}

.demo-services-manager {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-subtle {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11.5px;
  line-height: 1.45;
}

.demo-service-row--editable {
  align-items: flex-start;
}

.demo-service-edit-fields {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.demo-service-edit-fields .demo-compact-field {
  margin: 0;
}

.demo-service-add {
  width: 100%;
  justify-content: center;
  gap: 7px;
}

.demo-service-delete:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 95, 95, 0.45);
  background: rgba(255, 95, 95, 0.12);
}

.demo-service-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.demo-service-row.is-disabled .demo-service-name {
  color: rgba(255, 255, 255, 0.32);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.18);
}

.demo-service-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Toggle (checkbox-styled-as-pill) */
.demo-toggle {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.demo-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.demo-toggle-track {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background .18s var(--ease, ease), border-color .18s var(--ease, ease);
}

.demo-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #d6d6da;
  border-radius: 999px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), background .18s var(--ease, ease);
  pointer-events: none;
}

.demo-toggle input:checked + .demo-toggle-track {
  background: rgba(var(--accent-rgb), 0.7);
  border-color: rgba(var(--accent-rgb), 0.85);
}

.demo-toggle input:checked ~ .demo-toggle-thumb {
  transform: translateX(14px);
  background: #fff;
}

.demo-toggle input:focus-visible + .demo-toggle-track {
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.4);
}

/* Up / down buttons */
.demo-service-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.demo-service-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: color .18s var(--ease, ease), background .18s var(--ease, ease), border-color .18s var(--ease, ease);
  padding: 0;
}

.demo-service-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-service-btn:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.demo-service-btn:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3);
}

.demo-service-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

/* ------ Footer ---------------------------------------------- */

.demo-panel-footer {
  flex-shrink: 0;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0) 100%);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-panel-footer-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.demo-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .18s var(--ease, ease), background .18s var(--ease, ease), border-color .18s var(--ease, ease);
}

.demo-reset-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.demo-reset-btn:focus-visible {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3);
}

.demo-reset-btn svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------ Mobile tuning for groups + sub-blocks ---------------- */
@media (max-width: 640px) {
  .demo-group-title {
    padding: 11px 11px;
    gap: 10px;
  }
  .demo-group-index {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .demo-group-label {
    font-size: 15px;
  }
  .demo-group-desc {
    font-size: 11px;
    -webkit-line-clamp: 3;
  }
  .demo-group-content {
    padding: 4px 9px 10px;
  }
  .demo-subblock-head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }
  .demo-subblock-head .demo-subblock-actions {
    grid-column: 1 / -1;
    justify-self: flex-end;
  }
  .demo-search-input {
    font-size: 13.5px;
  }
}

/* ------ Reduced motion -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #demo-customize-fab,
  #demo-customize-panel,
  #demo-customize-backdrop,
  .demo-accent-swatch,
  .demo-service-row,
  .demo-service-btn,
  .demo-field-input,
  .demo-field-textarea,
  .demo-toggle-track,
  .demo-toggle-thumb,
  .demo-reset-btn,
  .demo-panel-close,
  .demo-group,
  .demo-group-title,
  .demo-group-chevron,
  .demo-group-reset,
  .demo-subblock,
  .demo-subblock-title,
  .demo-subblock-chevron,
  .demo-search,
  .demo-search-clear {
    transition: none !important;
  }
}
