#africavotes-chat,
.africaVotesChat {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

#africavotes-chat {
  outline: none;
  position: fixed;
  width: 360px;
  max-width: calc(100vw - 24px);
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(24, 33, 46, 0.3);
  bottom: 88px;
  right: 18px;
  overflow: hidden;
  z-index: 1090;
  transform: scale(1);
  transform-origin: bottom right;
  animation: showchat 0.2s ease;
  background: #fff;
}

#africavotes-chat.hide {
  display: none;
}

#africavotes-chat.show {
  display: block;
}

.africaVotesChat {
  background: #fff;
  color: #2f3e51;
  position: fixed;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  z-index: 1089;
  bottom: 22px;
  right: 18px;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(24, 33, 46, 0.25);
  text-decoration: none;
}

.africaVotesChat svg {
  transform: scale(1.12);
  flex: 0 0 auto;
}

.header-chat {
  background: linear-gradient(135deg, #074f46 0%, #0a6b5f 100%);
  color: #fff;
  padding: 14px 16px;
}

.header-chat p {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.africavotes-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.info-avatar img {
  border-radius: 100%;
  width: 44px;
  height: 44px;
  object-fit: cover;
  float: left;
  margin: 0 10px 0 0;
}

.africavotes-chat-body {
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 10px 10px;
  background: #e6ddd4;
  position: relative;
}

.africavotes-chat-body::before {
  display: block;
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: 0;
  opacity: 0.08;
  background-image: url("https://africavotes.com/public/img/social/whatsapp.webp");
}

.avchat-row {
  display: flex;
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

.avchat-row-user {
  justify-content: flex-end;
}

.avchat-row-bot {
  justify-content: flex-start;
}

.avchat-bubble {
  max-width: 86%;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.13) 0 1px 0.5px;
}

.avchat-bubble-bot {
  background: #fff;
  border-top-left-radius: 4px;
}

.avchat-bubble-user {
  background: #d7f4de;
  border-top-right-radius: 4px;
}

.avchat-author {
  font-size: 11px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.48);
  margin-bottom: 3px;
}

.avchat-text {
  font-size: 13px;
  line-height: 1.45;
  color: #1f2c39;
  white-space: pre-line;
}

.avchat-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px 5px;
  background: #f2f6fa;
  border-top: 1px solid #e1e8f0;
}

.avchat-chip {
  appearance: none;
  border: 1px solid #ccd9e8;
  background: #fff;
  color: #335177;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.avchat-chip:hover {
  background: #eef4ff;
}

.blanter-msg {
  color: #444;
  padding: 9px 10px;
  font-size: 12.5px;
  text-align: center;
  background: #f1f4f8;
  border-top: 1px solid #dbe2ea;
  display: flex;
  align-items: center;
  gap: 8px;
}

#chat-input {
  border: 1px solid #d0dae7;
  width: 100%;
  min-height: 42px;
  max-height: 86px;
  outline: none;
  resize: vertical;
  padding: 9px 10px;
  font-size: 13px;
  border-radius: 9px;
  background: #fff;
}

#send-it {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 9px;
  background: #e4ebf5;
}

#send-it svg {
  fill: #66778f;
  height: 18px;
  width: 18px;
}

#send-it:hover {
  background: #cedced;
}

#send-it.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.avchat-footer-actions {
  padding: 8px 10px 11px;
  background: #f8fbff;
  border-top: 1px solid #e1e8f0;
}

.avchat-human-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #1c6d56;
  text-decoration: none;
}

.avchat-human-link:hover {
  text-decoration: underline;
}

.avchat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.avchat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #96a2b1;
  animation: av-chat-bounce 1.2s infinite ease-in-out;
}

.avchat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.avchat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.close-chat {
  position: absolute;
  top: 6px;
  right: 12px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

@keyframes av-chat-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes showchat {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}

@media screen and (max-width: 545px) {
  #africavotes-chat {
    width: auto;
    left: 12px;
    right: 12px;
    bottom: 82px;
  }

  .africaVotesChat {
    right: 12px;
    bottom: 14px;
    padding: 9px 14px;
  }

  .africavotes-chat-body {
    max-height: 42vh;
  }
}
