/* ============================================================
   POPUP CANVAS — shared renderer styles
   Used by: dashboard editor canvas + customer site (Phase 2).
   Reuses Brand Hub customer tokens via --pc-* alias layer.
   ============================================================ */

/* ---- Brand Hub → canvas alias layer (MUST be defined here) ----
   Customer sites expose Brand Hub tokens under their own names.
   The --pc-* namespace bridges them to the canvas render.
   Fallbacks ensure the canvas renders even when Brand Hub is absent. */
.pop-canvas {
  --pc-primary:     var(--color-primary, #054570);
  --pc-primary-2:   var(--color-primary-2, #0a5a8f);
  --pc-accent:      var(--color-accent, #FFCC4E);
  --pc-teal:        var(--color-teal, #5EC0BC);
  --pc-text:        var(--color-text, #16303f);
  --pc-muted:       var(--color-muted, #5d7180);
  --pc-surface:     var(--color-surface, #ffffff);
  --pc-btn-bg:      var(--color-btn-bg, var(--color-primary, #054570));
  --pc-btn-text:    var(--color-btn-text, #ffffff);
  --pc-btn-border:  var(--color-primary, #054570);
  --pc-heading:     var(--color-primary, #054570);
  --pc-divider:     var(--color-teal, #5EC0BC);
  --pc-radius-card: var(--radius-card, 18px);
  --pc-radius-btn:  var(--radius-btn, 10px);
  --pc-font-head:   var(--font-heading, 'Poppins', system-ui, sans-serif);
  --pc-font-body:   var(--font-body, 'Mulish', system-ui, sans-serif);

  /* canvas base */
  position: relative;
  background: var(--pc-surface);
  border-radius: var(--pc-radius-card);
  box-shadow: 0 32px 64px -8px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden;
  font-family: var(--pc-font-body);
  color: var(--pc-text);
}

/* ---- entry animation (transform-only — resting state always visible) ---- */
@media (prefers-reduced-motion: no-preference) {
  .pop-canvas { animation: pop-enter 0.34s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)); }
  .pop-canvas.anim-fade { animation: pop-fade 0.34s ease; }
  .pop-canvas.anim-none { animation: none; }
}
@keyframes pop-enter { from { opacity: 0; transform: translateY(28px) scale(0.93); } }
@keyframes pop-fade  { from { transform: scale(0.985); } }

/* ---- size variants: center modal ---- */
.pop-canvas.center               { width: 100%; max-width: 480px; }
.pop-canvas.center.size-compact  { width: 360px; }
.pop-canvas.center.size-large    { width: 500px; }

/* ---- close button ---- */
.pop-x {
  position: absolute; top: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: 1px solid rgba(0,0,0,0.06);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pc-text); cursor: pointer; z-index: 6;
  backdrop-filter: blur(4px); transition: background 120ms;
}
.pop-x:hover { background: #fff; }
.pop-x svg   { width: 15px; height: 15px; stroke-width: 2; }
.pop-x.right { inset-inline-end: 12px; }
.pop-x.left  { inset-inline-start: 12px; }

/* ---- editable slot wrapper (editor canvas only) ---- */
.pe-slot {
  position: relative; cursor: pointer;
  transition: box-shadow 120ms; outline: none;
}
.pe-slot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 6px;
  border: 1.5px solid transparent; pointer-events: none;
  transition: border-color 120ms, background 120ms;
}
/* hover + selected outlines — only when editable (pop-canvas.editable class) */
.pop-canvas.editable .pe-slot:hover::after {
  border-color: rgba(200,152,30,0.55);
}
.pop-canvas.editable .pe-slot.selected::after {
  border-color: var(--gold-deep, #C8981E);
  background: rgba(200,152,30,0.06);
}
.pe-slot .pe-tag {
  position: absolute; top: -10px; left: -3px; z-index: 7;
  font-family: var(--font-mono, monospace); font-size: 9px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--gold-deep, #C8981E);
  padding: 2px 7px; border-radius: 4px;
  opacity: 0; transform: translateY(3px);
  transition: opacity 120ms, transform 120ms; pointer-events: none; white-space: nowrap;
}
.pop-canvas.editable .pe-slot.selected .pe-tag { opacity: 1; transform: translateY(0); }

/* ---- popup body + content elements ---- */
.pc-img {
  width: 100%; aspect-ratio: 16/9; background: #cfe0e8;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pc-img img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }

/* placeholder shown when no image is set — striped background + label */
.pc-img-placeholder {
  display: block; width: 100%; height: 100%;
  background-image: repeating-linear-gradient(45deg, #cfe0e8 0 10px, #c3d7e1 10px 20px);
}

.pc-body { padding: 24px 26px 26px; text-align: center; }

.pc-badge {
  display: inline-block; font-family: var(--pc-font-body); font-weight: 700;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pc-primary); background: rgba(94,192,188,0.18);
  padding: 4px 11px; border-radius: 999px; margin-bottom: 12px;
}

.pc-h2 {
  font-family: var(--pc-font-head); font-weight: 700; font-size: 30px;
  line-height: 1.25; color: var(--pc-heading); margin: 0 0 9px;
}

.pc-p {
  font-family: var(--pc-font-body); font-size: 16px; line-height: 1.625;
  color: color-mix(in srgb, var(--pc-text) 65%, transparent); margin: 0 auto 20px; max-width: 36ch;
}

.pc-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font-family: var(--pc-font-body); font-weight: 700; font-size: 18px;
  background: var(--pc-btn-bg); color: var(--pc-btn-text);
  border: 2px solid var(--pc-btn-border); border-radius: var(--pc-radius-btn); padding: 16px 24px; cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1), background-color 300ms cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.pc-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  background-color: color-mix(in srgb, var(--pc-btn-bg) 90%, transparent);
}
.pc-cta svg { width: 16px; height: 16px; }

.pc-divider {
  width: 64px; height: 3px; border-radius: 2px;
  background: var(--pc-divider); margin: 0 auto 20px;
}

.pc-dismiss {
  display: block; margin: 13px auto 0; background: transparent; border: 0; cursor: pointer;
  font-family: var(--pc-font-body); font-size: 12.5px; color: var(--pc-muted);
  text-decoration: underline; text-underline-offset: 2px;
}

/* email form slot */
.pc-form { margin: 0 auto 6px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pc-form input {
  font-family: var(--pc-font-body); font-size: 14px; color: var(--pc-text);
  border: 1.5px solid rgba(5,69,112,0.2); border-radius: var(--pc-radius-btn);
  padding: 12px 14px; outline: none; background: #fff; text-align: left;
}
.pc-form input::-moz-placeholder { color: #97a7b1; }
.pc-form input::placeholder { color: #97a7b1; }
.pc-form .pc-form-submit {
  font-family: var(--pc-font-body); font-weight: 700; font-size: 14px;
  background: var(--pc-btn-bg); color: var(--pc-btn-text);
  border: 0; border-radius: var(--pc-radius-btn); padding: 12px 20px; cursor: pointer;
}
.pc-form .pc-form-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.pc-form .pc-form-success {
  font-family: var(--pc-font-body); font-size: 14px; color: var(--pc-primary);
  text-align: center; padding: 10px 0; margin: 0;
}
.pc-form .pc-form-error {
  font-family: var(--pc-font-body); font-size: 12.5px; color: #c0392b;
  text-align: center; margin: 0; padding: 0;
}

/* ---- layout: split ---- */
.pop-canvas.split {
  width: 620px;
  display: grid; grid-template-columns: 0.85fr 1fr;
}
.pop-canvas.split.size-compact { width: 540px; }
.pop-canvas.split.size-large   { width: 700px; }
.pop-canvas.split .pc-split-img { aspect-ratio: auto; height: 100%; min-height: 300px; }
.pop-canvas.split .pc-body { text-align: left; display: flex; flex-direction: column; justify-content: center; }
.pop-canvas.split .pc-p   { margin-left: 0; }

/* ---- layout: banner + bottombar ---- */
.pop-canvas.banner,
.pop-canvas.bottombar {
  width: 760px; max-width: 100%; border-radius: 14px;
  display: flex; align-items: center; gap: 20px; padding: 16px 20px 16px 24px;
}
.pop-canvas.banner.size-compact,
.pop-canvas.bottombar.size-compact { width: 640px; }
.pop-canvas.banner.size-large,
.pop-canvas.bottombar.size-large   { width: 860px; }
.pop-canvas.banner    .pc-body,
.pop-canvas.bottombar .pc-body { padding: 0; text-align: left; flex: 1; }
.pop-canvas.banner    .pc-h2,
.pop-canvas.bottombar .pc-h2 { font-size: 19px; margin-bottom: 3px; }
.pop-canvas.banner    .pc-p,
.pop-canvas.bottombar .pc-p  { margin: 0; font-size: 13.5px; max-width: none; }
.pop-canvas.banner    .pc-cta,
.pop-canvas.bottombar .pc-cta { padding: 11px 22px; font-size: 14px; flex-shrink: 0; width: auto; }

/* banner docks top, bottombar docks bottom — radius on the open edge only */
.pop-canvas.banner.docked    { border-radius: 0 0 12px 12px; max-width: 100%; width: 100%; }
.pop-canvas.bottombar.docked { border-radius: 12px 12px 0 0; max-width: 100%; width: 100%; }

/* ---- layout: slide-in ---- */
.pop-canvas.slidein { width: 360px; }
.pop-canvas.slidein .pc-body { text-align: left; }
.pop-canvas.slidein .pc-p    { margin-left: 0; }

/* dock-side helpers (applied on host wrapper, not on pop-canvas) */
.pop-canvas-host.dock-left    { justify-content: flex-start; }
.pop-canvas-host.dock-right   { justify-content: flex-end;   }

/* ---- PopupHost: live-site overlay wrapper (position:fixed; editor uses .pop-stage instead) ----
   These classes are copied to customer sites alongside popup-view.tsx.
   banner/bottombar get no padding so the full-width .docked canvas reaches the viewport edge. */
.pop-live-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 2147483000;
  background: rgba(0,0,0,0.5);
}
.pop-live-overlay.pop-host-center {
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pop-live-overlay.pop-host-top {
  align-items: flex-start;
  justify-content: center;
}
.pop-live-overlay.pop-host-bottom {
  align-items: flex-end;
  justify-content: center;
}
.pop-live-overlay.pop-host-right {
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
}
.pop-live-overlay.pop-host-left {
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
}

/* ---- layout: fullscreen ---- */
.pop-canvas.fullscreen {
  width: 100%; height: 100%; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background:
    linear-gradient(rgba(5,40,64,0.55), rgba(5,40,64,0.78)),
    repeating-linear-gradient(45deg, #1a5172 0 16px, #176089 16px 32px);
}
.pop-canvas.fullscreen .pc-body  { max-width: 460px; }
.pop-canvas.fullscreen .pc-h2   { color: #fff; font-size: 34px; }
.pop-canvas.fullscreen .pc-p    { color: rgba(255,255,255,0.85); }
.pop-canvas.fullscreen .pc-badge { color: #fff; background: rgba(255,255,255,0.18); }

/* ============================================================
   INSERTED BLOCKS — rendered between structural slots
   banner/bottombar: renderInserted() returns null in those
   layouts — these selectors do not apply there.
   ============================================================ */

.pop-ins-slot {
  width: 100%;
  text-align: center;
}

.pop-ins-text {
  font-family: var(--pc-font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--pc-muted);
  padding: 8px 0;
  outline: none;
}

.pop-ins-heading {
  font-family: var(--pc-font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  color: var(--pc-text);
  padding: 8px 0;
  outline: none;
}

.pop-ins-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
  width: 60%;
  margin: 10px auto;
}

.pop-ins-fancy {
  font-family: var(--pc-font-body);
  font-size: 14px;
  color: var(--pc-muted);
  letter-spacing: 0.25em;
  padding: 8px 0;
}

/* ============================================================
   tus-* STATIC FALLBACK RULES — editor canvas + customer site
   The four universal formatting classes. brand-tokens.css on
   customer sites already emits these globally (B3 confirmed).
   Scoped to .pop-canvas here for belt-and-suspenders coverage
   in the dashboard editor canvas.
   ============================================================ */

.pop-canvas .tus-weight-bold         { font-weight: bold }
.pop-canvas .tus-style-italic        { font-style: italic }
.pop-canvas .tus-decor-underline     { text-decoration: underline }
.pop-canvas .tus-decor-strikethrough { text-decoration: line-through }

/* ============================================================
   POPUP LIST — styles for popups/page.tsx list view
   Token bridge: design aliases → --ush-* system tokens.
   ============================================================ */

/* ---- token bridge (design file uses --fg-*, --font-*, etc.) ---- */
.pop-list-root {
  --font-mono:    var(--ush-font-mono);
  --font-serif:   var(--ush-font-serif);
  --font-display: var(--ush-font-display);
  --fg-1:         var(--ush-fg-1);
  --fg-2:         var(--ush-fg-2);
  --fg-3:         var(--ush-fg-3);
  --fg-muted:     var(--ush-fg-muted);
  --charcoal:     var(--ush-charcoal);
  --gold:         var(--ush-gold);
  --gold-deep:    var(--ush-gold-deep);
  --success:      var(--ush-success);
  --danger:       var(--ush-danger);
  --info-bg:      var(--ush-info-bg);
  --ease-standard: var(--ush-ease-standard, cubic-bezier(0.2, 0.7, 0.2, 1));
  --sand:         var(--ush-sand, #F2EDE2);
}

/* ---- stat strip ---- */
.pop-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(26,26,26,0.08);
  border: 1px solid rgba(26,26,26,0.08);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.pop-stat {
  background: #FFFFFF;
  padding: 15px 18px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.pop-stat .lbl {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
}
.pop-stat .val {
  font-family: var(--font-display); font-size: 30px; line-height: 1.05;
  color: var(--fg-1); font-weight: 500;
  display: flex; align-items: baseline; gap: 7px;
}
.pop-stat .val small { font-family: var(--font-serif); font-size: 13px; color: var(--fg-3); font-weight: 500; }
.pop-stat .delta {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.02em;
  color: var(--success); display: inline-flex; align-items: center; gap: 4px;
}
.pop-stat .delta.flat { color: var(--fg-3); }

/* ---- analytics teaser (replaces empty stat cells) ---- */
.pop-analytics-teaser {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; margin-bottom: 18px;
  background: var(--ush-info-bg, rgba(74,90,110,0.10));
  border: 1px solid rgba(74,90,110,0.14);
  border-radius: 10px;
}
.pop-analytics-teaser svg { width: 15px; height: 15px; color: var(--ush-info, #4A5A6E); flex-shrink: 0; }
.pop-analytics-teaser .at-active {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--fg-1); white-space: nowrap;
}
.pop-analytics-teaser .at-label {
  font-family: var(--font-serif); font-size: 13px; color: #3D4D63; flex: 1;
}
.pop-analytics-teaser .at-coming {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--fg-3); white-space: nowrap;
}

/* ---- multi-popup info note ---- */
.pop-note {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 16px; margin-bottom: 16px;
  background: var(--info-bg); border: 1px solid rgba(74,90,110,0.18);
  border-radius: 10px;
}
.pop-note svg { width: 16px; height: 16px; color: #4A5A6E; flex-shrink: 0; }
.pop-note .txt { font-family: var(--font-serif); font-size: 13px; color: #3D4D63; line-height: 1.4; }
.pop-note .txt b { font-weight: 600; }
.pop-note .x {
  margin-inline-start: auto; background: transparent; border: 0; cursor: pointer;
  color: #4A5A6E; opacity: 0.6; display: inline-flex; padding: 4px;
}
.pop-note .x:hover { opacity: 1; }

/* ---- list toolbar ---- */
.pop-toolbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.pop-toolbar-search {
  display: flex; align-items: center; gap: 8px;
  width: 260px; height: 34px; padding: 0 11px;
  border: 1px solid rgba(26,26,26,0.14); border-radius: 8px;
  background: #fff; transition: border-color 120ms;
}
.pop-toolbar-search:focus-within { border-color: rgba(26,26,26,0.28); }
.pop-toolbar-search svg { width: 14px; height: 14px; color: var(--ush-fg-3); flex-shrink: 0; }
.pop-toolbar-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-family: var(--font-serif); font-size: 13px; color: var(--fg-1);
}
.pop-toolbar-search input::-moz-placeholder { color: var(--ush-fg-muted); }
.pop-toolbar-search input::placeholder { color: var(--ush-fg-muted); }
.pop-toolbar-count {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.04em;
}

/* ---- table extras ---- */
.pop-name-cell { display: flex; align-items: center; gap: 13px; }

/* mini thumbnail (fallback geometric preview) */
.pop-thumb {
  width: 46px; height: 38px; border-radius: 7px; flex-shrink: 0;
  border: 1px solid rgba(26,26,26,0.1); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #0f3a57; position: relative;
}
.pop-thumb .mini {
  width: 60%; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; gap: 1.5px; padding: 3px;
}
.pop-thumb .mini i { display: block; height: 2px; border-radius: 1px; background: #cdd6dd; }
.pop-thumb .mini i.h { background: #054570; width: 70%; height: 3px; }
.pop-thumb .mini i.b { background: #FFCC4E; height: 4px; width: 50%; margin-top: 1px; border-radius: 1px; }
.pop-thumb.banner .mini { width: 80%; flex-direction: row; align-items: center; padding: 2px 4px; }
.pop-thumb.split .mini { flex-direction: row; padding: 0; width: 70%; height: 60%; }
.pop-thumb.split .mini .sp { width: 45%; background: #2c87a8; border-radius: 2px 0 0 2px; }

/* mini live preview wrapper */
.pop-mini-wrap {
  width: 46px; height: 38px; border-radius: 7px; flex-shrink: 0;
  border: 1px solid rgba(26,26,26,0.1); overflow: hidden;
  position: relative; background: #0f3a57;
}
.pop-mini-scaler {
  position: absolute; pointer-events: none; animation: none !important;
  transform-origin: top left;
}
.pop-mini-scaler .pop-canvas { animation: none !important; }

.pop-name-main { font-family: var(--font-serif); font-weight: 600; font-size: 14px; color: var(--fg-1); }
.pop-name-sub {
  font-family: var(--font-serif); font-size: 12px; color: var(--fg-3);
  margin-top: 1px; max-width: 320px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pop-tplbadge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-serif); font-size: 12px; font-weight: 500;
  color: var(--fg-2); background: rgba(26,26,26,0.05);
  border: 1px solid rgba(26,26,26,0.08);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.pop-tplbadge svg { width: 12px; height: 12px; color: var(--fg-3); }
.pop-tplbadge.ai { color: #785512; background: rgba(200,152,30,0.12); border-color: rgba(200,152,30,0.22); }
.pop-tplbadge.ai svg { color: var(--gold-deep); }

.pop-trig {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-serif); font-size: 13px; color: var(--fg-2);
}
.pop-trig svg { width: 14px; height: 14px; color: var(--fg-3); }
.pop-trig .more {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-3);
  background: rgba(26,26,26,0.06); padding: 1px 5px; border-radius: 999px;
}

.pop-metric { font-family: var(--font-mono); font-size: 13px; color: var(--fg-1); font-feature-settings: "tnum"; }

.pop-rate { display: flex; align-items: center; gap: 9px; }
.pop-rate .bar { width: 56px; height: 5px; border-radius: 999px; background: rgba(26,26,26,0.08); overflow: hidden; }
.pop-rate .bar i { display: block; height: 100%; border-radius: 999px; background: var(--success); }
.pop-rate .bar i.low { background: var(--gold-deep); }
.pop-rate .pct { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-1); font-feature-settings: "tnum"; min-width: 36px; }
.pop-rate.empty .pct { color: var(--fg-muted); }

/* ---- custom toggle switch ---- */
.pop-switch {
  position: relative; width: 38px; height: 22px; border-radius: 999px;
  background: rgba(26,26,26,0.18); border: 0; cursor: pointer; padding: 0;
  transition: background 160ms var(--ease-standard); flex-shrink: 0;
}
.pop-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 160ms var(--ease-standard);
}
.pop-switch.on { background: var(--charcoal); }
.pop-switch.on::after { transform: translateX(16px); }

/* ---- empty state ---- */
.pop-empty {
  padding: 56px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.pop-empty .ic {
  width: 56px; height: 56px; border-radius: 14px; background: rgba(26,26,26,0.05);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-3); margin-bottom: 16px;
}
.pop-empty .ic svg { width: 26px; height: 26px; }
.pop-empty h3 { font-family: var(--font-display); font-size: 22px; color: var(--fg-1); margin: 0 0 6px; }
.pop-empty p { font-family: var(--font-serif); font-size: 13.5px; color: var(--fg-3); line-height: 1.5; margin: 0 0 18px; max-width: 360px; }

/* ---- row menu (custom fixed-position) ---- */
.pop-row-menu {
  position: fixed; z-index: 800;
  background: #fff; border: 1px solid rgba(26,26,26,0.12);
  border-radius: 12px; box-shadow: 0 16px 36px -10px rgba(26,26,26,0.22);
  min-width: 190px; padding: 5px;
  animation: pop-menu-in 130ms var(--ease-standard, cubic-bezier(0.2,0.7,0.2,1));
}
@keyframes pop-menu-in { from { transform: translateY(6px); opacity: 0; } }
.pop-row-menu button, .pop-row-menu a, .pop-row-menu-link {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: start;
  border: 0; background: transparent; cursor: pointer; text-decoration: none;
  font-family: var(--font-serif); font-size: 13px; color: var(--fg-1);
  padding: 9px 11px; border-radius: 8px;
}
.pop-row-menu button:hover, .pop-row-menu a:hover, .pop-row-menu-link:hover { background: #F7F4ED; }
.pop-row-menu button.danger { color: #9E3E1F; }
.pop-row-menu button.danger:hover { background: rgba(158,62,31,0.07); }
.pop-row-menu svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.7; }
.pop-row-menu-sep { height: 1px; background: rgba(26,26,26,0.07); margin: 4px 0; }

/* ---- menu trigger button ---- */
.pop-row-btn {
  width: 28px; height: 28px; border-radius: 7px;
  border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-3); transition: background 120ms, color 120ms;
}
.pop-row-btn:hover { background: rgba(26,26,26,0.07); color: var(--fg-1); }

/* ── center + fullscreen layouts: force center alignment on ALL content ──
   There is no text-align control in the popup toolbar yet, so these two
   layouts always center their content. This overrides the dashboard's
   global `[dir="rtl"] h1..h6,p,span,div { text-align: right }` rule
   (specificity 0,1,1) which otherwise right-aligns popup text in Hebrew. */
.pop-canvas.center .pc-body,
.pop-canvas.fullscreen .pc-body,
.pop-canvas.center .pc-body :where(h1, h2, h3, h4, h5, h6, p, div, span, .pop-ins-slot),
.pop-canvas.fullscreen .pc-body :where(h1, h2, h3, h4, h5, h6, p, div, span, .pop-ins-slot) {
  text-align: center;
}

/* CTA brand-variant support: full-width helper + anchor reset for .btn-* variants */
.pop-canvas .pc-cta-fullwidth { width: 100%; }
.pop-canvas a[class*="btn-"] { text-decoration: none; }

/* Brand-variant CTA: match the website primary button — resting shadow-lg,
   hover scale(1.05) + shadow-xl, 300ms. Variant keeps its own colors/effect;
   we add the lift (variant hover effects like circle-fill are often invisible). */
.pop-canvas a[class*="btn-"] {
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1), background-color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.pop-canvas a[class*="btn-"]:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

/* ── CTA shine sweep on hover — replicates the website's .button-shine ───────
   A diagonal streak in the button's text color (currentColor) sweeps across on
   hover. Uses a ::before with translateX + overflow:hidden, exactly like the
   site. currentColor → for bomdia this is the brand blue over the yellow button
   (same as the site); on dark buttons it reads light. The ::before overrides the
   brand-variant circle-fill ::before for popup CTAs (intended — popups show the
   shine). */
.pop-canvas a.pc-cta,
.pop-canvas a[class*="btn-"] {
  position: relative;
  overflow: hidden;
}
.pop-canvas a.pc-cta::before,
.pop-canvas a[class*="btn-"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-image: linear-gradient(
    120deg,
    transparent 30%,
    color-mix(in srgb, currentColor 40%, transparent) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  opacity: 0.6;
  pointer-events: none;
}
.pop-canvas a.pc-cta:hover::before,
.pop-canvas a[class*="btn-"]:hover::before {
  animation: pc-cta-shine 2.5s ease-out infinite;
}
@keyframes pc-cta-shine {
  0%        { transform: translateX(-100%); }
  60%, 100% { transform: translateX(250%); }
}
/* overflow:hidden (above) clips the .pe-slot ::after selection outline, so the
   editor marks a selected CTA with an outline instead (not clipped). */
.pop-canvas.editable a.pc-cta.selected,
.pop-canvas.editable a[class*="btn-"].selected {
  outline: 2px solid var(--gold-deep, #C8981E);
  outline-offset: 2px;
}

