/* GE2studio V1.10.13 — optional voice dictation for the controlled assistant.
 * Progressive enhancement only: unsupported browsers retain the existing
 * text input and submit button exactly as before.
 */

.ge2-assistant-query-control {
  position: relative;
  min-width: 0;
}

.ge2-assistant-query-control > input {
  width: 100%;
}

.ge2-assistant-input-row.has-voice {
  grid-template-columns: minmax(0, 1fr) 46px;
}

.ge2-assistant-input-row.has-voice .ge2-assistant-query-control > input {
  padding-right: 53px;
}

.ge2-assistant-input-row .ge2-assistant-voice {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--orange-bright, #dd642c);
  border: 1px solid rgba(221, 100, 44, .42);
  border-radius: 11px;
  background: rgba(13, 14, 15, .88);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease;
}

.ge2-assistant-input-row .ge2-assistant-voice:hover {
  color: #fffaf4;
  border-color: rgba(221, 100, 44, .72);
  background: rgba(185, 74, 27, .26);
  transform: translateY(-50%);
}

.ge2-assistant-input-row .ge2-assistant-voice:focus-visible {
  outline: 2px solid var(--orange-bright, #dd642c);
  outline-offset: 2px;
}

.ge2-assistant-input-row .ge2-assistant-voice svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ge2-assistant-input-row .ge2-assistant-voice.is-listening {
  color: #fffaf4;
  border-color: rgba(221, 100, 44, .92);
  background: var(--orange, #b94a1b);
  box-shadow:
    0 0 0 5px rgba(221, 100, 44, .10),
    0 0 24px rgba(221, 100, 44, .24),
    inset 0 1px rgba(255, 255, 255, .08);
  animation: ge2-assistant-voice-listening 1.45s ease-in-out infinite;
}

.ge2-assistant-input-row.is-listening input {
  border-color: rgba(221, 100, 44, .58);
  box-shadow: 0 0 0 3px rgba(221, 100, 44, .08);
}

.ge2-assistant-input-row .ge2-assistant-submit:disabled {
  opacity: .46;
  cursor: wait;
  transform: none;
}

.ge2-assistant-voice-meta {
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 240, 232, .09);
  border-radius: 13px;
  background: rgba(244, 240, 232, .025);
}

.ge2-assistant-voice-status {
  margin: 0;
  color: rgba(244, 240, 232, .78);
  font-size: 9.5px;
  font-weight: 720;
  line-height: 1.45;
}

.ge2-assistant-voice-meta[data-tone="listening"] .ge2-assistant-voice-status {
  color: var(--orange-bright, #dd642c);
}

.ge2-assistant-voice-meta[data-tone="success"] .ge2-assistant-voice-status {
  color: #a9c8aa;
}

.ge2-assistant-voice-meta[data-tone="error"] .ge2-assistant-voice-status {
  color: #f0a47e;
}

.ge2-assistant-voice-note {
  margin: 5px 0 0;
  color: rgba(244, 240, 232, .40);
  font-size: 8.5px;
  line-height: 1.5;
}

@keyframes ge2-assistant-voice-listening {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(221, 100, 44, .08),
      0 0 18px rgba(221, 100, 44, .18),
      inset 0 1px rgba(255, 255, 255, .08);
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(221, 100, 44, .13),
      0 0 28px rgba(221, 100, 44, .30),
      inset 0 1px rgba(255, 255, 255, .08);
  }
}

@media (max-width: 360px) {
  .ge2-assistant-input-row.has-voice {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 6px;
  }

  .ge2-assistant-input-row.has-voice .ge2-assistant-query-control > input {
    padding-right: 49px;
  }

  .ge2-assistant-input-row .ge2-assistant-voice {
    width: 38px;
    height: 38px;
  }

  .ge2-assistant-input-row .ge2-assistant-submit {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ge2-assistant-input-row .ge2-assistant-voice.is-listening {
    animation: none;
    box-shadow:
      0 0 0 5px rgba(221, 100, 44, .12),
      0 0 22px rgba(221, 100, 44, .22),
      inset 0 1px rgba(255, 255, 255, .08);
  }
}
