/* =====================================================================
   REVDOT WIDGET v2 — embed styles
   Scoped under .rvf-host so it never bleeds into the host site.
   Companion to script.js + embed.html.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Theme tokens ---------- */
.rvf-host {
  --e: cubic-bezier(.2, .8, .2, 1);

  /* text */
  --t:  #f5f6f7;
  --tm: rgba(245, 246, 247, .62);
  --tf: rgba(245, 246, 247, .38);

  /* accent */
  --a:   #51A35A;
  --as:  #6BBF74;
  --asf: rgba(81, 163, 90, .16);

  /* neutrals on dark */
  --bd:  rgba(255, 255, 255, .07);
  --bds: rgba(255, 255, 255, .14);
  --s2:  rgba(255, 255, 255, .04);
  --s3:  rgba(255, 255, 255, .07);

  /* composer */
  --comp-bg:   rgba(0, 0, 0, .45);
  --comp-bg-f: rgba(0, 0, 0, .6);
  --comp-bd:   rgba(255, 255, 255, .08);
  --comp-bd-f: rgba(255, 255, 255, .18);

  /* pills */
  --pill-bg:   rgba(0, 0, 0, .3);
  --pill-bg-h: rgba(0, 0, 0, .4);
  --pill-bd:   rgba(255, 255, 255, .06);
  --pill-bd-h: rgba(255, 255, 255, .14);
  --pill-act:  rgba(255, 255, 255, .08);

  /* send button */
  --send-bg:   rgba(255, 255, 255, .92);
  --send-bg-h: #fff;
  --send-fg:   #0a0b0d;

  /* user message bubble */
  --user-bg: #fff;
  --user-fg: #0a0b0d;

  /* widget shell */
  --widget-bg: rgba(14, 16, 20, .62);
  --widget-bd: rgba(255, 255, 255, .08);
  --widget-sh:
    0 30px 80px -30px rgba(0, 0, 0, .7),
    0 12px 40px -8px rgba(0, 0, 0, .4),
    inset 0 1px 0 rgba(255, 255, 255, .06);

  /* footer tabs */
  --tab-bg:  rgba(255, 255, 255, .04);
  --tab-bd:  rgba(255, 255, 255, .06);
  --tab-act: rgba(255, 255, 255, .08);

  /* misc */
  --scroll:      rgba(255, 255, 255, .08);
  --radio-bd:    rgba(255, 255, 255, .18);
  --input-f-bg:  rgba(26, 28, 33, .85);
  --sug-bd:      rgba(255, 255, 255, .1);
  --sug-h:       rgba(255, 255, 255, .04);
  --opt-sel:     rgba(81, 163, 90, .06);
  --toggle-sh:   0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .2);

  /* darker boxed rows (FAQ etc.) — embed-style */
  --row-bg:    rgba(0, 0, 0, .25);
  --row-bg-h:  rgba(0, 0, 0, .35);
  --row-bd:    rgba(255, 255, 255, .06);
  --row-bd-h:  rgba(255, 255, 255, .12);

  /* Widget background image — local file by default (./bg.webp).
     Replace with your hosted asset URL when shipping to Webflow.
     The image stays sharp (no blur) and is revealed at the top of the home view
     by a vertical gradient that fades to opaque at the bottom. */
  --widget-bg-image: url('./bg.webp');

  /* Solid color shown OVER the image in chat/flow views */
  --widget-solid: rgba(10, 12, 16, .97);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--t);
  -webkit-font-smoothing: antialiased;
}


.rvf-host[data-theme="light"] {
  --t:  #1d1d1f;
  --tm: rgba(29, 29, 31, .62);
  --tf: rgba(29, 29, 31, .42);

  --a:   #51A35A;
  --as:  #3f8748;
  --asf: rgba(81, 163, 90, .1);

  --bd:  rgba(0, 0, 0, .08);
  --bds: rgba(0, 0, 0, .14);
  --s2:  rgba(0, 0, 0, .03);
  --s3:  rgba(0, 0, 0, .06);

  --comp-bg:   rgba(255, 255, 255, .7);
  --comp-bg-f: rgba(255, 255, 255, .92);
  --comp-bd:   rgba(0, 0, 0, .08);
  --comp-bd-f: rgba(0, 0, 0, .18);

  --pill-bg:   rgba(0, 0, 0, .04);
  --pill-bg-h: rgba(0, 0, 0, .06);
  --pill-bd:   rgba(0, 0, 0, .06);
  --pill-bd-h: rgba(0, 0, 0, .12);
  --pill-act:  #fff;

  --send-bg:   #1d1d1f;
  --send-bg-h: #000;
  --send-fg:   #fff;

  --user-bg: #1d1d1f;
  --user-fg: #fff;

  --widget-bg: rgba(255, 255, 255, .86);
  --widget-solid: rgba(245, 246, 247, .97);
  --widget-bd: rgba(0, 0, 0, .08);
  --widget-sh:
    0 30px 80px -30px rgba(0, 0, 0, .22),
    0 8px 32px -8px rgba(0, 0, 0, .1),
    inset 0 1px 0 rgba(255, 255, 255, .7);

  --tab-bg:  rgba(0, 0, 0, .04);
  --tab-bd:  rgba(0, 0, 0, .06);
  --tab-act: #fff;

  --scroll:     rgba(0, 0, 0, .14);
  --radio-bd:   rgba(0, 0, 0, .2);
  --input-f-bg: rgba(255, 255, 255, .95);
  --sug-bd:     rgba(0, 0, 0, .1);
  --sug-h:      rgba(0, 0, 0, .04);
  --opt-sel:    rgba(81, 163, 90, .08);
  --toggle-sh:  0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .06);

  --row-bg:   rgba(0, 0, 0, .03);
  --row-bg-h: rgba(0, 0, 0, .06);
  --row-bd:   rgba(0, 0, 0, .08);
  --row-bd-h: rgba(0, 0, 0, .14);
}

.rvf-host *,
.rvf-host *::before,
.rvf-host *::after { box-sizing: border-box; }

.rvf-host button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.rvf-host button,
.rvf-host [role="button"] { cursor: pointer; }


/* ---------- Trigger pill ----------
   Minimal near-black glass pill ("Kysy tekoälyltä"). No gradients, no ring
   animation — just a flat 37%-opaque dark fill, a 40px blur of the backdrop,
   and one hairline border. Clicking it opens the mini composer popup. */
.rvf-host .rvf-trigger {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 2147483646;
  height: 54px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 11, 13, .5);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  backdrop-filter: blur(40px) saturate(140%);
  color: #fff;
  font-family: 'Inter Display', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 15px; font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  transition:
    transform .3s var(--e),
    opacity   .3s var(--e),
    box-shadow .3s var(--e),
    background .25s var(--e);
}
.rvf-host .rvf-trigger:hover {
  transform: translateY(-2px);
  background: rgba(16, 18, 22, .58);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .65);
}
.rvf-host .rvf-trigger:active { transform: translateY(0) scale(.99); }
/* Hidden while the full widget OR the mini popup is open */
.rvf-host .rvf-trigger[data-open="true"],
.rvf-host .rvf-trigger[data-pop="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.9);
}

.rvf-host .rvf-trigger__icon {
  position: relative;
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
}
.rvf-host .rvf-trigger__label { line-height: 1; }


/* ---------- Mini composer popup ----------
   Opens from the pill: a compact widget-v2-style composer (input + send + a
   couple of quick chips) anchored in the corner. An X closes it back to the
   pill. Submitting a message — or tapping a chip — hands off to the full
   widget chat. */
.rvf-host .rvf-pop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483646;
  width: 340px;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transform-origin: bottom right;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition:
    opacity   .3s var(--e),
    transform .3s var(--e);
}
.rvf-host .rvf-pop[data-show="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Force a dark, deeper composer regardless of the page's theme — the input
   stays dark-mode even on a light site, with a heavier ~55% backdrop. */
.rvf-host .rvf-pop {
  --comp-bg:   rgba(0, 0, 0, .55);
  --comp-bg-f: rgba(0, 0, 0, .66);
  --comp-bd:   rgba(255, 255, 255, .10);
  --comp-bd-f: rgba(255, 255, 255, .20);
  --t:   #f5f6f7;
  --tm:  rgba(245, 246, 247, .62);
  --tf:  rgba(245, 246, 247, .42);
  --a:   #6BBF74;
  --pill-bg:    rgba(255, 255, 255, .06);
  --pill-bd:    rgba(255, 255, 255, .10);
  --pill-bg-h:  rgba(255, 255, 255, .12);
  --send-bg:    rgba(255, 255, 255, .92);
  --send-bg-h:  #fff;
  --send-fg:    #0a0b0d;
  --widget-bg:  rgba(14, 16, 20, .72);
  --widget-bd:  rgba(255, 255, 255, .12);
}

/* Reuse .rvf-composer for the input; just float it with a deeper shadow */
.rvf-host .rvf-pop .rvf-composer {
  margin-top: 0;
  box-shadow:
    0 24px 60px -18px rgba(0, 0, 0, .62),
    0 8px 24px -8px rgba(0, 0, 0, .42);
}

.rvf-host .rvf-pop__brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: -.01em;
  color: var(--tm);
}
.rvf-host .rvf-pop__brand svg { color: var(--a); }

.rvf-host .rvf-pop__close {
  position: absolute;
  top: -10px; right: -10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--t);
  background: var(--widget-bg);
  border: 1px solid var(--widget-bd);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, .5);
  transition: background .2s var(--e), transform .2s var(--e);
  z-index: 1;
}
.rvf-host .rvf-pop__close:hover {
  background: var(--pill-bg-h);
  transform: scale(1.07);
}

@media (prefers-reduced-motion: reduce) {
  .rvf-host .rvf-pop { transition: opacity .2s linear; transform: none; }
  .rvf-host .rvf-pop[data-show="true"] { transform: none; }
}


/* ---------- Backdrop ---------- */
.rvf-host .rvf-backdrop {
  position: fixed; inset: 0;
  z-index: 2147483645;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  pointer-events: none;
  transition: background .4s var(--e), backdrop-filter .4s var(--e);
}
.rvf-host .rvf-backdrop[data-open="true"] {
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
}
.rvf-host[data-theme="light"] .rvf-backdrop[data-open="true"] {
  background: rgba(0, 0, 0, .18);
}


/* ---------- Widget panel (full-height side sheet — slides from right) ---------- */
.rvf-host .rvf-widget {
  position: fixed;
  z-index: 2147483647;
  top: 0; right: 0; bottom: 0;
  width: 540px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  border-radius: 24px 0 0 24px;
  background-color: #0a0b0d; /* fallback if image fails */
  border: 1px solid var(--widget-bd);
  border-right: 0;
  box-shadow: var(--widget-sh);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  pointer-events: none;
  transition:
    transform   .55s var(--e),
    border-color .3s var(--e),
    box-shadow   .3s var(--e);
  will-change: transform;
}
.rvf-host[data-theme="light"] .rvf-widget {
  background-color: #f7f7f7;
}
.rvf-host .rvf-widget[data-open="true"] {
  transform: translateX(0);
  pointer-events: auto;
}

/* Layer 1: background image — sharp, no blur */
.rvf-host .rvf-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--widget-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

/* Layer 2: dynamic overlay — gradient fade in HOME, solid in CHAT/FLOW */
.rvf-host .rvf-widget::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 16, 0)    0%,
    rgba(10, 12, 16, 0)    22%,
    rgba(10, 12, 16, .45)  42%,
    rgba(10, 12, 16, .9)   60%,
    rgba(10, 12, 16, .98)  78%,
    rgba(10, 12, 16, 1)    92%
  );
  pointer-events: none;
  z-index: 1;
  transition: background .35s var(--e);
}
.rvf-host[data-theme="light"] .rvf-widget::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0)   0%,
    rgba(255, 255, 255, 0)   22%,
    rgba(255, 255, 255, .55) 42%,
    rgba(255, 255, 255, .92) 60%,
    rgba(255, 255, 255, .98) 78%,
    rgba(255, 255, 255, 1)   92%
  );
}

/* In CHAT/FLOW views, replace gradient with a tinted blur layer
   (image stays visible underneath, frosted) */
.rvf-host .rvf-widget[data-active-view="chat"]::after,
.rvf-host .rvf-widget[data-active-view="flow"]::after {
  background: rgba(10, 12, 16, .55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.rvf-host[data-theme="light"] .rvf-widget[data-active-view="chat"]::after,
.rvf-host[data-theme="light"] .rvf-widget[data-active-view="flow"]::after {
  background: rgba(245, 246, 247, .55);
}


/* ---------- Header (safe-area aware) ---------- */
.rvf-host .rvf-widget__header {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top, 12px)) 14px 12px;
  border-bottom: 1px solid transparent; /* keep height stable; show only in chat/flow */
  flex-shrink: 0;
}
.rvf-host .rvf-widget[data-active-view="chat"] .rvf-widget__header,
.rvf-host .rvf-widget[data-active-view="flow"] .rvf-widget__header {
  border-bottom-color: var(--bd);
}
.rvf-host .rvf-widget__logo {
  display: inline-flex; align-items: center; gap: 8px;
  padding-left: 8px;
  font-size: 16px; font-weight: 700;
  letter-spacing: -.025em;
  color: var(--t);
}
.rvf-host .rvf-widget__logo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 10px var(--a);
}
.rvf-host .rvf-widget__actions { display: flex; gap: 2px; }
.rvf-host .rvf-icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--t);
  opacity: .82;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s var(--e);
}
.rvf-host .rvf-icon-btn:hover {
  color: var(--t);
  opacity: 1;
  background: var(--s3);
  border-color: var(--bd);
}
.rvf-host .rvf-icon-btn.is-spinning svg { animation: rvfSpin .6s var(--e); }
@keyframes rvfSpin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }


/* ---------- Body & view container ---------- */
.rvf-host .rvf-widget__body {
  position: relative; z-index: 2;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rvf-host .rvf-view {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .3s var(--e), transform .35s var(--e);
}
.rvf-host .rvf-view.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* ---------- Home view (vertically centered hero block + below stack) ---------- */
.rvf-host .rvf-view--home { overflow: hidden; }
.rvf-host .rvf-home__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scroll-behavior: smooth;
}
.rvf-host .rvf-home__scroll::-webkit-scrollbar { width: 6px; }
.rvf-host .rvf-home__scroll::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 999px; }

/* (Feature media card removed — using a widget-wide background image instead) */
/* hero gets auto top → pushes the whole content stack toward vertical center */
.rvf-host .rvf-home__hero {
  margin-top: auto;
  display: flex; flex-direction: column;
  gap: 12px;
}
/* the bottom-most child gets auto bottom → centers the stack as a group */
.rvf-host .rvf-home__cta {
  margin-bottom: auto;
}

.rvf-host .rvf-home__title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0;
  color: var(--t);
}
.rvf-host .rvf-home__sub {
  font-size: 14px;
  color: var(--tm);
  line-height: 1.5;
  margin: 0;
}


/* ---------- Composer ---------- */
.rvf-host .rvf-composer {
  position: relative;
  display: flex; flex-direction: column;
  padding: 14px 16px 10px;
  background: var(--comp-bg);
  border: 1px solid var(--comp-bd);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  transition: border-color .25s var(--e), background .25s var(--e);
  margin-top: 6px; /* gap from hero text */
}
.rvf-host .rvf-composer:focus-within {
  border-color: var(--comp-bd-f);
  background: var(--comp-bg-f);
}
.rvf-host .rvf-composer__textarea {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--t);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  resize: none;
  padding: 4px 0 10px;
  min-height: 44px;
  max-height: 140px;
  transition: color .25s var(--e);
}
.rvf-host .rvf-composer__textarea::placeholder { color: var(--tf); }
.rvf-host .rvf-composer__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.rvf-host .rvf-composer__left,
.rvf-host .rvf-composer__right {
  display: flex; align-items: center; gap: 6px;
}

.rvf-host .rvf-theme {
  display: inline-flex; align-items: center;
  background: var(--pill-bg);
  border: 1px solid var(--pill-bd);
  border-radius: 999px;
  padding: 2px;
  transition: background .25s var(--e), border-color .25s var(--e);
}
.rvf-host .rvf-theme__btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--tm);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  transition: color .2s var(--e), background .25s var(--e), box-shadow .25s var(--e);
}
.rvf-host .rvf-theme__btn:hover { color: var(--t); }
.rvf-host .rvf-theme__btn.is-active {
  background: var(--pill-act);
  color: var(--t);
  box-shadow: var(--toggle-sh);
}

.rvf-host .rvf-composer__model {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 9px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-bd);
  border-radius: 999px;
  color: var(--t);
  font-size: 12px; font-weight: 500;
  transition: all .2s var(--e);
}
.rvf-host .rvf-composer__model svg:first-child { color: var(--a); }
.rvf-host .rvf-composer__model:hover {
  border-color: var(--pill-bd-h);
  background: var(--pill-bg-h);
}

.rvf-host .rvf-composer__send {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--send-bg);
  color: var(--send-fg);
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s var(--e);
  margin-left: 4px;
}
.rvf-host .rvf-composer__send:hover {
  background: var(--send-bg-h);
  transform: translateY(-1px);
}


/* ---------- Quick chips on home ---------- */
.rvf-host .rvf-home__chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0;
}
.rvf-host .rvf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: var(--s2);
  border: 1px solid var(--bd);
  color: var(--tm);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px; font-weight: 500;
  transition: all .2s var(--e);
}
.rvf-host .rvf-chip:hover {
  background: var(--s3);
  color: var(--t);
  border-color: var(--bds);
  transform: translateY(-1px);
}
.rvf-host .rvf-chip svg { opacity: .7; }
.rvf-host .rvf-chip--accent {
  background: var(--asf);
  border-color: rgba(81, 163, 90, .3);
  color: var(--a);
}
.rvf-host .rvf-chip--accent:hover {
  background: rgba(81, 163, 90, .22);
  color: var(--as);
}
.rvf-host[data-theme="light"] .rvf-chip {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(0, 0, 0, .06);
  color: var(--t);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
}
.rvf-host[data-theme="light"] .rvf-chip:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, .12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .06);
}
.rvf-host[data-theme="light"] .rvf-chip--accent {
  background: rgba(81, 163, 90, .14);
  border-color: rgba(81, 163, 90, .4);
  color: var(--as);
}


/* ---------- FAQ section (darker, embed-style boxes) ---------- */
.rvf-host .rvf-home__section {
  display: flex; flex-direction: column;
  gap: 8px;
}
.rvf-host .rvf-home__heading {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tf);
  padding: 0 2px;
  margin: 0;
}
.rvf-host .rvf-home__suggestions {
  display: flex; flex-direction: column;
  gap: 6px;
}
.rvf-host .rvf-home__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--row-bg);
  border: 1px solid var(--row-bd);
  border-radius: 12px;
  color: var(--t);
  font-family: inherit;
  font-size: 14px; font-weight: 500;
  text-align: left;
  transition: all .2s var(--e);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.rvf-host .rvf-home__row:hover {
  background: var(--row-bg-h);
  border-color: var(--row-bd-h);
  transform: translateX(2px);
}
.rvf-host .rvf-home__row-arrow {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--tm);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s var(--e);
}
.rvf-host[data-theme="light"] .rvf-home__row-arrow {
  background: rgba(0, 0, 0, .06);
}
.rvf-host .rvf-home__row:hover .rvf-home__row-arrow {
  background: var(--a);
  color: #fff;
  transform: rotate(-45deg);
}


/* ---------- CTA card ---------- */
.rvf-host .rvf-home__cta {
  margin: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 16px 18px;
  background: linear-gradient(135deg, rgba(81, 163, 90, .18) 0%, rgba(81, 163, 90, .06) 100%);
  border: 1px solid rgba(81, 163, 90, .3);
  border-radius: 16px;
  transition: all .25s var(--e);
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.rvf-host .rvf-home__cta:hover {
  border-color: rgba(81, 163, 90, .5);
  background: linear-gradient(135deg, rgba(81, 163, 90, .25) 0%, rgba(81, 163, 90, .1) 100%);
  transform: translateY(-1px);
}
.rvf-host .rvf-home__cta-content {
  min-width: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.rvf-host .rvf-home__cta-title {
  display: block;
  font-size: 14.5px; font-weight: 600;
  color: var(--t);
  margin: 0;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.rvf-host .rvf-home__cta-sub {
  display: block;
  font-size: 12px;
  color: var(--tm);
  margin: 0;
  line-height: 1.4;
}
.rvf-host .rvf-home__cta-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: var(--a);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  transition: all .2s var(--e);
}
.rvf-host .rvf-home__cta-btn:hover {
  background: var(--as);
  transform: translateX(2px);
}


/* ---------- Chat view ---------- */
.rvf-host .rvf-view--chat { padding: 0; }
.rvf-host .rvf-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 8px;
  display: flex; flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.rvf-host .rvf-chat::-webkit-scrollbar { width: 6px; }
.rvf-host .rvf-chat::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 999px; }

.rvf-host .rvf-msg { max-width: 92%; animation: rvfMi .35s var(--e); }
@keyframes rvfMi {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rvf-host .rvf-msg--user { align-self: flex-end; max-width: 84%; }
.rvf-host .rvf-msg--user .rvf-msg__bubble {
  padding: 9px 16px;
  background: var(--user-bg);
  color: var(--user-fg);
  border: 0;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}
.rvf-host .rvf-msg--ai {
  align-self: flex-start;
  display: block;
  padding: 2px 4px 6px;
}
.rvf-host .rvf-msg--ai .rvf-msg__bubble {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--t);
}
.rvf-host .rvf-msg__bubble p { margin: 0 0 10px; }
.rvf-host .rvf-msg__bubble p:last-child { margin-bottom: 0; }
.rvf-host .rvf-msg__bubble ul { margin: 8px 0; padding-left: 18px; list-style: disc; }
.rvf-host .rvf-msg__bubble li { margin-bottom: 6px; }
.rvf-host .rvf-msg__bubble strong { color: var(--t); font-weight: 600; }

.rvf-host .rvf-typing { display: inline-flex; gap: 4px; align-items: center; }
.rvf-host .rvf-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tm);
  animation: rvfBn 1.2s ease-in-out infinite;
}
.rvf-host .rvf-typing span:nth-child(2) { animation-delay: .15s; }
.rvf-host .rvf-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rvfBn {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.rvf-host .rvf-msg__actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.rvf-host .rvf-msg__action {
  padding: 7px 13px;
  background: rgba(81, 163, 90, .1);
  border: 1px solid rgba(81, 163, 90, .3);
  color: var(--a);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px; font-weight: 500;
  transition: all .2s var(--e);
}
.rvf-host .rvf-msg__action:hover { background: rgba(81, 163, 90, .2); }

.rvf-host .rvf-chat__suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px 22px 8px;
}
.rvf-host .rvf-chat__suggestions:empty { display: none; }
.rvf-host .rvf-chat__suggestions .rvf-chip {
  font-size: 12px;
  padding: 5px 11px;
  background: transparent;
  border-color: var(--sug-bd);
}
.rvf-host .rvf-chat__suggestions .rvf-chip:hover { background: var(--sug-h); }

.rvf-host .rvf-composer--bottom {
  margin: 6px 16px 8px;
  border-radius: 16px;
  padding: 12px 14px 8px;
  flex-shrink: 0;
}


/* ---------- Flow (multistep) view ---------- */
.rvf-host .rvf-view--flow {
  padding: 18px 20px;
  overflow-y: auto;
}
.rvf-host .rvf-view--flow::-webkit-scrollbar { width: 6px; }
.rvf-host .rvf-view--flow::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 999px; }

.rvf-host .rvf-flow {
  display: flex; flex-direction: column;
  gap: 16px;
  min-height: 100%;
}
.rvf-host .rvf-flow__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--tm);
}
.rvf-host .rvf-flow__back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px;
  background: transparent;
  border: 1px solid var(--bd);
  color: var(--tm);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  transition: all .2s var(--e);
}
.rvf-host .rvf-flow__back:hover { color: var(--t); background: var(--s3); }
.rvf-host .rvf-flow__step-label { font-weight: 500; color: var(--t); }
.rvf-host .rvf-flow__price strong { color: var(--a); font-weight: 600; }

.rvf-host .rvf-flow__progress {
  height: 3px;
  background: var(--s3);
  border-radius: 999px;
  overflow: hidden;
}
.rvf-host .rvf-flow__progress-bar {
  height: 100%;
  width: 20%;
  background: var(--a);
  border-radius: inherit;
  transition: width .4s var(--e);
}
.rvf-host .rvf-flow__content {
  /* Pull the heading + options downward; the footer's margin-bottom: auto
     pulls upward — together they centre as a tight group. */
  margin-top: auto;
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 6px 2px;
}
.rvf-host .rvf-flow__heading {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.025em;
  margin: 0;
  line-height: 1.2;
  color: var(--t);
}
.rvf-host .rvf-flow__desc {
  font-size: 13.5px;
  color: var(--tm);
  margin: 0 0 4px;
  line-height: 1.5;
}
.rvf-host .rvf-flow__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 4px;
}
.rvf-host .rvf-flow__option {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 44px 13px 16px;
  background: var(--row-bg);
  border: 1px solid var(--row-bd);
  border-radius: 14px;
  color: var(--t);
  font-family: inherit;
  text-align: left;
  transition: all .2s var(--e);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.rvf-host .rvf-flow__option:hover {
  background: var(--row-bg-h);
  border-color: var(--row-bd-h);
  transform: translateY(-1px);
}
.rvf-host .rvf-flow__option.is-selected {
  border-color: var(--a);
  background: var(--opt-sel);
  box-shadow: 0 0 0 1px var(--a);
}
.rvf-host .rvf-flow__option-radio {
  position: absolute; top: 16px; right: 16px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--radio-bd);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--e);
}
.rvf-host .rvf-flow__option.is-selected .rvf-flow__option-radio {
  border-color: var(--a);
  background: var(--a);
}
.rvf-host .rvf-flow__option.is-selected .rvf-flow__option-radio::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
}
.rvf-host .rvf-flow__option-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.rvf-host .rvf-flow__option-sub { font-size: 12.5px; color: var(--tm); }
.rvf-host .rvf-flow__option-price { margin-top: 6px; font-size: 12px; color: var(--a); font-weight: 600; }

.rvf-host .rvf-flow__input {
  display: flex; flex-direction: column;
  gap: 6px;
}
.rvf-host .rvf-flow__input label { font-size: 12px; color: var(--tm); font-weight: 500; }
.rvf-host .rvf-flow__input input,
.rvf-host .rvf-flow__input textarea {
  background: var(--row-bg);
  border: 1px solid var(--row-bd);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--t);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all .2s var(--e);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.rvf-host .rvf-flow__input textarea { min-height: 80px; resize: vertical; }
.rvf-host .rvf-flow__input input:focus,
.rvf-host .rvf-flow__input textarea:focus {
  border-color: var(--a);
  background: var(--input-f-bg);
  box-shadow: 0 0 0 4px var(--asf);
}

.rvf-host .rvf-flow__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--row-bg);
  border: 1px solid var(--row-bd);
  border-radius: 16px;
  margin-top: 12px;     /* small gap between options and footer */
  margin-bottom: auto;  /* together with content's margin-top: auto, centres the pair */
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.rvf-host .rvf-flow__price-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tf);
  font-weight: 600;
  margin-bottom: 2px;
}
.rvf-host .rvf-flow__price-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--t);
}
.rvf-host .rvf-flow__price-extra {
  font-size: 11.5px;
  color: var(--tm);
  margin-top: 2px;
}

.rvf-host .rvf-flow__success { text-align: center; padding: 30px 20px; }
.rvf-host .rvf-flow__success-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--asf);
  border: 1px solid var(--a);
  color: var(--a);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.rvf-host .rvf-flow__success h3 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--t);
}
.rvf-host .rvf-flow__success p {
  color: var(--tm);
  font-size: 14px;
  margin: 0;
  line-height: 1.55;
}

.rvf-host .rvf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0;
  background: var(--a);
  color: #fff;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  padding: 12px 18px;
  border-radius: 999px;
  transition: all .2s var(--e);
  white-space: nowrap;
}
.rvf-host .rvf-btn:hover { background: var(--as); transform: translateY(-1px); }


/* ---------- Footer (safe-area aware) ---------- */
.rvf-host .rvf-widget__footer {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom, 10px));
  border-top: 1px solid var(--bd);
  flex-shrink: 0;
}
.rvf-host .rvf-widget__powered {
  font-size: 11px;
  color: var(--tf);
  display: inline-flex; align-items: center; gap: 4px;
}
.rvf-host .rvf-widget__powered .rvf-bolt { color: var(--a); }
.rvf-host .rvf-widget__nav-tabs {
  display: flex; gap: 2px;
  padding: 3px;
  background: var(--tab-bg);
  border: 1px solid var(--tab-bd);
  border-radius: 999px;
}
.rvf-host .rvf-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: transparent;
  border: 0;
  color: var(--tm);
  font-family: inherit;
  font-size: 11.5px; font-weight: 500;
  border-radius: 999px;
  transition: all .2s var(--e);
}
.rvf-host .rvf-tab:hover { color: var(--t); }
.rvf-host .rvf-tab.is-active {
  background: var(--tab-act);
  color: var(--t);
  box-shadow: var(--toggle-sh);
}


/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .rvf-host .rvf-trigger {
    bottom: 18px; right: 18px;
    height: 50px;
    padding: 0 18px 0 14px;
    font-size: 14px;
  }
  .rvf-host .rvf-pop {
    right: 18px; bottom: 18px;
    width: calc(100vw - 36px);
  }
  .rvf-host .rvf-widget {
    bottom: 0; right: 0; left: 0; top: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    max-width: none;
    border-radius: 0;
    border-left: 0;
  }
  .rvf-host .rvf-widget__header {
    padding: max(12px, env(safe-area-inset-top, 12px)) 12px 10px;
  }
  .rvf-host .rvf-icon-btn { width: 38px; height: 38px; }
  .rvf-host .rvf-home__scroll { padding: 16px; gap: 18px; }
  .rvf-host .rvf-home__title { font-size: 24px; }
  .rvf-host .rvf-view--flow { padding: 14px 16px; }
  .rvf-host .rvf-flow__heading { font-size: 19px; }
  .rvf-host .rvf-flow__top { flex-wrap: wrap; gap: 8px; }
  .rvf-host .rvf-flow__footer { flex-direction: column; align-items: stretch; }
  .rvf-host .rvf-flow__footer .rvf-btn { justify-content: center; width: 100%; }
  .rvf-host .rvf-composer__model { display: none; }
  .rvf-host .rvf-chat { padding: 16px 16px 6px; }
  .rvf-host .rvf-chat__suggestions { padding: 6px 16px 6px; }
  .rvf-host .rvf-composer--bottom { margin: 6px 12px 6px; }
  .rvf-host .rvf-widget__powered { display: none; }
  .rvf-host .rvf-widget__nav-tabs { width: 100%; justify-content: center; }
  .rvf-host .rvf-tab { flex: 1; justify-content: center; padding: 7px 10px; }
}

body.rvf-locked { overflow: hidden; }
@media (min-width: 601px) { body.rvf-locked { overflow: auto; } }
