/* AF&U Chatbot Styles */
#afu-chat {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  font-family: "Inter", sans-serif;
}

#afu-bubble {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
}

#afu-box {
  position: fixed;
  bottom: 80px;
  right: 22px;
  width: 360px;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  transform-origin: bottom right;
}

#afu-box.hidden {
  transform: scale(0.1);
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  #afu-chat {
    bottom: 20px;
    right: 20px;
  }

  #afu-box {
    width: 92%;
    max-width: 380px;
    height: 380px !important;
    max-height: 60vh !important;
    min-height: 340px !important;
    bottom: 80px;
    right: 4%;
    left: auto;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    position: fixed;
  }

  #afu-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
  }

  .afu-bot-msg,
  .afu-user-msg {
    font-size: 15px;
    line-height: 1.5;
    padding: 10px 14px;
  }

  #afu-input {
    font-size: 16px !important;
    padding: 12px 0;
  }

  .afu-extra-field input {
    font-size: 16px !important;
    padding: 12px;
  }

  #afu-form {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

#afu-header {
  text-align: right;
  padding: 4px 8px;
}

#afu-minimize {
  cursor: pointer;
  font-size: 20px;
  color: #777;
}

#afu-messages {
  padding: 12px 14px;
  height: 220px;
  overflow-y: auto;
}

.afu-bot-msg,
.afu-user-msg {
  padding: 8px 12px;
  margin: 6px 0;
  max-width: 80%;
  border-radius: 12px;
}

.afu-bot-msg {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  /* EXPLICITLY SET WHITE TEXT FOR VISIBILITY */
}

.afu-user-msg {
  background: rgba(8, 107, 121, 0.4);
  margin-left: auto;
  color: #fff !important;
  /* EXPLICITLY SET WHITE TEXT GLOBALLY */
}

.afu-typing {
  font-style: italic;
  color: #777;
}

.afu-extra-field {
  padding: 8px 12px;
}

.afu-extra-field input {
  width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  outline: none;
  border-radius: 10px;
  color: #fff;
}

#afu-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}

#afu-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
}

#afu-send {
  background: transparent;
  border: 1.5px solid #fff;
  padding: 6px 14px;
  border-radius: 40px;
  color: #fff;
  cursor: pointer;
}

.hidden {
  display: none !important;
}
