/* HELFANO INTERACTIVE ASSISTANT */

html.helfano-assistant-pending,
html.helfano-assistant-active {
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-gutter: stable;
}
html.helfano-assistant-pending body,
html.helfano-assistant-active body {
  overflow: hidden !important;
  overscroll-behavior: none;
}
#helfano-assistant {
  --assistant-avatar-size: clamp(150px, 13vw, 190px);
  position: fixed;
  inset: 0;
  z-index: 32760;
  display: none;
  width: var(--assistant-viewport-width, 100vw);
  height: 100%;
  height: 100dvh;
  isolation: isolate;
  place-items: center;
  pointer-events: none;
  color: #f3f6f6;
  color-scheme: dark;
  font-family: "Manrope", sans-serif;
}
html.helfano-assistant-pending #helfano-assistant,
#helfano-assistant[data-ready] { display: grid; }
#helfano-assistant:focus, #helfano-speech:focus { outline: none; }
.helfano-assistant__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: auto;
  background: radial-gradient(ellipse at 48% 46%, rgba(11,19,32,.55), rgba(4,10,18,.65));
  -webkit-backdrop-filter: blur(9px) contrast(.76) saturate(.8);
  backdrop-filter: blur(9px) contrast(.76) saturate(.8);
}
.helfano-assistant__stage {
  position: relative;
  display: grid;
  grid-template-columns: var(--assistant-avatar-size);
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: max-content;
  max-width: calc(100% - 48px);
}
#helfano-assistant[data-conversation] .helfano-assistant__stage {
  grid-template-columns: var(--assistant-avatar-size) minmax(0, 480px);
  width: min(100% - 64px, 706px);
}
/* Original cutout unchanged: compensate transparent padding without cropping.
   Flight, floating and reveal use separate transform layers. */
#helfano-logo {
  position: relative;
  isolation: isolate;
  width: var(--assistant-avatar-size);
  height: var(--assistant-avatar-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  appearance: none;
  transform-origin: center;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.helfano-assistant__float, .helfano-assistant__avatar {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.helfano-assistant__avatar { opacity: 0; }
.helfano-assistant__avatar img {
  position: absolute;
  inset: -16%;
  display: block;
  width: 132%;
  height: 132%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.helfano-assistant__logo-aura {
  position: absolute;
  z-index: -1;
  inset: -65%;
  opacity: .7;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 65% 35%, rgba(64,206,221,.15), transparent 53%),
    radial-gradient(ellipse at 38% 67%, rgba(116,82,213,.13), transparent 55%),
    radial-gradient(ellipse at center, rgba(61,113,210,.10), transparent 64%);
  filter: blur(18px);
}
.helfano-assistant__conversation { position: relative; min-width: 0; pointer-events: auto; }
#helfano-speech {
  position: relative;
  padding: clamp(24px, 3vw, 36px);
  width: 100%;
  max-width: 540px;
  box-sizing: border-box;
  border: 1px solid rgba(185,214,222,.15);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(21,36,43,.91), rgba(14,22,35,.89));
  box-shadow: 0 24px 80px rgba(0,0,0,.21), inset 0 1px rgba(255,255,255,.025);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow-wrap: anywhere;
}
#helfano-speech p { margin: 0; }
#helfano-speech .helfano-assistant__greeting, #helfano-speech h2 {
  margin: 0 0 18px;
  color: #f3f6f6;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(23px, 2.2vw, 29px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.035em;
  text-transform: none;
}
#helfano-speech .helfano-assistant__message {
  color: #bdcbd2;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -.01em;
}
.helfano-assistant__word { display: inline-block; opacity: 0; }
#helfano-actions { display: grid; gap: 10px; margin-top: 25px; }
#helfano-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  width: 100%;
  padding: 13px 18px;
  border: 1px solid rgba(185,214,222,.21);
  border-radius: 12px;
  font: 600 14px/1.45 "Manrope", sans-serif;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
#helfano-actions .helfano-assistant__primary { background: #69d8d2; border-color: #69d8d2; color: #092228; }
#helfano-actions .helfano-assistant__primary:hover { background: #88e4de; }
#helfano-actions .helfano-assistant__secondary { background: rgba(255,255,255,.025); color: #e4ecef; }
#helfano-actions .helfano-assistant__secondary:hover { background: rgba(255,255,255,.07); border-color: #8cabae; }
#helfano-assistant button:focus-visible { outline: 2px solid #92e6df; outline-offset: 5px; }
.helfano-assistant__audio {
  position: absolute;
  left: 12px;
  top: calc(100% + 12px);
  min-height: 36px;
  padding: 6px 12px;
  background: rgba(10,23,31,.65);
  border: 1px solid rgba(185,214,222,.13);
  border-radius: 20px;
  color: #d2e0e3;
  font: 500 12px/1.4 "Manrope", sans-serif;
  cursor: pointer;
}
#helfano-assistant[data-state="minimized"] { --assistant-avatar-size: 74px; }
#helfano-assistant[data-state="minimized"] .helfano-assistant__stage {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(var(--assistant-dock-bottom, 24px), env(safe-area-inset-bottom));
  width: var(--assistant-avatar-size);
  max-width: none;
  grid-template-columns: var(--assistant-avatar-size);
}
#helfano-assistant[data-state="minimized"] .helfano-assistant__backdrop { visibility: hidden; pointer-events: none; }
#helfano-assistant[data-state="minimized"] #helfano-logo { pointer-events: auto; cursor: pointer; }
.helfano-assistant__hint {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(max(var(--assistant-dock-bottom, 24px), env(safe-area-inset-bottom)) + 94px);
  max-width: min(250px, calc(100vw - 48px));
  margin: 0;
  padding: 13px 17px;
  border: 1px solid rgba(185,214,222,.2);
  border-radius: 15px;
  color: #dfedef;
  background: rgba(13,27,34,.96);
  box-shadow: 0 8px 32px #0003;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
}
/* Conceal, do not replace or modify, the existing loader during the intro. */
html.helfano-assistant-pending .v4-loader,
html.helfano-assistant-active .v4-loader { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
@media (max-width: 760px) {
  #helfano-assistant { --assistant-avatar-size: clamp(105px, 30vw, 135px); }
  #helfano-assistant[data-conversation] .helfano-assistant__stage {
    width: min(440px, calc(100% - 40px));
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 27px;
  }
  .helfano-assistant__conversation { width: 100%; }
  #helfano-speech { border-radius: 21px; padding: 25px; }
  #helfano-speech .helfano-assistant__message { font-size: 15px; }
  #helfano-actions button { font-size: 13px; padding: 13px 14px; }
  #helfano-assistant[data-state="minimized"] { --assistant-avatar-size: 60px; }
  .helfano-assistant__hint { bottom: calc(max(var(--assistant-dock-bottom, 24px), env(safe-area-inset-bottom)) + 78px); }
}
@media (max-height: 560px) and (orientation: landscape) {
  #helfano-assistant { --assistant-avatar-size: 105px; }
  #helfano-assistant[data-conversation] .helfano-assistant__stage {
    grid-template-columns: 105px minmax(0, 440px);
    width: calc(100% - 64px);
    gap: 28px;
  }
  #helfano-speech { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  #helfano-assistant *, #helfano-assistant *::before { animation: none !important; transition: none !important; }
}
@media print { #helfano-assistant { display: none !important; } }
