/* =====================================================
   V8 - 음성 입력
   기존 style.css + v7.css 뒤에 추가
===================================================== */

.ai-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.ai-input-row #aiInput {
  flex: 1;
  min-width: 0;
}

.voice-button {
  width: 52px;
  min-width: 52px;
  padding: 0 !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 8px;

  background: #2563eb !important;
  color: #ffffff;
  cursor: pointer;
}

.voice-button:hover {
  background: #1d4ed8 !important;
}

.voice-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.voice-button.listening {
  background: #dc2626 !important;
  animation: voice-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes voice-pulse {
  from {
    transform: scale(0.94);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.25);
  }

  to {
    transform: scale(1.04);
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
}

@media (max-width: 600px) {

  /* 모바일에서는 입력창은 한 줄, 버튼 2개는 그 아래 같은 줄 */
  .ai-input-row {
    display: grid;
    grid-template-columns: 1fr 58px;
    gap: 10px;
    align-items: stretch;
  }

  .ai-input-row #aiInput {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ai-input-row #aiSendButton {
    grid-column: 1 / 2;
    width: 100% !important;
    min-width: 0;
  }

  .voice-button {
    grid-column: 2 / 3;
    width: 58px !important;
    min-width: 58px;
    height: auto;
    justify-self: stretch;
  }
}
