/* VynFlo web voice widget styles.
   Floating pill button. Positioned bottom-LEFT so it doesn't collide with the
   existing chat widget on the bottom-right. Change --vf-accent to match brand. */

.vf-voice-btn {
  --vf-accent: #6d5efc;      /* VynFlo violet — tweak to brand */
  --vf-accent-2: #8b7bff;
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--vf-accent), var(--vf-accent-2));
  color: #fff;
  font: 600 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(109, 94, 252, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.vf-voice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(109, 94, 252, 0.45);
}

/* Lift above the site's cookie banner while it's showing (same mechanism the
   chat/WhatsApp buttons use: body.has-cookie-banner + --cookie-banner-offset). */
body.has-cookie-banner .vf-voice-btn {
  bottom: calc(24px + var(--cookie-banner-offset, 70px));
}

.vf-voice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.vf-voice-label {
  white-space: nowrap;
}

/* Connecting: dim + gentle pulse */
.vf-voice-btn.is-connecting {
  background: linear-gradient(135deg, #7a7a8c, #9a9aad);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  cursor: default;
}

/* Live: red "end call" state with a pulsing ring */
.vf-voice-btn.is-live {
  background: linear-gradient(135deg, #e5484d, #f0686c);
  box-shadow: 0 8px 24px rgba(229, 72, 77, 0.4);
  animation: vf-live-pulse 1.6s ease-in-out infinite;
}

@keyframes vf-live-pulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(229, 72, 77, 0.4), 0 0 0 0 rgba(229, 72, 77, 0.35);
  }
  50% {
    box-shadow: 0 8px 24px rgba(229, 72, 77, 0.4), 0 0 0 12px rgba(229, 72, 77, 0);
  }
}

@media (max-width: 480px) {
  .vf-voice-btn {
    left: 16px;
    bottom: 16px;
    padding: 12px 16px;
  }
  body.has-cookie-banner .vf-voice-btn {
    bottom: calc(16px + var(--cookie-banner-offset, 70px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .vf-voice-btn.is-live {
    animation: none;
  }
}
