/* FitAI chat box voice controls (fitai-voice.js): the mic inside the text
   field and the live-voice button that stands in for Send until there is text. */
.fitai-ask [hidden] { display: none !important; }

.fitai-ask__field {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.fitai-ask__field input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-right: 40px !important;
}

/* Simple outline mic, inside the right end of the field. */
.fitai-ask .fitai-ask__dictate {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  color: #3d4a5c;
  background: transparent;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.fitai-ask .fitai-ask__dictate svg,
.fitai-ask .fitai-ask__live svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fitai-ask .fitai-ask__dictate:hover { background: rgba(23, 54, 95, 0.08); }
.fitai-ask .fitai-ask__dictate:focus-visible,
.fitai-ask .fitai-ask__live:focus-visible { outline: 2px solid #c28e29; outline-offset: 2px; }

.fitai-ask .fitai-ask__dictate.is-recording {
  color: #fff;
  background: #c0392b;
  animation: fitai-dictate-pulse 1.1s ease-in-out infinite;
}

@keyframes fitai-dictate-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0); }
}

/* Live voice: round navy button with a white waveform. */
.fitai-ask .fitai-ask__live {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  color: #fff;
  background: #1b3a6f;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.fitai-ask .fitai-ask__live svg { width: 20px; height: 20px; stroke-width: 2.2; }
.fitai-ask .fitai-ask__live:hover { background: #24497f; }
.fitai-ask .fitai-ask__live[aria-pressed="true"] { background: #c0392b; }

/* Listening loop drawn over video/canvas rabbits (Indoor, Custom). */
.fitai-listening-overlay {
  position: fixed;
  z-index: 2600;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 12px #0005);
}

.is-fitai-listening .rabbit-sprite,
.is-fitai-listening .rabbit-action-video-canvas,
canvas.is-fitai-listening { opacity: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .fitai-ask .fitai-ask__dictate.is-recording { animation: none; }
}
