/* ===============================
   Basecamp Chatbot (Brand Themed)
   =============================== */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');


/* ===============================
   Brand Variables
   =============================== */

:root {
  --font-primary: "Plus Jakarta Sans", sans-serif;

  --color-sand: #e3d9d1;
  --color-off-black: #373737;
  --color-terra: #df6f57;
  --color-moss: #9ac7b3;
}


/* ===============================
   Reset
   =============================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-family: var(--font-primary);
}

body {
  background: #0f0f0f;
}


/* ===============================
   Toggle Button
   =============================== */

.chatbot-toggler {
  position: fixed;
  bottom: 16px;
  right: 16px;

  height: 72px;
  width: 72px;

  border-radius: 50%;

  background: linear-gradient(
    135deg,
    var(--color-terra),
    var(--color-moss)
  );

  border: none;
  outline: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  box-shadow: 0 12px 28px rgba(0,0,0,0.6);

  transition: 0.3s ease;

  z-index: 9999;
}

.chatbot-toggler:hover {
  transform: scale(1.08);
}

body.show-chatbot .chatbot-toggler {
  transform: rotate(90deg);
}

.chatbot-toggler span {
  color: #fff;
  position: absolute;
  font-size: 26px;
}

.chatbot-toggler span:last-child,
body.show-chatbot .chatbot-toggler span:first-child {
  opacity: 0;
}

body.show-chatbot .chatbot-toggler span:last-child {
  opacity: 1;
}


/* ===============================
   Chatbot Box
   =============================== */

.chatbot {
  position: fixed;
  right: 16px;
  bottom: 96px;

  width: 360px;
  height: 520px;

  background: var(--color-off-black);

  border-radius: 18px;

  overflow: hidden;

  box-shadow: 0 20px 50px rgba(0,0,0,0.8);

  opacity: 0;
  pointer-events: none;

  transform: scale(0.5);
  transform-origin: bottom right;

  transition: 0.25s ease;

  display: flex;
  flex-direction: column;

  z-index: 9999;
}

body.show-chatbot .chatbot {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}


/* ===============================
   Header
   =============================== */

.chatbot header {
  padding: 16px;

  text-align: center;

  background: linear-gradient(
    135deg,
    var(--color-terra),
    var(--color-moss)
  );

  color: #fff;

  font-size: 16px;
  font-weight: 700;

  border-bottom: 1px solid rgba(255,255,255,0.15);

  position: relative;
}

.chatbot header span {
  position: absolute;
  right: 15px;
  top: 50%;

  transform: translateY(-50%);

  cursor: pointer;

  display: none;
}


/* ===============================
   Chat Messages Area
   =============================== */

.chatbot .chatbox {
  flex: 1 1 auto;        /* allow shrinking */
  min-height: 0;        /* IMPORTANT for scroll */

  overflow-y: auto;

  padding: 18px 16px;

  background: var(--color-sand);
}

.chatbot .chatbox::-webkit-scrollbar {
  width: 5px;
}

.chatbot .chatbox::-webkit-scrollbar-thumb {
  background: var(--color-terra);
  border-radius: 20px;
}


/* ===============================
   Message Layout
   =============================== */

.chatbox .chat {
  list-style: none;

  display: flex;

  margin-bottom: 12px;
}


/* Bot Icon */

.chatbox .incoming span {
  width: 30px;
  height: 30px;

  background: var(--color-moss);

  color: var(--color-off-black);

  border-radius: 6px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;

  margin-right: 8px;
}


/* ===============================
   Message Bubbles
   =============================== */

.chatbox .chat p {
  max-width: 80%;

  padding: 10px 14px;

  border-radius: 14px;

  font-size: 14px;

  line-height: 1.5;

  word-wrap: break-word;
}


/* Bot Message */

.chatbox .incoming p {
  background: rgba(255,255,255,0.85);

  color: var(--color-off-black);
}


/* User Message */

.chatbox .outgoing {
  justify-content: flex-end;
}

.chatbox .outgoing p {
  background: var(--color-terra);

  color: #fff;
}


/* ===============================
   Input Area
   =============================== */

.chatbot .chat-input {
  display: flex;
  gap: 8px;

  padding: 12px 14px;

  background: #2f2f2f;

  border-top: 1px solid rgba(255,255,255,0.15);
}


.chat-input textarea {
  flex: 1;

  height: 45px;

  background: transparent;

  border: none;
  outline: none;

  resize: none;

  color: #fff;

  font-size: 14px;

  padding: 8px;
}

.chat-input textarea::placeholder {
  color: #c7c7c7;
}


/* ===============================
   Send Button
   =============================== */

.chat-input span {
  color: var(--color-terra);

  font-size: 22px;

  cursor: pointer;

  display: flex;
  align-items: center;

  visibility: hidden;

  transition: 0.2s;
}

.chat-input span:hover {
  color: var(--color-moss);
}

.chat-input textarea:valid ~ span {
  visibility: visible;
}


/* ===============================
   Mobile View
   =============================== */

@media (max-width: 490px) {

  .chatbot-toggler {
    bottom: 14px;
    right: 14px;
  }

  .chatbot {
    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    border-radius: 0;
  }

  .chatbot header span {
    display: block;
  }

}
.nav-logo {
  opacity: 0.5 !important;
  transition: opacity 0.3s ease;
}

.nav-logo:hover {
  opacity: 1 !important;
}


.lottie-animation,
.lottie-animation-variant {
  transform: translate3d(0,0,0);
  will-change: transform, opacity;
  backface-visibility: hidden;
  contain: layout paint size style;
}
