/* Chat Interface Styles - Unified Design */

/* Chat Container */
.chat-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 95vw;
  max-width: 500px;
  padding: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.chat-container.visible {
  visibility: visible;
  opacity: 1;
}

.chat-container.processing {
  opacity: 0.5;
}

/* Unified Input Container */
.unified-input-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: radial-gradient(
      107.08% 85.59% at 86.3% 87.5%,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0) 86.18%
    ),
    radial-gradient(
      83.94% 83.94% at 26.39% 20.83%,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0) 69.79%,
      rgba(255, 255, 255, 0) 100%
    ),
    rgba(179, 179, 179, 0.5);
  border: 2px solid #fff200;
  border-radius: 50px;
  padding: 1px 16px;
  box-shadow: -3px -4px 7px 0 rgba(255, 255, 255, 0.15) inset, 4px 38px 62px 0 rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.input-wrapper:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.input-wrapper.disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

input:-internal-autofill-selected {
  background-color: transparent;
}

/* Unified Chat Input */
.unified-chat-input {
  width: 90%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff200;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 0;
  transition: all 0.3s ease;
}

.unified-chat-input::placeholder {
  color: #fff200;
  font-weight: 400;
  opacity: 0.8;
}

.unified-chat-input:disabled {
  cursor: not-allowed;
  color: rgba(255, 242, 0, 0.818);
}

.unified-chat-input:disabled::placeholder {
  color: #fff200;
  font-weight: 400;
}

/* Action Button (Mic/Send/Recording) */
.action-button {
  position: absolute;
  width: 1.7rem;
  height: 2.3rem;
  right: 1%;
  border-radius: 109px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  flex-grow: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: radial-gradient(
      107.08% 85.59% at 86.3% 87.5%,
      rgba(0, 0, 0, 0.23) 0%,
      rgba(0, 0, 0, 0) 86.18%
    ),
    radial-gradient(
      83.94% 83.94% at 26.39% 20.83%,
      rgba(255, 255, 255, 0.41) 0%,
      rgba(255, 255, 255, 0) 69.79%,
      rgba(255, 255, 255, 0) 100%
    ),
    #fff200;
  box-shadow: -2.25px -3px 5.25px 0 rgba(0, 0, 0, 0.25) inset, 4px 38px 62px 0 rgba(0, 0, 0, 0.5);
}

/* Mic State (default) */
.action-button.mic-state {
  color: #000000;
}

.action-button.mic-state:hover {
  transform: scale(1.05);
}

.action-button.mic-state:active {
  transform: scale(0.95);
}

/* Send State (when typing) */
.action-button.send-state {
  color: #000000;
  background: radial-gradient(
      107.08% 85.59% at 86.3% 87.5%,
      rgba(0, 0, 0, 0.23) 0%,
      rgba(0, 0, 0, 0) 86.18%
    ),
    radial-gradient(
      83.94% 83.94% at 26.39% 20.83%,
      rgba(255, 255, 255, 0.41) 0%,
      rgba(255, 255, 255, 0) 69.79%,
      rgba(255, 255, 255, 0) 100%
    ),
    #fff200;
  box-shadow: -2.25px -3px 5.25px 0 rgba(0, 0, 0, 0.25) inset, 4px 38px 62px 0 rgba(0, 0, 0, 0.5);
}

.action-button.send-state svg {
  fill: #000000;
}

.action-button.send-state:hover {
  transform: scale(1.05);
}

.action-button.send-state:active {
  transform: scale(0.95);
}

/* Recording State (when recording) */
.action-button.recording-state {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: recording-pulse 2s ease-in-out infinite;
}

.action-button.recording-state:hover {
  background: #dc2626;
}

.action-button.recording-state:active {
  transform: scale(0.95);
}

@keyframes recording-pulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  }

  50% {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.6);
  }
}

/* Disabled Button State */
.action-button.disabled {
  background: #9ca3af;
  color: #d1d5db;
  cursor: not-allowed;
  box-shadow: none;
}

.action-button.disabled:hover {
  transform: none;
  background: #9ca3af;
}

/* Animated Waveform */
.animated-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.waveform-bar {
  width: 2px;
  height: 12px;
  background: white;
  margin: 0 1px;
  border-radius: 1px;
  animation: waveform 1.2s ease-in-out infinite;
}

.waveform-bar:nth-child(1) {
  animation-delay: 0s;
}

.waveform-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.waveform-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.waveform-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.waveform-bar:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes waveform {
  0%,
  40%,
  100% {
    transform: scaleY(0.4);
  }

  20% {
    transform: scaleY(1);
  }
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Processing Dots */
.processing-dots {
  font-size: 18px;
  color: #fff200;
  font-weight: bold;
  letter-spacing: 2px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#loadingtext {
  color: #fff200;
  font-weight: 800;
}
