/* 3dvista-assistant widget — structural CSS only.
   Colors/position come from CSS variables set by theme.ts per tour;
   clients/<tour>/theme.css may override the variables below, never these rules. */

/* Febal Casa's own brand typeface for panel headings. Two corrections
   behind this specific choice, both from live feedback:
   1. First tried "Noto Serif Display" (febalcasa.com's own H1 font,
      confirmed via computed style) — but that's a big-display headline
      face, thin strokes that go illegible at this UI's small sizes
      ("no se ve bien en chiquito").
   2. The replacement needed to be FuturaBookC — the font Febal's own
      in-tour hotspot labels use (e.g. "BALMORAL SOFA"), which reads
      cleanly small. It's already a real asset THIS tour ships (see
      tour-export/fonts/FuturaBookC Regular.woff2 + fonts.css) — no
      Google Fonts fetch needed, just point at the same file via an
      absolute path (this stylesheet lives at /assistant/, the font at
      the tour root, so a relative path would resolve wrong). Per-tour,
      same spirit as theme.css: a client without this asset just falls
      back to the generic sans-serif stack instead of a 404. */
@font-face {
  font-family: "FuturaBookC";
  src: url("/fonts/FuturaBookC Regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.tva-root {
  --assistant-primary: #14b8a6; /* dark turquoise default */
  --assistant-primary-hover: #0f9c8f;
  /* Text/icon color for anything sitting ON a --assistant-primary
   * background (buttons, the user's own chat bubble, the send icon).
   * Was hardcoded #06201c (near-black) in three separate rules before —
   * fine against this default's pale teal, unreadable against a
   * saturated color like Febal's red. A tour with a primary color that
   * needs dark-on-primary instead (rare — most brand accents are
   * saturated enough for white) overrides just this one variable. */
  --assistant-on-primary: #ffffff;
  --assistant-bg: #0f172a;
  --assistant-bg-elevated: #16213a;
  --assistant-text: #e6f1ef;
  --assistant-text-muted: #9fb3c8;
  --assistant-border: #23324a;
  --assistant-position-side: right;

  position: fixed;
  z-index: 999999;
  bottom: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

.tva-root[data-assistant-position="bottom-right"] { right: 24px; }
.tva-root[data-assistant-position="bottom-left"] { left: 24px; }

/* Launcher */
/* Entry-point buttons stay hidden over the language-select screen — explicit
   direction: they should only appear once the visitor is actually inside
   the tour. [data-tva-tour-entered] is set once (index.ts polls a DOM
   signature 3DVista itself exposes for that screen) and never unset. */
.tva-root:not([data-tva-tour-entered="true"]) .tva-launcher,
.tva-root:not([data-tva-tour-entered="true"]) .tva-wl-toggle,
.tva-root:not([data-tva-tour-entered="true"]) .tva-wl-preview-heart {
  opacity: 0;
  pointer-events: none;
}

.tva-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--assistant-primary);
  color: var(--assistant-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1; /* stays below .tva-card so the two never visually overlap at the corner */
}

.tva-launcher svg {
  width: 26px;
  height: 26px;
}

.tva-launcher:hover { background: var(--assistant-primary-hover); }
.tva-launcher:focus-visible { outline: 3px solid var(--assistant-primary); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .tva-launcher { transition: transform 0.15s ease, background 0.15s ease; }
  .tva-launcher:hover { transform: scale(1.05); }
}

/* Welcome bubble ("¡Hola! Soy tu asistente virtual") right above the
   launcher, its tail pointing down at it (to its left it would cover the
   tour's own house dots). Same stacking as the launcher, so the
   wishlist panel covers it; hidden with it while the chat is open. The full
   text sits invisibly under the typed one (same grid cell), so the bubble has
   its final size from the first frame. */
.tva-greeting {
  position: absolute;
  right: 0;
  bottom: 74px;
  z-index: 1;
  display: grid;
  width: max-content;
  max-width: 260px;
  padding: 12px 16px;
  border: none;
  border-radius: 16px 16px 4px 16px;
  white-space: nowrap;
  background: #ffffff;
  color: #1a1a1a;
  font: 600 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transform-origin: 100% 100%;
}
.tva-greeting[hidden] { display: none; }
.tva-greeting::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
  border-radius: 2px;
}
.tva-greeting > span { grid-area: 1 / 1; }
.tva-greeting-sizer { visibility: hidden; }
.tva-greeting-typed::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--assistant-primary);
  animation: tva-greeting-caret 0.8s steps(1) infinite;
}
.tva-greeting--done .tva-greeting-typed::after { animation: none; opacity: 0; transition: opacity 0.4s ease 0.6s; }
.tva-greeting:focus-visible { outline: 3px solid var(--assistant-primary); outline-offset: 3px; }
.tva-root:not([data-tva-tour-entered="true"]) .tva-greeting,
.tva-root:has(.tva-card--open) .tva-greeting {
  opacity: 0;
  pointer-events: none;
}
@keyframes tva-greeting-caret { 50% { opacity: 0; } }
@keyframes tva-greeting-pop {
  0% { opacity: 0; transform: translate(10px, 10px) scale(0.5); }
  60% { opacity: 1; transform: translate(0, 0) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .tva-greeting--in { animation: tva-greeting-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
}

/* Chat card — panel lateral de ancho fijo que se desliza desde el borde de
   la pantalla, idéntico en estructura al panel de wishlist (.tva-wl-panel).
   Se monta sobre el canvas de 3DVista gracias al stacking context de
   .tva-root (z-index:999999), que lo coloca encima del panel de wishlist
   (z-index:999997) sin necesidad de valores absolutos propios altos. */
.tva-card {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: var(--assistant-bg);
  border: none;
  border-radius: 0;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  z-index: 2; /* dentro del stacking context de .tva-root (999999), por encima del launcher (z-index:1) */

  transform: translateX(100%);
  pointer-events: none;
}

.tva-root[data-assistant-position="bottom-right"] .tva-card { right: 0; }
.tva-root[data-assistant-position="bottom-left"] .tva-card { left: 0; transform: translateX(-100%); }

.tva-card.tva-card--open {
  transform: translateX(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .tva-card {
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }
}

/* Ocultar el launcher mientras el panel está abierto — el panel cubre ese
   rincón y el header del panel ya tiene botón de cierre propio. */
.tva-root:has(.tva-card--open) .tva-launcher {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.tva-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--assistant-bg-elevated);
  border-bottom: 1px solid var(--assistant-border);
}
.tva-card-header .tva-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--assistant-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tva-card-header .tva-avatar svg {
  width: 16px;
  height: 16px;
}
.tva-card-header .tva-title { flex: 1; min-width: 0; }
/* Standard UI text sizes (set per explicit direction): title matches a
   product card's own name (16px), subtitle/description-role text matches
   a product card's description (13px) — reused everywhere for consistency
   rather than each label picking its own size. */
.tva-card-header .tva-title strong {
  display: block;
  font-size: 16px;
  color: var(--assistant-text);
  font-family: "FuturaBookC", sans-serif;
  text-transform: uppercase;
}
.tva-card-header .tva-title span { display: block; font-size: 13px; color: var(--assistant-text-muted); }
.tva-card-header button {
  background: transparent;
  border: none;
  color: var(--assistant-text-muted);
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  flex-shrink: 0;
}
.tva-card-header button:hover { background: var(--assistant-border); color: var(--assistant-text); }
.tva-card-header button:focus-visible { outline: 2px solid var(--assistant-primary); }
/* Pill de cambio entre paneles — en el header del chatbot necesita !important
   para sobreescribir la regla genérica .tva-card-header button (32×32px / padding:0). */
.tva-card-switch-btn {
  width: auto !important;
  height: auto !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
  font-weight: 600;
  border-radius: 999px !important;
  border: 1px solid var(--assistant-border) !important;
  background: transparent !important;
  color: var(--assistant-text-muted) !important;
  white-space: nowrap;
}
.tva-card-switch-btn:hover {
  border-color: var(--assistant-primary) !important;
  color: var(--assistant-primary) !important;
  background: transparent !important;
}
.tva-card-switch-btn:focus-visible { outline: 2px solid var(--assistant-primary) !important; outline-offset: 2px; }

/* El botón de la wishlist no hereda reglas genéricas restrictivas, no necesita !important. */
.tva-wl-switch-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--assistant-border);
  background: transparent;
  color: var(--assistant-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.tva-wl-switch-btn:hover { border-color: var(--assistant-primary); color: var(--assistant-primary); }
.tva-wl-switch-btn:focus-visible { outline: 2px solid var(--assistant-primary); outline-offset: 2px; }

/* Messages */
.tva-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Custom scrollbar (explicit direction: the default OS one "se ve horrible") —
   white track, grey rounded thumb, Apple-style thin bar. Webkit-only (Chrome/
   Safari/Edge, which is effectively every real visitor here); Firefox falls
   back to its own thin scrollbar via scrollbar-width below rather than being
   left with the same ugly default. */
.tva-messages {
  scrollbar-width: thin;
  scrollbar-color: #c7c7c7 #ffffff;
}
.tva-messages::-webkit-scrollbar {
  width: 8px;
}
.tva-messages::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 8px;
}
.tva-messages::-webkit-scrollbar-thumb {
  background: #c7c7c7;
  border-radius: 8px;
  border: 2px solid #ffffff;
}
.tva-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.tva-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.tva-bubble-user {
  align-self: flex-end;
  background: var(--assistant-primary);
  color: var(--assistant-on-primary);
  border-bottom-right-radius: 4px;
}
.tva-bubble-assistant {
  align-self: flex-start;
  background: var(--assistant-bg-elevated);
  color: var(--assistant-text);
  border: 1px solid var(--assistant-border);
  border-bottom-left-radius: 4px;
}
.tva-bubble-link {
  color: var(--assistant-primary);
  font-weight: 600;
  text-decoration: underline;
}
.tva-bubble-link:hover { opacity: 0.85; }

/* Entrance animation — messages/cards ease and scale into place instead of
   snapping into existence, the same instinct behind Messenger/Instagram's
   own bubble-in transition (fade + slight scale-up, growing from the
   bottom where a new message enters). Applied ONLY to genuinely new
   messages by message-list.ts (tracks the previously-rendered count) — this
   file fully rebuilds .tva-messages' innerHTML on every render(), including
   ones triggered by unrelated state (a wishlist heart toggled elsewhere),
   so animating unconditionally would replay this on every existing bubble
   each time, not just new ones. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes tva-msg-enter {
    from { opacity: 0; transform: scale(0.85) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }
  .tva-msg-enter {
    transform-origin: bottom center;
    animation: tva-msg-enter 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

.tva-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 12px;
}
.tva-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--assistant-text-muted);
}
@media (prefers-reduced-motion: no-preference) {
  .tva-typing span { animation: tva-pulse 1.2s infinite ease-in-out; }
  .tva-typing span:nth-child(2) { animation-delay: 0.15s; }
  .tva-typing span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes tva-pulse { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
}

/* Product info card — image takes ~50% of the card width as a wide
   rectangle (NOT a small square thumbnail), name/teaser/link fill the other
   50%, matching the reference UI. Presented as its own message-like
   element; the "Llévame"/"Ver alternativas" buttons are a SEPARATE element
   below (.tva-product-actions), never part of this box, and never carry
   the image/name/section themselves. */
.tva-product-card {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: var(--assistant-bg-elevated);
  border: 1px solid var(--assistant-border);
  border-radius: 12px;
  padding: 10px;
}

.tva-wishlist-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}
.tva-wishlist-heart svg { width: 15px; height: 15px; }
.tva-wishlist-heart:hover { background: rgba(0, 0, 0, 0.55); }
.tva-wishlist-heart:focus-visible { outline: 2px solid var(--assistant-primary); outline-offset: 1px; }
.tva-wishlist-heart--saved { color: var(--assistant-primary); }
.tva-wishlist-heart--saved svg { fill: var(--assistant-primary); }
.tva-product-card img {
  width: 50%;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--assistant-border);
}
.tva-product-card-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tva-product-card-body strong {
  display: block;
  font-size: 16px;
  color: var(--assistant-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tva-product-card-body p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--assistant-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tva-product-card-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--assistant-primary);
  text-decoration: none;
  cursor: pointer;
  /* The official page link (an <a> now; it was a <button> for "Ver ficha").
     The reset keeps it plain red text over the card's own background. */
  background: transparent;
  border: none;
  padding: 0;
}
.tva-product-card-link:hover { text-decoration: underline; }

/* v2: group header above its cards (only what matches: «café ✓», «disponible bajo pedido»). */
.tva-card-group {
  align-self: stretch;
  margin: 6px 2px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--assistant-text-muted);
}

.tva-product-card-link:focus-visible { outline: 2px solid var(--assistant-primary); outline-offset: 1px; }

/* Action buttons — ~70% width, right-aligned (matches the reference UI),
   stacked, rounded rectangles rather than pills. Only ever attached to
   proposal cards (get_product/get_alternatives); navigating never produces
   one of these (see assistant-core ProductCard doc). */
.tva-product-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 70%;
  margin: 4px 0 0 auto;
}
.tva-product-actions button {
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--assistant-border);
  background: var(--assistant-bg-elevated);
  color: var(--assistant-text);
  cursor: pointer;
}
.tva-product-actions button.tva-primary {
  background: var(--assistant-primary);
  border-color: var(--assistant-primary);
  color: var(--assistant-on-primary);
}
.tva-product-actions button:hover { filter: brightness(1.1); }
.tva-product-actions button:focus-visible { outline: 2px solid var(--assistant-primary); outline-offset: 1px; }

/* ============================================================
   Wishlist layer — a SEPARATE top-level component from the chat card
   (see wishlist-layer.ts). Everything below is scoped under .tva-wl-*
   and positioned independently via `position: fixed`, exactly like
   .tva-card/.tva-launcher are — it does not rely on .tva-wl-root's own
   box for layout, only as a DOM/theme-variable anchor.
   ============================================================ */

/* "Mi colección" pill — top-right, low enough to clear the tour's own Febal
   logo (moved further down than an earlier value per explicit feedback
   that it still crowded the logo). The fallback entry point: shown
   whenever NEITHER panel is open AND no native hotspot preview is open
   (see .tva-wl-preview-heart just below for that other case) — hidden via
   .tva-wl-toggle--hidden, driven by wishlist-layer.ts's own open state,
   chat-card.ts's (via index.ts's setChatOpen wiring), and the native-
   preview signal together. */
/* Styled to match the tour's own "Showroom map" button per explicit,
   detailed live feedback on the shape specifically: solid Febal red, white
   mixed-case text (NOT all-caps — unlike the panel titles above, this one
   reverted after an earlier version force-uppercased it), ONE rounded
   corner with the other three square (not a uniform border-radius), and a
   flat black drop shadow directly underneath (not a soft diffuse shadow
   all around). That button is a baked-in image asset in the tour export
   (no inspectable CSS/font — confirmed by grepping script_general.js/
   skin/, nothing under "Showroom map" at all), so this is a visual match
   built from scratch, refined against live screenshots rather than an
   extracted value. */
.tva-wl-toggle {
  position: fixed;
  top: 150px;
  right: 24px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px 0 0 0;
  border: none;
  background: var(--assistant-primary);
  color: var(--assistant-on-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  /* NOT FuturaBookC here — zoomed side-by-side comparison against the real
     "Showroom map" button (live feedback) showed that button isn't
     geometric/Futura-styled at all: bolder, more condensed, a generic
     grotesque-style bold — a plain system-bold stack (real bold cuts, not
     synthetic-bolding a Regular-weight face) reads much closer. */
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  z-index: 999998; /* page's own top-level stacking context — needs a high value to clear the 3DVista canvas, same reasoning as .tva-wl-panel's z-index below. */
}
.tva-wl-toggle:hover { background: var(--assistant-primary-hover); color: var(--assistant-on-primary); }
.tva-wl-toggle:focus-visible { outline: 2px solid var(--assistant-text); outline-offset: 2px; }
.tva-wl-toggle--hidden { opacity: 0; pointer-events: none; }

/* Bare heart — replaces the pill above, same spot, while a native tour
   hotspot preview is open (see hotspot-heart-overlay.ts's
   onNativePreviewChange); saves THAT product instead of opening the panel. */
.tva-wl-preview-heart {
  position: fixed;
  top: 150px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--assistant-bg);
  color: var(--assistant-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999998;
}
.tva-wl-preview-heart svg { width: 20px; height: 20px; }
.tva-wl-preview-heart:hover { color: var(--assistant-primary); }
.tva-wl-preview-heart:focus-visible { outline: 2px solid var(--assistant-primary); outline-offset: 2px; }
.tva-wl-preview-heart--hidden { opacity: 0; pointer-events: none; }
.tva-wl-preview-heart--saved { color: var(--assistant-primary); }
.tva-wl-preview-heart--saved svg { fill: var(--assistant-primary); }

/* Panel — generous padding throughout (never the chat's compact bubble
   spacing) per explicit direction: this must read as spacious, not
   cramped. Slides in from the right, independent of the chat card. */
.tva-wl-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  background: var(--assistant-bg);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 999997;
  transform: translateX(100%);
  pointer-events: none;
}
.tva-wl-panel.tva-wl-panel--open {
  transform: translateX(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: no-preference) {
  .tva-wl-panel { transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1); }
}

.tva-wl-header { display: flex; align-items: flex-start; justify-content: space-between; }
.tva-wl-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tva-wl-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--assistant-text);
  font-family: "FuturaBookC", sans-serif;
  text-transform: uppercase;
}
.tva-wl-header span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--assistant-text-muted);
}
.tva-wl-close {
  background: transparent;
  border: none;
  color: var(--assistant-text-muted);
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.tva-wl-close:hover { background: var(--assistant-bg-elevated); color: var(--assistant-text); }

.tva-wl-empty {
  margin: 0;
  padding: 32px 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--assistant-text-muted);
}

.tva-wl-list { display: flex; flex-direction: column; gap: 16px; }
/* Same image/text split as the chat's own .tva-product-card (50%-width
   image, text filling the rest) — explicitly NOT wrapped in a card border/
   background, sits directly on the panel. */
.tva-wl-item {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--assistant-border);
}
.tva-wl-item img {
  width: 50%;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--assistant-bg-elevated);
}
.tva-wl-item-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tva-wl-item-body strong {
  display: block;
  font-size: 16px;
  color: var(--assistant-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tva-wl-item-section {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--assistant-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tva-wl-item-go {
  margin-top: 8px;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--assistant-primary);
  background: transparent;
  color: var(--assistant-primary);
  cursor: pointer;
}
.tva-wl-item-go:hover { background: var(--assistant-primary); color: var(--assistant-on-primary); }
/* Small corner badge overlapping the image — same treatment as the chat
   card's own .tva-wishlist-heart, instead of a separate flex column. */
.tva-wl-item-heart {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.tva-wl-item-heart svg { width: 15px; height: 15px; fill: currentColor; }
.tva-wl-item-heart:hover { background: rgba(0, 0, 0, 0.55); }
.tva-wl-item-heart--saved { color: var(--assistant-primary); }
.tva-wl-item-heart--saved svg { fill: var(--assistant-primary); }

.tva-wl-style-section { display: flex; flex-direction: column; gap: 14px; }
/* Wraps style-section + actions together (see wishlist-layer.ts) so BOTH
   get pushed to the bottom as one unit via this single margin-top:auto —
   explicit direction: don't let the style section float in the middle with
   dead space below it (e.g. only one saved item); the two belong grouped
   at the bottom, not each fighting for its own auto-margin. */
.tva-wl-bottom { display: flex; flex-direction: column; gap: 24px; margin-top: auto; }
.tva-wl-style-loading {
  margin: 0;
  font-size: 13px;
  color: var(--assistant-text-muted);
  font-style: italic;
}
.tva-wl-style-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--assistant-bg-elevated);
  font-size: 13px;
  line-height: 1.5;
  color: var(--assistant-text);
}
.tva-wl-style-label svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--assistant-primary); }
/* Same treatment as the panel/button headings elsewhere (FuturaBookC +
   uppercase) per explicit direction — was plain body text before, out of
   step with the rest of the panel's typography. */
.tva-wl-style-label strong {
  color: var(--assistant-primary);
  font-family: "FuturaBookC", sans-serif;
  text-transform: uppercase;
}
.tva-wl-rec-wrap { position: relative; }
.tva-wl-rec-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* old Edge */
}
/* Native scrollbar hidden per explicit direction ("esa barrita gris se ve
   horrible") — replaced by the arrow buttons below + pointer-drag (see
   createRecommendationsRow in wishlist-layer.ts); still scrolls natively
   via touch/trackpad, this only hides the visible track/thumb. */
.tva-wl-rec-row::-webkit-scrollbar { display: none; }
.tva-wl-rec-row--dragging { cursor: grabbing; scroll-behavior: auto; }
.tva-wl-rec-arrow {
  position: absolute;
  top: 32px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--assistant-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  color: var(--assistant-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}
.tva-wl-rec-arrow svg { width: 14px; height: 14px; }
.tva-wl-rec-arrow--prev { left: -6px; }
.tva-wl-rec-arrow--next { right: -6px; }
.tva-wl-rec-arrow--hidden { display: none; }
.tva-wl-rec-arrow:hover { color: var(--assistant-primary); }
.tva-wl-rec-card {
  flex-shrink: 0;
  width: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--assistant-text);
  cursor: pointer;
  transform: translateY(0);
  text-align: left;
}
.tva-wl-rec-card img {
  width: 100%;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--assistant-bg-elevated);
}
.tva-wl-rec-card strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tva-wl-rec-card:hover strong { color: var(--assistant-primary); }
@media (prefers-reduced-motion: no-preference) {
  .tva-wl-rec-card { transition: transform 0.15s ease; }
  .tva-wl-rec-card:hover { transform: translateY(-3px); }
}

/* Entry point to the moodboard (packages/moodboard-ui). Only rendered when
   the tour enables the feature and the panel has a style to show. Solid red
   with the same one-rounded-corner shape as "La mia collezione", so it reads
   as the panel's one primary action. */
.tva-wl-moodboard-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px 0 0 0;
  background: var(--assistant-primary);
  color: var(--assistant-on-primary);
  font-family: "FuturaBookC", sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.tva-wl-moodboard-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.tva-wl-moodboard-btn:hover { background: var(--assistant-primary-hover); }
.tva-wl-moodboard-btn:focus-visible { outline: 2px solid var(--assistant-text); outline-offset: 2px; }

.tva-wl-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--assistant-border);
}
.tva-wl-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid var(--assistant-border);
  border-radius: 12px;
  background: var(--assistant-bg-elevated);
  color: var(--assistant-text);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}
.tva-wl-action:hover { border-color: var(--assistant-primary); color: var(--assistant-primary); }
.tva-wl-action::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.tva-wl-action[data-icon="pdf"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E");
}
.tva-wl-action[data-icon="mail"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}
.tva-wl-action[data-icon="whatsapp"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 0 0-8.5 15.2L2 22l4.9-1.5A10 10 0 1 0 12 2Zm5.6 14.2c-.2.7-1.4 1.3-2 1.4-.5.1-1.1.2-3.6-.8-3-1.2-4.9-4.2-5.1-4.4-.1-.2-1.2-1.6-1.2-3 0-1.4.7-2.1 1-2.4.3-.3.6-.3.8-.3h.6c.2 0 .4 0 .6.5.2.5.7 1.8.8 1.9.1.1.1.3 0 .5-.1.2-.1.3-.3.5l-.4.5c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.5 1.5.3.1.5.1.6-.1.2-.2.7-.8.9-1.1.2-.3.4-.2.6-.1.2.1 1.5.7 1.8.8.3.1.5.2.5.3.1.2.1.7-.1 1.3Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 0 0-8.5 15.2L2 22l4.9-1.5A10 10 0 1 0 12 2Zm5.6 14.2c-.2.7-1.4 1.3-2 1.4-.5.1-1.1.2-3.6-.8-3-1.2-4.9-4.2-5.1-4.4-.1-.2-1.2-1.6-1.2-3 0-1.4.7-2.1 1-2.4.3-.3.6-.3.8-.3h.6c.2 0 .4 0 .6.5.2.5.7 1.8.8 1.9.1.1.1.3 0 .5-.1.2-.1.3-.3.5l-.4.5c-.1.1-.3.3-.1.6.2.3.8 1.3 1.7 2.1 1.2 1 2.1 1.4 2.5 1.5.3.1.5.1.6-.1.2-.2.7-.8.9-1.1.2-.3.4-.2.6-.1.2.1 1.5.7 1.8.8.3.1.5.2.5.3.1.2.1.7-.1 1.3Z'/%3E%3C/svg%3E");
}
.tva-wl-action[data-icon="contact"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E");
}

/* "Contáctame" — replaces the list inside the same panel (contact-panel.ts).
   Compact on purpose: CAP, store, map, three fields and the privacy line fit
   a laptop-height panel; the panel scrolls for anything more. */
.tva-ct { display: flex; flex-direction: column; gap: 10px; }
.tva-ct-header { display: flex; align-items: center; }
.tva-ct-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 2px;
  border: none;
  background: transparent;
  color: var(--assistant-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tva-ct-back svg { width: 16px; height: 16px; }
.tva-ct-back:hover { color: var(--assistant-primary); }
.tva-ct-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--assistant-text);
  font-family: "FuturaBookC", sans-serif;
  text-transform: uppercase;
}
.tva-ct-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--assistant-border);
  border-radius: 12px;
  background: var(--assistant-bg-elevated);
}
.tva-ct-text { margin: 0; font-size: 13px; line-height: 1.45; color: var(--assistant-text); }
.tva-ct-cap-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.tva-ct-input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--assistant-border);
  border-radius: 8px;
  background: var(--assistant-bg);
  color: var(--assistant-text);
  font: inherit;
  font-size: 14px;
}
.tva-ct-input:focus { outline: none; border-color: var(--assistant-primary); }
.tva-ct-input[aria-invalid="true"] { border-color: var(--assistant-primary); }
.tva-ct-search {
  height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: var(--assistant-primary);
  color: var(--assistant-on-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tva-ct-search:hover { background: var(--assistant-primary-hover); }
.tva-ct-store { display: flex; align-items: center; gap: 10px; }
.tva-ct-store-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--assistant-bg);
  color: var(--assistant-primary);
}
.tva-ct-store-pin svg { width: 18px; height: 18px; }
.tva-ct-store-info { display: flex; flex-direction: column; min-width: 0; font-size: 14px; color: var(--assistant-text); }
.tva-ct-store-kicker { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--assistant-text-muted); }
/* Store name and street in the title's face (FuturaBookC, capitals), like "Contáctame". */
.tva-ct-store-name,
.tva-ct-store-address { font-family: "FuturaBookC", sans-serif; text-transform: uppercase; }
.tva-ct-store-name { font-size: 15px; font-weight: 700; }
.tva-ct-store-address { font-size: 12px; color: var(--assistant-text-muted); }
.tva-ct-map-toggle {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--assistant-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tva-ct-map-toggle svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.tva-ct-map-toggle--open svg { transform: rotate(180deg); }
/* 200px is the smallest height at which Google's keyless embed is a live map (drag, Ctrl+wheel or
   two-finger zoom, its move/zoom control); at 180px and below it serves a static picture. Tested
   in Chrome, 28/09. */
.tva-ct-map { width: 100%; height: 200px; flex-shrink: 0; border: 0; border-radius: 8px; background: var(--assistant-bg); }
.tva-ct-names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tva-ct-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tva-ct-label { font-size: 12px; color: var(--assistant-text-muted); }
.tva-ct-error { font-size: 12px; color: var(--assistant-primary); }
.tva-ct-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--assistant-text); cursor: pointer; }
.tva-ct-consent input { width: 16px; height: 16px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--assistant-primary); }
.tva-ct-link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--assistant-primary);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.tva-ct-note { margin: 0; font-size: 12px; color: var(--assistant-text-muted); }
.tva-ct-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px 0 0 0;
  background: var(--assistant-primary);
  color: var(--assistant-on-primary);
  font-family: "FuturaBookC", sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.tva-ct-submit:hover { background: var(--assistant-primary-hover); }
.tva-ct-sent { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 4px; text-align: center; }
.tva-ct-sent-icon { color: var(--assistant-primary); }
.tva-ct-sent-icon svg { width: 52px; height: 52px; }
.tva-ct-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 999998;
}
.tva-ct-modal-sheet {
  position: relative;
  width: calc(100% - 32px);
  max-height: 70%;
  overflow-y: auto;
  padding: 20px 18px;
  border-radius: 12px;
  background: var(--assistant-bg);
  color: var(--assistant-text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.tva-ct-modal-sheet .tva-ct-text + .tva-ct-text { margin-top: 10px; }
.tva-ct-modal-title { margin: 0 24px 12px 0; font-size: 15px; }
.tva-ct-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--assistant-text-muted);
  font-size: 22px;
  cursor: pointer;
}

/* Hotspot-hover heart overlay — sits above the tour's canvas, effectively
   invisible except for the one button shown while hovering a hotspot.
   Positioned every animation frame via `transform` (see
   hotspot-heart-overlay.ts) — deliberately no CSS transition on that
   property, so it tracks the mouse/camera exactly instead of visibly
   lagging behind. */
.tva-hotspot-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999996;
}
.tva-hotspot-heart {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--assistant-text);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: none;
}
.tva-hotspot-heart--visible { display: flex; pointer-events: auto; }
.tva-hotspot-heart svg { width: 18px; height: 18px; }
.tva-hotspot-heart:hover { background: #fff; }
.tva-hotspot-heart--saved { color: var(--assistant-primary); }
.tva-hotspot-heart--saved svg { fill: var(--assistant-primary); }
@media (prefers-reduced-motion: no-preference) {
  .tva-hotspot-heart { transition: transform 0.15s ease, background 0.15s ease; }
  .tva-hotspot-heart:hover { transform: scale(1.12); }

  /* Appear animation — plays the instant the button becomes --visible
     (mouse gets near a hotspot), NOT tied to :hover on the button itself.
     Explicitly no color change here — stays the neutral outline color from
     .tva-hotspot-heart above; only an actual save (below) fills it in with
     Febal red, per explicit direction ("en el hover aparece la animación
     pero sin rellenar de rojo"). classList.add on a class the element
     already has is a no-op, so this doesn't replay on every tick the
     button stays visible — only on a genuine hidden→visible transition. */
  @keyframes tva-heart-appear {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  .tva-hotspot-heart--visible {
    animation: tva-heart-appear 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Fires once, exactly when --saved is first applied — toggling a class a
     browser already has (see syncSavedVisual's classList.toggle) is a
     no-op, so this doesn't replay on every unrelated re-render, only on an
     actual unsaved→saved transition (or a fresh page load landing on an
     already-saved product, which is a harmless, arguably fitting replay
     too). Scale overshoots past 1 before settling — a small "pop", not a
     full bounce — plus a expanding ring on the button itself for the
     classic like-button "burst" read. */
  @keyframes tva-heart-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.35); }
    60% { transform: scale(0.92); }
    100% { transform: scale(1); }
  }
  @keyframes tva-heart-burst {
    0% { transform: scale(0.5); opacity: 0.7; }
    100% { transform: scale(1.9); opacity: 0; }
  }
  .tva-hotspot-heart--saved svg {
    animation: tva-heart-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .tva-hotspot-heart--saved::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--assistant-primary);
    animation: tva-heart-burst 0.5s ease-out;
    pointer-events: none;
  }
}

/* Suggestions — rendered below the input row (see chat-card.ts). */
.tva-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 14px;
}
.tva-suggestions-label {
  font-size: 12px;
  color: var(--assistant-text-muted);
  margin-right: 2px;
}
.tva-chip {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--assistant-border);
  background: var(--assistant-bg-elevated);
  color: var(--assistant-text-muted);
  cursor: pointer;
}
.tva-chip:hover { color: var(--assistant-text); border-color: var(--assistant-primary); }

/* Input row */
.tva-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--assistant-border);
  background: var(--assistant-bg-elevated);
}
.tva-input-row input {
  flex: 1;
  background: var(--assistant-bg);
  border: 1px solid var(--assistant-border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--assistant-text);
  font-size: 13px;
}
.tva-input-row input:focus-visible { outline: 2px solid var(--assistant-primary); }
.tva-input-row button {
  background: var(--assistant-primary);
  border: none;
  border-radius: 10px;
  width: 38px;
  color: var(--assistant-on-primary);
  cursor: pointer;
}
.tva-input-row button:focus-visible { outline: 2px solid var(--assistant-primary); outline-offset: 2px; }

/* Mobile — STILL a floating popup (rounded corners, drop shadow, margin
   showing the tour behind it), just wider (90% of the screen) — never
   edge-to-edge. Every fixed-px size below is expressed as a bare number
   times `--tva-mobile-unit` (a CSS length set in index.ts, `1px` on
   desktop) so it renders at its intended PHYSICAL size instead of at half
   scale: 3DVista's own runtime rewrites the page's viewport meta to
   `initial-scale=0.5` on load, which doubles the CSS layout viewport that
   every plain `px` value is relative to (confirmed live: window.innerWidth
   reports ~750 on a real 375px-wide screen) — so without this, text/icons
   render at roughly half their intended size on an actual phone even once
   the mobile layout itself is correctly detected.

   `--tva-mobile-unit` is `calc(100vw / <physicalScreenWidth>)` — a LIVE
   `vw`-based length, not a cached number, so it self-corrects on every
   layout pass no matter when 3DVista's rewrite actually happens (see
   index.ts's `computeMobileUnit` for why an earlier cached-multiplier
   version of this could go stale and break the layout).

   Percentage sizing (width: 90% etc.) needs none of this — it's already
   relative to the (also-doubled) layout viewport, so it cancels out on its
   own. Driven by `data-tva-mobile`, NOT a `max-width` media query — see
   index.ts's `isMobileDevice` for why that never fires inside the tour. */
.tva-root[data-tva-mobile="true"] {
  bottom: max(calc(16 * var(--tva-mobile-unit, 1px)), env(safe-area-inset-bottom));
}
.tva-root[data-tva-mobile="true"][data-assistant-position="bottom-right"] {
  right: max(calc(16 * var(--tva-mobile-unit, 1px)), env(safe-area-inset-right));
}
.tva-root[data-tva-mobile="true"][data-assistant-position="bottom-left"] {
  left: max(calc(16 * var(--tva-mobile-unit, 1px)), env(safe-area-inset-left));
}

.tva-root[data-tva-mobile="true"] .tva-launcher {
  width: calc(64 * var(--tva-mobile-unit, 1px));
  height: calc(64 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-greeting {
  bottom: calc(78 * var(--tva-mobile-unit, 1px));
  max-width: calc(240 * var(--tva-mobile-unit, 1px));
  padding: calc(11 * var(--tva-mobile-unit, 1px)) calc(14 * var(--tva-mobile-unit, 1px));
  font-size: calc(15 * var(--tva-mobile-unit, 1px));
  border-radius: calc(16 * var(--tva-mobile-unit, 1px)) calc(16 * var(--tva-mobile-unit, 1px)) calc(4 * var(--tva-mobile-unit, 1px)) calc(16 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-launcher svg {
  width: calc(28 * var(--tva-mobile-unit, 1px));
  height: calc(28 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-card {
  /* Panel full-height también en mobile — ancho casi completo de pantalla. */
  width: 92vw;
}

.tva-root[data-tva-mobile="true"] .tva-card-header {
  padding: calc(14 * var(--tva-mobile-unit, 1px)) calc(16 * var(--tva-mobile-unit, 1px));
  gap: calc(10 * var(--tva-mobile-unit, 1px));
  /* The header's fixed-width children (avatar + 2 buttons) plus the
     title's own content can, at some viewport/content combinations,
     want more width than the card has — confirmed live via CDP: without
     this the row grew to 282px tall instead of wrapping the title text
     normally. flex-wrap keeps that overflow vertical (a slightly taller
     header) instead of pushing content past the card's edges. */
  flex-wrap: wrap;
}
.tva-root[data-tva-mobile="true"] .tva-card-header .tva-avatar {
  width: calc(30 * var(--tva-mobile-unit, 1px));
  height: calc(30 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-card-header .tva-title {
  /* Allow the title block to actually shrink below its text's natural
     width instead of forcing the row wider than the card. */
  overflow: hidden;
}
.tva-root[data-tva-mobile="true"] .tva-card-header .tva-title strong {
  font-size: calc(15 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-card-header .tva-title span {
  font-size: calc(13 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-card-header button {
  width: calc(40 * var(--tva-mobile-unit, 1px));
  height: calc(40 * var(--tva-mobile-unit, 1px));
  font-size: calc(18 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-messages {
  padding: calc(14 * var(--tva-mobile-unit, 1px)) calc(16 * var(--tva-mobile-unit, 1px));
  gap: calc(12 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-bubble {
  font-size: calc(15 * var(--tva-mobile-unit, 1px));
  padding: calc(10 * var(--tva-mobile-unit, 1px)) calc(12 * var(--tva-mobile-unit, 1px));
  border-radius: calc(12 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-typing span {
  width: calc(6 * var(--tva-mobile-unit, 1px));
  height: calc(6 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-product-card {
  gap: calc(10 * var(--tva-mobile-unit, 1px));
  padding: calc(8 * var(--tva-mobile-unit, 1px));
  border-radius: calc(12 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-product-card img {
  width: 50%;
  height: calc(110 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-product-card-body strong {
  font-size: calc(17 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-product-card-body p {
  font-size: calc(14 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-product-card-link {
  font-size: calc(14 * var(--tva-mobile-unit, 1px));
  margin-top: calc(4 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-product-actions {
  gap: calc(8 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-product-actions button {
  font-size: calc(14 * var(--tva-mobile-unit, 1px));
  padding: calc(12 * var(--tva-mobile-unit, 1px)) calc(14 * var(--tva-mobile-unit, 1px));
  border-radius: calc(12 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-suggestions {
  padding: calc(10 * var(--tva-mobile-unit, 1px)) calc(16 * var(--tva-mobile-unit, 1px)) calc(14 * var(--tva-mobile-unit, 1px));
  gap: calc(6 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-suggestions-label {
  font-size: calc(13 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-chip {
  font-size: calc(13 * var(--tva-mobile-unit, 1px));
  padding: calc(7 * var(--tva-mobile-unit, 1px)) calc(11 * var(--tva-mobile-unit, 1px));
}

.tva-root[data-tva-mobile="true"] .tva-input-row {
  padding: calc(12 * var(--tva-mobile-unit, 1px)) calc(16 * var(--tva-mobile-unit, 1px));
  padding-bottom: max(calc(12 * var(--tva-mobile-unit, 1px)), env(safe-area-inset-bottom));
  gap: calc(8 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-input-row input {
  /* 16px is the iOS Safari threshold below which focusing an input
     auto-zooms the page — compensating it like everything else here means
     it lands on exactly 16px physical, right at that threshold. */
  font-size: calc(16 * var(--tva-mobile-unit, 1px));
  padding: calc(11 * var(--tva-mobile-unit, 1px)) calc(12 * var(--tva-mobile-unit, 1px));
  min-width: 0; /* let it actually shrink in the flex row instead of overflowing */
}
.tva-root[data-tva-mobile="true"] .tva-input-row button {
  width: calc(44 * var(--tva-mobile-unit, 1px));
  flex-shrink: 0;
}

.tva-root[data-tva-mobile="true"] .tva-wishlist-heart {
  width: calc(30 * var(--tva-mobile-unit, 1px));
  height: calc(30 * var(--tva-mobile-unit, 1px));
}
.tva-root[data-tva-mobile="true"] .tva-wishlist-heart svg {
  width: calc(17 * var(--tva-mobile-unit, 1px));
  height: calc(17 * var(--tva-mobile-unit, 1px));
}

/* KNOWN GAP: the wishlist layer (.tva-wl-*, .tva-hotspot-*) doesn't yet
   have the --tva-mobile-unit px-compensation the rest of this file uses
   (see the big comment above data-tva-mobile) — same 3DVista viewport-meta
   doubling would apply to it on an actual phone. Not yet verified live on
   mobile; revisit before treating mobile as done. */


/* ============================================================
   Moodboard overlay (packages/moodboard-ui). A standalone component:
   everything is scoped under .tva-mb-*.

   Theme: reads the host widget's variables (--assistant-*, set per tour by
   theme.ts/theme.css) and falls back to Febal Casa's light palette, so it
   matches the wishlist panel inside the tour and still looks right on a
   page with no widget around it.

   Sizes: every length goes through --tva-mb-u, which is the widget's
   --tva-mobile-unit when mounted inside it (1px on desktop; a live vw-based
   unit on phones, where 3DVista rewrites the viewport to 0.5 scale and
   plain px would render at half size), and 1px anywhere else.
   ============================================================ */

.tva-mb-root {
  --tva-mb-u: var(--tva-mobile-unit, 1px);
  --tva-mb-bg: var(--assistant-bg, #FBFAF6);
  --tva-mb-surface: var(--assistant-bg-elevated, #F1EFE8);
  --tva-mb-text: var(--assistant-text, #0A0C06);
  --tva-mb-muted: var(--assistant-text-muted, #5C5C55);
  --tva-mb-border: var(--assistant-border, #D6D6D6);
  --tva-mb-accent: var(--assistant-primary, #E20613);
  --tva-mb-accent-hover: var(--assistant-primary-hover, #B80510);
  --tva-mb-on-accent: var(--assistant-on-primary, #FFFFFF);
  /* FuturaBookC is the tour's own label face (assistant.css declares it);
     elsewhere the stack falls back to a plain sans. */
  --tva-mb-heading: "FuturaBookC", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Editorial contrast for the motto, like febalcasa.com's serif headlines. */
  --tva-mb-serif: "Noto Serif Display", "Noto Serif", Georgia, "Times New Roman", serif;
  --tva-mb-radius: calc(4 * var(--tva-mb-u));
  --tva-mb-gap: calc(12 * var(--tva-mb-u));

  position: fixed;
  inset: 0;
  z-index: 1000000; /* above the chat card, the wishlist panel and its toggle */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(28 * var(--tva-mb-u));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tva-mb-text);
  color-scheme: light;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.tva-mb-root[data-open="true"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.tva-mb-root *,
.tva-mb-root *::before,
.tva-mb-root *::after {
  box-sizing: border-box;
}

.tva-mb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 6, 0.55);
}

.tva-mb-dialog {
  position: relative;
  width: min(calc(1120 * var(--tva-mb-u)), 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--tva-mb-bg);
  box-shadow: 0 calc(24 * var(--tva-mb-u)) calc(70 * var(--tva-mb-u)) rgba(0, 0, 0, 0.35);
  /* Same one-rounded-corner signature as the tour's "La mia collezione" and
     "Showroom map" buttons. */
  border-radius: calc(14 * var(--tva-mb-u)) 0 0 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .tva-mb-root { transition: opacity 0.22s ease, visibility 0s linear 0.22s; }
  .tva-mb-root[data-open="true"] { transition: opacity 0.22s ease; }
  .tva-mb-dialog {
    transform: translateY(calc(14 * var(--tva-mb-u)));
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .tva-mb-root[data-open="true"] .tva-mb-dialog { transform: none; }
}

/* --- Top bar: brand + actions --- */
.tva-mb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tva-mb-gap);
  padding: calc(12 * var(--tva-mb-u)) calc(16 * var(--tva-mb-u)) calc(12 * var(--tva-mb-u)) calc(32 * var(--tva-mb-u));
  border-bottom: 1px solid var(--tva-mb-border);
}
.tva-mb-brand {
  font-family: var(--tva-mb-heading);
  font-size: calc(13 * var(--tva-mb-u));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tva-mb-accent);
}
.tva-mb-bar-actions {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--tva-mb-u));
}
.tva-mb-pdf {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--tva-mb-u));
  height: calc(36 * var(--tva-mb-u));
  padding: 0 calc(14 * var(--tva-mb-u));
  border: 1px solid var(--tva-mb-border);
  border-radius: calc(8 * var(--tva-mb-u)) 0 0 0;
  background: var(--tva-mb-surface);
  color: var(--tva-mb-text);
  font-size: calc(13 * var(--tva-mb-u));
  font-weight: 600;
  cursor: pointer;
}
.tva-mb-pdf::before {
  content: "";
  width: calc(16 * var(--tva-mb-u));
  height: calc(16 * var(--tva-mb-u));
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tva-mb-pdf:hover:not(:disabled) { border-color: var(--tva-mb-accent); color: var(--tva-mb-accent); }
.tva-mb-pdf:disabled { opacity: 0.45; cursor: default; }
.tva-mb-close {
  width: calc(36 * var(--tva-mb-u));
  height: calc(36 * var(--tva-mb-u));
  border: none;
  border-radius: calc(8 * var(--tva-mb-u));
  background: transparent;
  color: var(--tva-mb-muted);
  font-size: calc(24 * var(--tva-mb-u));
  line-height: 1;
  cursor: pointer;
}
.tva-mb-close:hover { background: var(--tva-mb-surface); color: var(--tva-mb-text); }
.tva-mb-root button:focus-visible { outline: 2px solid var(--tva-mb-accent); outline-offset: 2px; }

/* --- Scrollable body --- */
.tva-mb-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(28 * var(--tva-mb-u)) calc(32 * var(--tva-mb-u)) calc(24 * var(--tva-mb-u));
}
.tva-mb-root[data-empty="true"] .tva-mb-board { display: none; }

/* --- Head: title + style on the left, motto on the right --- */
.tva-mb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(16 * var(--tva-mb-u)) calc(32 * var(--tva-mb-u));
  margin-bottom: calc(24 * var(--tva-mb-u));
}
.tva-mb-title {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--tva-mb-u));
  margin: 0;
  font-family: var(--tva-mb-heading);
  font-size: calc(34 * var(--tva-mb-u));
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tva-mb-text);
}
.tva-mb-spark { display: inline-flex; color: var(--tva-mb-accent); }
.tva-mb-spark svg { width: calc(22 * var(--tva-mb-u)); height: calc(22 * var(--tva-mb-u)); }
.tva-mb-style {
  margin: calc(10 * var(--tva-mb-u)) 0 0;
  font-size: calc(16 * var(--tva-mb-u));
  color: var(--tva-mb-muted);
}
/* Same treatment as the wishlist panel's "Il tuo stile" label. */
.tva-mb-style strong {
  font-family: var(--tva-mb-heading);
  font-weight: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tva-mb-accent);
}
.tva-mb-motto {
  margin: calc(4 * var(--tva-mb-u)) 0 0;
  max-width: calc(470 * var(--tva-mb-u));
  font-family: var(--tva-mb-serif);
  font-style: italic;
  font-size: calc(19 * var(--tva-mb-u));
  line-height: 1.5;
  text-align: right;
  color: var(--tva-mb-muted);
}
.tva-mb-motto-line { display: block; }
.tva-mb-motto .tva-mb-skel-line { width: calc(300 * var(--tva-mb-u)); margin-left: auto; }

/* --- Board: saved pieces on the left, 2x2 textures on the right --- */
.tva-mb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: var(--tva-mb-gap);
}
.tva-mb-hero {
  display: grid;
  grid-template-columns: repeat(var(--tva-mb-hero-count, 1), minmax(0, 1fr));
  gap: var(--tva-mb-gap);
  aspect-ratio: 3 / 2;
}
.tva-mb-hero[data-count="2"] { --tva-mb-hero-count: 2; }
.tva-mb-textures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--tva-mb-gap);
}

.tva-mb-anchor,
.tva-mb-texture {
  position: relative;
  margin: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--tva-mb-radius);
  background: var(--tva-mb-surface);
}
/* Absolutely positioned so a 1024px texture never stretches its grid row:
   the board's height comes from the hero's aspect ratio alone. */
.tva-mb-anchor img,
.tva-mb-texture img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.tva-mb-anchor img.tva-mb-img--loaded,
.tva-mb-texture img.tva-mb-img--loaded { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .tva-mb-anchor img,
  .tva-mb-texture img { transition: opacity 0.45s ease; }
}

/* Piece with no photo in the catalog: a named card in the board's colour. */
.tva-mb-anchor--nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24 * var(--tva-mb-u));
  background: var(--tva-mb-card, var(--tva-mb-muted));
}
@media (prefers-reduced-motion: no-preference) {
  .tva-mb-anchor--nophoto { transition: background-color 0.45s ease; }
}
.tva-mb-anchor-card-name {
  max-width: 14ch;
  font-family: var(--tva-mb-heading);
  font-size: calc(24 * var(--tva-mb-u));
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: #FFFFFF;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.tva-mb-anchor--nophoto[data-ink="dark"] .tva-mb-anchor-card-name {
  color: var(--tva-mb-text);
  text-shadow: none;
}
.tva-mb-anchor--nophoto .tva-mb-anchor-name { visibility: hidden; }

.tva-mb-anchor-cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(10 * var(--tva-mb-u));
  padding: calc(40 * var(--tva-mb-u)) calc(14 * var(--tva-mb-u)) calc(12 * var(--tva-mb-u));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  color: #FFFFFF;
}
.tva-mb-anchor-name {
  min-width: 0;
  font-family: var(--tva-mb-heading);
  font-size: calc(14 * var(--tva-mb-u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tva-mb-go {
  flex-shrink: 0;
  padding: calc(5 * var(--tva-mb-u)) calc(12 * var(--tva-mb-u));
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  font-size: calc(12.5 * var(--tva-mb-u));
  font-weight: 600;
  cursor: pointer;
}
.tva-mb-go:hover { border-color: var(--tva-mb-accent); background: var(--tva-mb-accent); color: var(--tva-mb-on-accent); }

.tva-mb-texture-cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--tva-mb-u));
  padding: calc(28 * var(--tva-mb-u)) calc(10 * var(--tva-mb-u)) calc(8 * var(--tva-mb-u));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #FFFFFF;
  opacity: 0;
}
.tva-mb-texture-cap strong {
  font-family: var(--tva-mb-heading);
  font-weight: normal;
  font-size: calc(12.5 * var(--tva-mb-u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tva-mb-texture-cap span {
  font-size: calc(11.5 * var(--tva-mb-u));
  line-height: 1.35;
  opacity: 0.9;
}
.tva-mb-texture:hover .tva-mb-texture-cap,
.tva-mb-texture--swatch .tva-mb-texture-cap { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .tva-mb-texture-cap { transition: opacity 0.18s ease; }
}
.tva-mb-texture--swatch { background: var(--tva-mb-swatch, var(--tva-mb-surface)); }

/* --- Foot: palette + description --- */
.tva-mb-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: calc(20 * var(--tva-mb-u)) calc(32 * var(--tva-mb-u));
  margin-top: var(--tva-mb-gap);
}
.tva-mb-palette {
  display: flex;
  flex-wrap: wrap;
  gap: calc(14 * var(--tva-mb-u));
  margin: 0;
  padding: calc(16 * var(--tva-mb-u)) calc(20 * var(--tva-mb-u));
  list-style: none;
  background: var(--tva-mb-surface);
  border-radius: var(--tva-mb-radius);
}
.tva-mb-color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(6 * var(--tva-mb-u));
  width: calc(64 * var(--tva-mb-u));
}
.tva-mb-color-dot {
  width: calc(44 * var(--tva-mb-u));
  height: calc(44 * var(--tva-mb-u));
  border-radius: 50%;
  /* Keeps very light colours visible on the light card. */
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.tva-mb-color-name {
  font-size: calc(11 * var(--tva-mb-u));
  line-height: 1.3;
  text-align: center;
  color: var(--tva-mb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tva-mb-desc {
  margin: 0;
  max-width: 44ch;
  font-size: calc(15 * var(--tva-mb-u));
  line-height: 1.65;
  color: var(--tva-mb-text);
}
.tva-mb-desc .tva-mb-skel-line { display: block; margin-bottom: calc(10 * var(--tva-mb-u)); }
.tva-mb-desc .tva-mb-skel-line:nth-child(2) { width: 92%; }
.tva-mb-desc .tva-mb-skel-line:nth-child(3) { width: 70%; }

/* --- Status line (progress, errors, empty) --- */
.tva-mb-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: calc(12 * var(--tva-mb-u));
  min-height: calc(28 * var(--tva-mb-u));
  margin-top: calc(18 * var(--tva-mb-u));
  font-size: calc(13.5 * var(--tva-mb-u));
  color: var(--tva-mb-muted);
  text-align: center;
}
.tva-mb-status-text:empty { display: none; }
.tva-mb-root[data-empty="true"] .tva-mb-status { min-height: calc(160 * var(--tva-mb-u)); font-size: calc(15 * var(--tva-mb-u)); }
.tva-mb-status[data-busy="true"] .tva-mb-status-text::before {
  content: "";
  display: inline-block;
  width: calc(8 * var(--tva-mb-u));
  height: calc(8 * var(--tva-mb-u));
  margin-right: calc(10 * var(--tva-mb-u));
  border-radius: 50%;
  background: var(--tva-mb-accent);
  vertical-align: middle;
}
@media (prefers-reduced-motion: no-preference) {
  .tva-mb-status[data-busy="true"] .tva-mb-status-text::before { animation: tva-mb-pulse 1.1s ease-in-out infinite; }
}
@keyframes tva-mb-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}
.tva-mb-retry {
  padding: calc(6 * var(--tva-mb-u)) calc(16 * var(--tva-mb-u));
  border: 1px solid var(--tva-mb-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--tva-mb-accent);
  font-size: calc(13 * var(--tva-mb-u));
  font-weight: 600;
  cursor: pointer;
}
.tva-mb-retry:hover { background: var(--tva-mb-accent); color: var(--tva-mb-on-accent); }

/* --- Skeletons --- */
.tva-mb-skel {
  background: linear-gradient(90deg, #E8E5DD, #F3F1EC, #E8E5DD);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .tva-mb-skel { animation: tva-mb-shimmer 1.5s ease-in-out infinite; }
}
@keyframes tva-mb-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.tva-mb-skel-line {
  display: block;
  height: 0.8em;
  margin: 0.35em 0;
  border-radius: calc(4 * var(--tva-mb-u));
}

/* --- Phones and narrow windows: one column, full screen --- */
.tva-mb-root[data-mobile="true"] { padding: 0; }
.tva-mb-root[data-mobile="true"] .tva-mb-dialog { width: 100%; height: 100%; border-radius: 0; }
.tva-mb-root[data-mobile="true"] .tva-mb-bar { padding-left: calc(18 * var(--tva-mb-u)); }
.tva-mb-root[data-mobile="true"] .tva-mb-scroll { padding: calc(20 * var(--tva-mb-u)) calc(18 * var(--tva-mb-u)) calc(28 * var(--tva-mb-u)); }
.tva-mb-root[data-mobile="true"] .tva-mb-title { font-size: calc(26 * var(--tva-mb-u)); }
.tva-mb-root[data-mobile="true"] .tva-mb-motto { max-width: none; text-align: left; font-size: calc(17 * var(--tva-mb-u)); }
.tva-mb-root[data-mobile="true"] .tva-mb-motto .tva-mb-skel-line { margin-left: 0; }
.tva-mb-root[data-mobile="true"] .tva-mb-grid { grid-template-columns: minmax(0, 1fr); }
.tva-mb-root[data-mobile="true"] .tva-mb-hero { aspect-ratio: 4 / 3; }
/* Two pieces side by side leave ~150px each: name above the button, not beside it. */
.tva-mb-root[data-mobile="true"] .tva-mb-hero[data-count="2"] .tva-mb-anchor-cap {
  flex-direction: column;
  align-items: flex-start;
  gap: calc(8 * var(--tva-mb-u));
}
.tva-mb-root[data-mobile="true"] .tva-mb-hero[data-count="2"] .tva-mb-anchor-name { max-width: 100%; }
.tva-mb-root[data-mobile="true"] .tva-mb-textures { aspect-ratio: 1 / 1; }
/* No hover on touch: captions always on, name only so the texture stays visible. */
.tva-mb-root[data-mobile="true"] .tva-mb-texture-cap { opacity: 1; }
.tva-mb-root[data-mobile="true"] .tva-mb-texture-cap span { display: none; }
.tva-mb-root[data-mobile="true"] .tva-mb-foot { grid-template-columns: minmax(0, 1fr); }
.tva-mb-root[data-mobile="true"] .tva-mb-palette {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  row-gap: calc(16 * var(--tva-mb-u));
}
.tva-mb-root[data-mobile="true"] .tva-mb-pdf { padding: 0 calc(10 * var(--tva-mb-u)); }

/* Same layout for a narrow desktop window (the data attribute covers phones
   inside 3DVista, where this query can't match). */
@media (max-width: 760px) {
  .tva-mb-root { padding: 0; }
  .tva-mb-dialog { width: 100%; height: 100%; border-radius: 0; }
  .tva-mb-scroll { padding: 20px 18px 28px; }
  .tva-mb-motto { max-width: none; text-align: left; }
  .tva-mb-motto .tva-mb-skel-line { margin-left: 0; }
  .tva-mb-grid { grid-template-columns: minmax(0, 1fr); }
  .tva-mb-hero { aspect-ratio: 4 / 3; }
  .tva-mb-hero[data-count="2"] .tva-mb-anchor-cap { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tva-mb-hero[data-count="2"] .tva-mb-anchor-name { max-width: 100%; }
  .tva-mb-textures { aspect-ratio: 1 / 1; }
  .tva-mb-texture-cap { opacity: 1; }
  .tva-mb-texture-cap span { display: none; }
  .tva-mb-foot { grid-template-columns: minmax(0, 1fr); }
  .tva-mb-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); justify-items: center; row-gap: 16px; }
}


/* Per-tour theme override for febal-casa — only CSS variables, never structural rules.
   Primary red (#E20613) sampled directly from the official logo asset
   (tour-project/febal-casa/native-skin/logo.png). Two variants below —
   swap which block is active while reviewing with the client; keep only one. */

/* --- Variant A: light & warm, close to febalcasa.com's own site feel ---
   ACTIVE default while the client hasn't confirmed light vs dark (2026-08-23). --- */
.tva-root {
  --assistant-primary: #E20613;
  --assistant-primary-hover: #B80510;
  --assistant-bg: #FBFAF6;
  --assistant-bg-elevated: #F1EFE8;
  --assistant-text: #0A0C06;
  --assistant-text-muted: #5C5C55;
  --assistant-border: #D6D6D6;
}

/* --- Variant B: dark, same structure as the demo tours, red accent ---
.tva-root {
  --assistant-primary: #E20613;
  --assistant-primary-hover: #B80510;
  --assistant-bg: #0A0C06;
  --assistant-bg-elevated: #17190F;
  --assistant-text: #FBFAF6;
  --assistant-text-muted: #A8A89C;
  --assistant-border: #343E47;
}
--- */

