/* === CHATBOT LAUNCHER BUTTON === */
#chatbot-launcher {
  position: fixed;
  bottom: 110px; /* Positioned above cookie banner */
  right: 25px;
  background-color: #f1d145;
  color: #000;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 30px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
  cursor: pointer;
  z-index: 10001;
  transition: all 0.3s ease;
}
#chatbot-launcher:hover {
  background-color: #ffe766;
  transform: scale(1.05);
}

/* === CHATBOT BOX === */
#chatbot-box {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 320px;
  height: 420px;
  background-color: #111;
  border: 2px solid #f1d145;
  border-radius: 16px;
  display: none;
  flex-direction: column;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
  z-index: 10000;
  overflow: hidden;
}

/* === HEADER === */
.chatbot-header {
  background-color: #000;
  color: #f1d145;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1d145;
}
.chatbot-header button {
  background: none;
  border: none;
  color: #f1d145;
  font-size: 1.2rem;
  cursor: pointer;
}

/* === MESSAGES === */
.chatbot-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 0.9rem;
}
.message {
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  max-width: 85%;
  line-height: 1.4;
}
.message.bot {
  background-color: #222;
  color: #f1d145;
  align-self: flex-start;
}
.message.user {
  background-color: #f1d145;
  color: #000;
  align-self: flex-end;
}

/* === INPUT === */
.chatbot-input {
  display: flex;
  padding: 10px;
  background-color: #0a0a0a;
  border-top: 1px solid #f1d145;
}
.chatbot-input input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: none;
  background-color: #222;
  color: #fff;
  outline: none;
}
.chatbot-input button {
  margin-left: 8px;
  background-color: #f1d145;
  color: #000;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}
.chatbot-input button:hover {
  background-color: #ffe766;
}

/* === RESPONSIVE FIX FOR MOBILE === */
@media (max-width: 768px) {
  #chatbot-launcher {
    bottom: 150px;
    right: 15px;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  #chatbot-box {
    right: 10px;
    bottom: 140px;
    width: 90%;
    height: 400px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.5rem;
  }
}

/* === CLASS TO MOVE CHAT LAUNCHER UP WHEN CHAT OPEN === */
body.chat-open #chatbot-launcher {
  bottom: 500px; /* Adjust depending on chat height */
}


/* ===================== */
/* Responsive Adjustments */
/* ===================== */

/* Tablets (≤ 991px) */
@media (max-width: 991px) {
  #chatbot-launcher {
    bottom: 140px;
    right: 20px;
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  #chatbot-box {
    width: 360px;
    height: 420px;
    right: 15px;
    bottom: 130px;
  }
}

/* Phones (≤ 767px) */
@media (max-width: 767px) {
  #chatbot-launcher {
    bottom: 150px; /* leaves room for cookie banner */
    right: 15px;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  #chatbot-box {
    right: 10px;
    bottom: 140px;
    width: 90%;
    height: 400px;
    max-width: none;
  }

  .chatbot-header {
    font-size: 0.9rem;
    padding: 10px 14px;
  }

  .chatbot-messages {
    font-size: 0.85rem;
    padding: 10px;
  }

  .chatbot-input input {
    font-size: 0.85rem;
    padding: 7px 10px;
  }

  .chatbot-input button {
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.5rem;
  }
}

/* Small Phones (≤ 480px) */
@media (max-width: 480px) {
  #chatbot-launcher {
    bottom: 160px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  #chatbot-box {
    width: 95%;
    height: 360px;
    right: 2.5%;
    bottom: 150px;
    border-radius: 12px;
  }

  .chatbot-header {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  .chatbot-input {
    padding: 8px;
  }

  .chatbot-input input {
    font-size: 0.8rem;
  }

  .chatbot-input button {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .message {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}
