#gemini-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

#gemini-chat-widget.no-fixed {
  position: static;
  z-index: auto;
  bottom: unset;
  right: unset;
}

/* Botão do chat agora usa imagem (icone.png) */
#chat-button {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#chat-button img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

#chat-window {
  display: none;
  width: 350px;
  height: 400px;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  flex-direction: column;
  position: absolute;
  bottom: 80px; /* acima do botão */
  right: 0;
  background-color: white;
}

#chat-header {
  background-color: #0084ff;
  color: white;
  padding: 10px;
  text-align: center;
}

#chat-body {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#chat-footer {
  display: flex;
  padding: 5px;
  align-items: center;
  background-color: #f0f0f0;
}

#chat-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 10px;
  margin: 0 5px;
}

#send-button {
  background-color: #0084ff;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5em;
  line-height: 40px;
  text-align: center;
  padding: 0;
  margin-left: 5px;
}

#attach-file-button, #record-button {
  background-color: transparent;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  color: #888;
}

#record-button.recording {
  color: red;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% {
    text-shadow: 0 0 0 rgba(255, 0, 0, 0.7);
  }
  70% {
    text-shadow: 0 0 10px rgba(255, 0, 0, 0);
  }
  100% {
    text-shadow: 0 0 0 rgba(255, 0, 0, 0);
  }
}

#user-info-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#user-info-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

#user-info-form button {
  width: 100%;
  background-color: #0084ff;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
}

.message {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 80%;
  font-size: 1.2em;
}

.client-message {
  background-color: #dcf8c6;
  align-self: flex-end;
}

.attendant-message {
  background-color: #f1f0f0;
  align-self: flex-start;
}

.timestamp {
  font-size: 0.75em;
  color: #888;
  margin-top: 4px;
}

.client-message .timestamp {
  align-self: flex-end;
}

.attendant-message .timestamp {
  align-self: flex-start;
}

.chat-image {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 5px;
}

.chat-document {
  color: #0056b3;
  text-decoration: underline;
}

#file-input {
  display: none;
}

.system-message {
  background-color: #fffacd;
  align-self: center;
  font-style: italic;
  color: #555;
}

.historical-file-message {
  font-style: italic;
  color: #555;
}

.chat-audio {
  width: 100%;
  margin-top: 5px;
}