/* 语音输入功能样式 */
.voice-input-wrap {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 100%;
}
.voice-input-wrap::before {
  content: "";
  width: 1px;
  height: 24px;
  background: #e5e5e5;
}
.voice-input-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 100%;
  border: 0;
  outline: 0;
  background: #fff;
  color: #9aa3b2;
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease;
}
.voice-input-trigger:hover,
.voice-input-trigger.active,
.voice-input-trigger.has-result {
  color: #24986b;
  background: #f6fbf3;
}
.voice-input-trigger.active {
  color: #dc2626;
  animation: voiceTriggerPulse 1s infinite;
}
.voice-svg-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
@keyframes voiceTriggerPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(220, 38, 38, 0);
  }
  50% {
    box-shadow: inset 0 0 0 4px rgba(220, 38, 38, 0.12);
  }
}
.voice-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.38);
}
.voice-dialog-mask.show {
  display: flex;
}
.voice-dialog {
  width: 380px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 69, 117, 0.2), 0 4px 16px rgba(0, 0, 0, 0.08);
}
.voice-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: linear-gradient(135deg, #24986b 0%, #8cb74e 100%);
  color: #fff;
}
.voice-dialog-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.voice-dialog-title .title-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.voice-dialog-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 28px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.voice-dialog-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
.voice-dialog-content {
  min-height: 244px;
  padding: 28px 28px 22px;
  display: flex;
  flex-direction: column;
}
.voice-state {
  display: none;
}
.voice-state.show {
  display: flex;
}
.voice-idle-state,
.voice-recording-state {
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.voice-idle-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6fbf3, #e8f4dd);
  color: #24986b;
}
.voice-idle-icon-wrap .voice-svg-icon {
  width: 30px;
  height: 30px;
}
.voice-hint-text {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.voice-hint-text kbd {
  display: inline-block;
  padding: 2px 7px;
  margin: 0 2px;
  border: 1px solid #cfe3b8;
  border-radius: 4px;
  background: #f6fbf3;
  color: #24986b;
  font-size: 11px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.voice-wave-container {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  margin-bottom: 8px;
}
.voice-wave-bar {
  width: 5px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(180deg, #8cb74e, #24986b);
  animation: voiceWaveAnim 0.55s ease-in-out infinite alternate;
}
.voice-wave-bar:nth-child(1) {
  animation-delay: 0.08s;
}
.voice-wave-bar:nth-child(2) {
  animation-delay: 0.16s;
}
.voice-wave-bar:nth-child(3) {
  animation-delay: 0.24s;
}
.voice-wave-bar:nth-child(4) {
  animation-delay: 0.32s;
}
.voice-wave-bar:nth-child(5) {
  animation-delay: 0.4s;
}
.voice-wave-bar:nth-child(6) {
  animation-delay: 0.48s;
}
.voice-wave-bar:nth-child(7) {
  animation-delay: 0.56s;
}
@keyframes voiceWaveAnim {
  from {
    height: 6px;
    opacity: 0.5;
  }
  to {
    height: 32px;
    opacity: 1;
  }
}
.voice-recording-time {
  color: #dc2626;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.voice-recording-hint {
  margin: 4px 0 0;
  color: #9ca3af;
  font-size: 12px;
}
.voice-result-area {
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}
.voice-result-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #16a34a;
  font-size: 13px;
  font-weight: 700;
}
.voice-result-check,
.voice-error-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.voice-result-text {
  margin: 0 0 14px;
  color: #1e3a5f;
  font-size: 15px;
  line-height: 1.7;
  word-break: break-all;
}
.voice-use-result-btn {
  display: block;
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.voice-use-result-btn:hover {
  background: #15803d;
}
.voice-error-area {
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
}
.voice-error-area p {
  margin: 0;
  color: #dc2626;
  font-size: 13px;
  line-height: 1.6;
}
.voice-loading-state {
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  color: #24986b;
  font-size: 14px;
}
.voice-loading-dots {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}
.voice-loading-dots span,
.voice-btn-loading-wrap span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: voiceDotBounce 1s ease-in-out infinite;
}
.voice-loading-dots span:nth-child(2),
.voice-btn-loading-wrap span:nth-child(2) {
  animation-delay: 0.15s;
}
.voice-loading-dots span:nth-child(3),
.voice-btn-loading-wrap span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes voiceDotBounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.voice-record-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
}
.voice-record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  padding: 14px 28px;
  border: 0;
  border-radius: 30px;
  background: linear-gradient(135deg, #24986b, #8cb74e);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(36, 152, 107, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.voice-record-btn:hover:not(.disabled):not(.active) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(36, 152, 107, 0.4);
}
.voice-record-btn.active {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.35);
}
.voice-record-btn.disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
.voice-record-btn .voice-svg-icon {
  width: 20px;
  height: 20px;
}
.voice-btn-stop-wrap,
.voice-btn-loading-wrap {
  display: none;
  align-items: center;
  justify-content: center;
}
.voice-btn-stop-wrap {
  gap: 4px;
}
.voice-stop-bar {
  width: 6px;
  height: 16px;
  border-radius: 2px;
  background: currentColor;
}
.voice-btn-loading-wrap {
  gap: 4px;
}
.voice-tip-text {
  margin: 12px 0 0;
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
}
@media screen and (max-width: 750px) {
  .header .banner .banner_search .search_web {
    width: 92vw;
  }
  .voice-input-trigger {
    width: 40px;
  }
  .voice-dialog-content {
    padding: 24px 20px 20px;
  }
}
