#chatbank-box,
#chatbank-box *,
#chatbank-toggle,
#chatbank-toggle * {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: normal;
  text-align: left;
}

/* Botão flutuante */
#chatbank-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  padding: 0;
  z-index: 9999;
  transition: transform 0.2s;
}

#chatbank-toggle:hover {
  transform: scale(1.08);
}

#chatbank-toggle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Caixa do chat */
#chatbank-box {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 370px;
  height: 560px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  transition:
    opacity 0.25s,
    transform 0.25s;
}

#chatbank-box.fechado {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

#chatbank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #667eea;
  border-radius: 15px 15px 0 0;
}

#header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

#header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

#chatbank-header span {
  color: white;
  font-weight: bold;
  font-size: 15px;
}

#chatbank-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

#chatbank-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

#chatbank-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f0f0f0;
}

.user-msg {
  display: flex !important;
  justify-content: flex-end !important;
  margin-bottom: 10px !important;
  background: transparent !important;
  background-color: transparent !important;
}

.user-msg > div {
  background: #dcf8c6 !important;
  color: #333;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  max-width: 75%;
  word-wrap: break-word;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bot-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.bot-msg .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.bot-msg > div {
  background: white;
  color: #333;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  max-width: 75%;
  word-wrap: break-word;
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
}

#chatbank-input-area {
  display: flex;
  padding: 12px;
  gap: 10px;
  background: white;
  border-radius: 0 0 15px 15px;
  border-top: 1px solid #e0e0e0;
}

#chatbank-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

#chatbank-input:focus {
  border-color: #667eea;
}

#chatbank-send {
  padding: 10px 22px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

#chatbank-send:hover {
  background: #764ba2;
}
