/* SynoMind Voice Assistant Styling */

/* Bot Icon */
.synomind-bot-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #3a86ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  color: white;
  font-size: 24px;
}

.synomind-bot-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Listening state */
.synomind-bot-icon.listening {
  background-color: #38b000;
  animation: pulse 1.5s infinite alternate;
}

/* Thinking state */
.synomind-bot-icon.thinking {
  background-color: #ffbe0b;
  animation: thinking 2s infinite;
}

/* Speaking state */
.synomind-bot-icon.speaking {
  background-color: #ff006e;
  animation: speaking 1s infinite;
}

/* Error state */
.synomind-bot-icon.error {
  background-color: #d90429;
  animation: shake 0.5s ease-in-out;
}

/* Tooltip */
.bot-tooltip {
  position: absolute;
  right: 70px;
  bottom: 10px;
  background-color: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  width: max-content;
  max-width: 300px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  white-space: normal;
}

.bot-tooltip::after {
  content: '';
  position: absolute;
  right: -10px;
  bottom: 13px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}

/* Chat Interface */
.synomind-chat-interface {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  height: 500px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999;
}

.synomind-chat-header {
  padding: 15px;
  background-color: #3a86ff;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.synomind-chat-title {
  font-weight: bold;
  font-size: 18px;
}

.synomind-close-chat {
  cursor: pointer;
  font-size: 20px;
}

.synomind-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background-color: #f8f9fa;
}

.synomind-chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #dee2e6;
}

.synomind-message-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  margin-right: 10px;
}

.synomind-send-btn {
  background-color: #3a86ff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.synomind-camera-btn {
  background-color: #38b000;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-right: 10px;
}

/* Messages */
.synomind-message {
  margin-bottom: 15px;
  display: flex;
}

.synomind-user-message {
  justify-content: flex-end;
}

.synomind-assistant-message {
  justify-content: flex-start;
}

.synomind-message-bubble {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 20px;
  word-wrap: break-word;
}

.synomind-user-bubble {
  background-color: #3a86ff;
  color: white;
  border-bottom-right-radius: 5px;
}

.synomind-assistant-bubble {
  background-color: #f1f1f1;
  color: #333;
  border-bottom-left-radius: 5px;
}

/* Typing indicator */
.synomind-typing-indicator {
  display: flex;
  padding: 10px;
  background-color: #f1f1f1;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 15px;
}

.synomind-typing-indicator span {
  height: 10px;
  width: 10px;
  background-color: #888;
  border-radius: 50%;
  display: inline-block;
  margin: 0 3px;
  opacity: 0.4;
}

.synomind-typing-indicator span:nth-child(1) {
  animation: typing 1s infinite;
}

.synomind-typing-indicator span:nth-child(2) {
  animation: typing 1s 0.33s infinite;
}

.synomind-typing-indicator span:nth-child(3) {
  animation: typing 1s 0.66s infinite;
}

/* Camera input dialog */
.synomind-camera-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1100;
}

.synomind-camera-container {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.synomind-camera-title {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: bold;
}

.synomind-camera-preview {
  width: 100%;
  height: auto;
  max-height: 40vh;
  background-color: #f1f1f1;
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.synomind-camera-buttons {
  display: flex;
  justify-content: space-between;
}

.synomind-capture-btn, .synomind-cancel-btn {
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
}

.synomind-capture-btn {
  background-color: #3a86ff;
  color: white;
}

.synomind-cancel-btn {
  background-color: #f1f1f1;
  color: #333;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(56, 176, 0, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(56, 176, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(56, 176, 0, 0);
  }
}

@keyframes thinking {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 190, 11, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 190, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 190, 11, 0);
  }
}

@keyframes speaking {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes typing {
  0% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-5px);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .synomind-chat-interface {
    width: 90%;
    height: 70%;
    bottom: 80px;
    right: 5%;
  }
  
  .bot-tooltip {
    max-width: 200px;
  }
}