/* VALBEN V5.107 — circular reveal from the assistant launcher and smooth reverse.
   Visual layer only. Does not alter SVG, canonical CSS, mic, transcription or GPT live. */

/* The FAB is 1.3 times larger than V5.106. Desktop 62 -> 81; mobile 58 -> 75. */
#valbenVoiceLauncher {
  width:81px!important;
  min-width:81px!important;
  height:81px!important;
}
#valbenVoiceLauncher .valben-launch-orb {
  width:60px!important;
  height:60px!important;
}
#valbenVoiceLauncher svg {
  width:39px!important;
  height:39px!important;
}
@media (max-width:520px) {
  #valbenVoiceLauncher {
    width:75px!important;
    min-width:75px!important;
    height:75px!important;
  }
}

/* Keep full overlay after opening is complete. Exact coordinates are computed
   from #valbenVoiceLauncher's screen rectangle before the session begins. */
#valbenVoiceFullscreen.valben-open:not([hidden]) {
  -webkit-clip-path:circle(var(--valben107-radius, 200vmax) at var(--valben107-x, 100%) var(--valben107-y, 100%));
  clip-path:circle(var(--valben107-radius, 200vmax) at var(--valben107-x, 100%) var(--valben107-y, 100%));
}

#valbenVoiceFullscreen.valben-open.valben-v107-opening:not([hidden]) {
  animation:valben107-expand 670ms cubic-bezier(.19,.72,.25,1) both!important;
}
#valbenVoiceFullscreen.valben-open.valben-v107-closing:not([hidden]) {
  animation:valben107-retract 480ms cubic-bezier(.58,.02,.86,.35) both!important;
  pointer-events:none!important;
}

@keyframes valben107-expand {
  0% {
    -webkit-clip-path:circle(0px at var(--valben107-x) var(--valben107-y));
    clip-path:circle(0px at var(--valben107-x) var(--valben107-y));
  }
  100% {
    -webkit-clip-path:circle(var(--valben107-radius) at var(--valben107-x) var(--valben107-y));
    clip-path:circle(var(--valben107-radius) at var(--valben107-x) var(--valben107-y));
  }
}
@keyframes valben107-retract {
  0% {
    -webkit-clip-path:circle(var(--valben107-radius) at var(--valben107-x) var(--valben107-y));
    clip-path:circle(var(--valben107-radius) at var(--valben107-x) var(--valben107-y));
  }
  100% {
    -webkit-clip-path:circle(0px at var(--valben107-x) var(--valben107-y));
    clip-path:circle(0px at var(--valben107-x) var(--valben107-y));
  }
}

/* Keep V5.106 smooth-in exactly, with a small lead-in to match expansion. */
#valbenVoiceFullscreen.valben-v107-opening .valben-visual-stage {
  animation-delay:120ms!important;
}

/* Logo/halo disappear smoothly during retract, not abruptly with the page. */
#valbenVoiceFullscreen.valben-v107-closing .valben-visual-stage {
  animation:valben107-visual-out 380ms cubic-bezier(.6,0,.98,.55) both!important;
}
#valbenVoiceFullscreen.valben-v107-closing .valben-caption-wrap,
#valbenVoiceFullscreen.valben-v107-closing #valbenVoiceClose {
  animation:valben107-controls-out 220ms ease-in both!important;
}
@keyframes valben107-visual-out {
  from { opacity:1; transform:scale(1); }
  to { opacity:0; transform:scale(.53); }
}
@keyframes valben107-controls-out {
  from { opacity:1; transform:translateY(0); }
  to { opacity:0; transform:translateY(10px); }
}

@media (prefers-reduced-motion:reduce) {
  #valbenVoiceFullscreen.valben-v107-opening,
  #valbenVoiceFullscreen.valben-v107-closing,
  #valbenVoiceFullscreen.valben-v107-closing .valben-visual-stage,
  #valbenVoiceFullscreen.valben-v107-closing .valben-caption-wrap,
  #valbenVoiceFullscreen.valben-v107-closing #valbenVoiceClose {
    animation:none!important;
    -webkit-clip-path:none!important;
    clip-path:none!important;
  }
}
