/* =========================================================
   DELIZA WELLNESS SPA - CHATBOT
   Forest Green + White Theme
   ========================================================= */


/* =========================================================
   BRAND COLORS
   ========================================================= */

:root {
  --chat-panel-w: 480px;

  /* Deliza Wellness */
  --deliza-green: #0B3D20;
  --deliza-green-dark: #082F18;
  --deliza-white: #FFFFFF;
  --deliza-cream: #F8F9F6;
  --deliza-light-green: #F2F6F2;
}


/* =========================================================
   PAGE BEHAVIOUR
   ========================================================= */

body {
  transition: padding-right 0.25s ease;
}

body.chatbot-open {
  padding-right: var(--chat-panel-w);
}


/* =========================================================
   MOBILE PAGE BEHAVIOUR
   ========================================================= */

@media (max-width: 576px) {
  body.chatbot-open {
    padding-right: 0;
  }
}


/* =========================================================
   CHATBOT WIDGET
   ========================================================= */

#chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;

  z-index: 9999;

  font-family: 'Poppins', Arial, sans-serif;

  display: flex;
  flex-direction: column;
  align-items: center;
}


/* =========================================================
   CHATBOT LABEL
   ========================================================= */

#chatbot-label {
  font-size: 0.65rem;
  font-weight: 700;

  letter-spacing: 0.05em;
  text-transform: uppercase;

  color: var(--deliza-white);

  background: rgba(11, 61, 32, 0.92);

  border-radius: 10px;

  padding: 2px 9px;
  margin-top: 6px;

  pointer-events: none;
  user-select: none;

  white-space: nowrap;
}


/* Hide label when chat is open */

#chatbot-widget.chatbot-open #chatbot-label {
  display: none;
}


/* =========================================================
   CHATBOT TOGGLE BUTTON
   ========================================================= */

#chatbot-toggle {
  width: 68px;
  height: 68px;

  border-radius: 50%;

  background: var(--deliza-green);
  color: var(--deliza-white);

  border: 2px solid rgba(255, 255, 255, 0.9);

  cursor: pointer;

  font-size: 30px;

  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.30),
    0 0 0 4px rgba(11, 61, 32, 0.12);

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;

  animation: chatbot-pulse 2.8s infinite;
}


/* =========================================================
   TOGGLE HOVER
   ========================================================= */

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

  background: var(--deliza-green-dark);
  color: var(--deliza-white);

  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 0 5px rgba(11, 61, 32, 0.15);

  animation: none;
}


/* =========================================================
   CHATBOT PULSE
   ========================================================= */

@keyframes chatbot-pulse {

  0% {
    box-shadow:
      0 6px 22px rgba(0, 0, 0, 0.30),
      0 0 0 0 rgba(11, 61, 32, 0.30);
  }

  60% {
    box-shadow:
      0 6px 22px rgba(0, 0, 0, 0.30),
      0 0 0 10px rgba(11, 61, 32, 0);
  }

  100% {
    box-shadow:
      0 6px 22px rgba(0, 0, 0, 0.30),
      0 0 0 0 rgba(11, 61, 32, 0);
  }

}


/* =========================================================
   CHATBOT WINDOW
   ========================================================= */

#chatbot-window {
  position: fixed;

  top: 0;
  right: 0;
  bottom: 0;

  width: var(--chat-panel-w);

  background: var(--deliza-white);

  box-shadow:
    -8px 0 32px rgba(0, 0, 0, 0.18);

  display: flex;
  flex-direction: column;

  overflow: hidden;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;

  border-left: 1px solid #e5e5e5;

  z-index: 9998;
}


/* =========================================================
   HIDDEN CHAT WINDOW
   ========================================================= */

#chatbot-window.chatbot-hidden {
  opacity: 0;

  pointer-events: none;

  transform: translateX(24px);
}


/* =========================================================
   CHAT HEADER
   ========================================================= */

.chatbot-header {
  background: var(--deliza-green);

  color: var(--deliza-white);

  padding: 14px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  flex-shrink: 0;
}


/* =========================================================
   CHAT HEADER TITLE
   ========================================================= */

.chatbot-header h3 {
  margin: 0;

  font-size: 1rem;

  font-weight: 600;

  color: var(--deliza-white);

  letter-spacing: 0.03em;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

#chatbot-close {
  background: transparent;

  border: none;

  color: var(--deliza-white);

  font-size: 1.2rem;

  cursor: pointer;

  line-height: 1;

  padding: 2px 7px;

  border-radius: 50%;

  transition:
    background 0.15s ease,
    transform 0.15s ease;
}


/* Close hover */

#chatbot-close:hover {
  background: rgba(255, 255, 255, 0.18);

  transform: rotate(90deg);
}


/* =========================================================
   CHAT MESSAGES AREA
   ========================================================= */

#chatbot-messages {
  flex: 1;

  overflow-y: auto;

  padding: 14px;

  background: var(--deliza-light-green);

  display: flex;

  flex-direction: column;

  gap: 10px;
}


/* =========================================================
   MESSAGE BASE
   ========================================================= */

.chatbot-msg {
  max-width: 82%;

  padding: 10px 14px;

  border-radius: 14px;

  font-size: 0.875rem;

  line-height: 1.55;

  word-wrap: break-word;

  white-space: pre-wrap;
}


/* =========================================================
   USER MESSAGE
   ========================================================= */

.chatbot-msg-user {
  background: var(--deliza-green);

  color: var(--deliza-white);

  align-self: flex-end;

  border-bottom-right-radius: 4px;
}


/* =========================================================
   AI MESSAGE
   ========================================================= */

.chatbot-msg-ai {
  background: var(--deliza-white);

  color: #333333;

  border: 1px solid #e0e5e0;

  align-self: flex-start;

  border-bottom-left-radius: 4px;

  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03);
}


/* =========================================================
   MESSAGE LINKS
   ========================================================= */

.chatbot-msg a {
  color: inherit;

  text-decoration: underline;
}


/* AI links */

.chatbot-msg-ai a {
  color: var(--deliza-green);

  font-weight: 600;
}


/* =========================================================
   TYPING INDICATOR
   ========================================================= */

.chatbot-typing {
  background: var(--deliza-white);

  border: 1px solid #e0e5e0;

  align-self: flex-start;

  padding: 10px 14px;

  border-radius: 14px;

  border-bottom-left-radius: 4px;

  font-size: 0.875rem;

  color: #777777;

  display: flex;

  align-items: center;

  gap: 8px;
}


/* =========================================================
   TYPING DOTS
   ========================================================= */

.chatbot-typing-dots {
  display: flex;

  gap: 4px;

  align-items: center;
}


.chatbot-typing-dots span {
  display: inline-block;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--deliza-green);

  animation:
    chatbot-bounce 1.2s infinite ease-in-out;
}


/* Dot delays */

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


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


/* =========================================================
   TYPING ANIMATION
   ========================================================= */

@keyframes chatbot-bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-6px);
  }

}


/* =========================================================
   INPUT AREA
   ========================================================= */

.chatbot-input-area {
  display: flex;

  padding: 10px 12px;

  border-top: 1px solid #e5e8e5;

  background: var(--deliza-white);

  gap: 8px;

  align-items: center;

  flex-shrink: 0;
}


/* =========================================================
   CHAT INPUT
   ========================================================= */

#chatbot-input {
  flex: 1;

  border: 1px solid #d8ddd8;

  border-radius: 22px;

  padding: 9px 16px;

  font-size: 0.875rem;

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;

  font-family: inherit;

  background: #fafcf9;

  color: #222222;
}


/* Placeholder */

#chatbot-input::placeholder {
  color: #8a8f8a;
}


/* Input focus */

#chatbot-input:focus {
  border-color: var(--deliza-green);

  background: var(--deliza-white);

  box-shadow:
    0 0 0 2px rgba(11, 61, 32, 0.08);
}


/* Disabled input */

#chatbot-input:disabled {
  background: #f0f2f0;

  cursor: not-allowed;
}


/* =========================================================
   SEND BUTTON
   ========================================================= */

#chatbot-send {
  background: var(--deliza-green);

  color: var(--deliza-white);

  border: none;

  border-radius: 50%;

  width: 38px;
  height: 38px;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 1rem;

  flex-shrink: 0;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.15s ease;
}


/* Send hover */

#chatbot-send:hover {
  background: var(--deliza-green-dark);

  transform: scale(1.05);
}


/* Send disabled */

#chatbot-send:disabled {
  opacity: 0.45;

  cursor: not-allowed;

  transform: none;
}


/* =========================================================
   SCROLLBAR
   ========================================================= */

#chatbot-messages::-webkit-scrollbar {
  width: 6px;
}


#chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}


#chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(11, 61, 32, 0.30);

  border-radius: 10px;
}


#chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 61, 32, 0.50);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 576px) {

  #chatbot-widget {
    bottom: 14px;
    right: 14px;
  }


  #chatbot-label {
    font-size: 0.6rem;

    padding: 2px 7px;

    margin-top: 4px;
  }


  #chatbot-toggle {
    width: 56px;
    height: 56px;

    font-size: 24px;
  }


  #chatbot-window {
    width: 100vw;
  }


  .chatbot-header {
    padding: 10px 14px;
  }


  .chatbot-header h3 {
    font-size: 0.875rem;
  }


  #chatbot-messages {
    padding: 10px;

    gap: 8px;
  }


  .chatbot-msg {
    font-size: 0.8rem;

    padding: 8px 11px;
  }


  .chatbot-typing {
    font-size: 0.8rem;

    padding: 8px 11px;
  }


  .chatbot-input-area {
    padding: 8px 10px;

    gap: 6px;
  }


  #chatbot-input {
    font-size: 0.8rem;

    padding: 7px 13px;
  }


  #chatbot-send {
    width: 34px;
    height: 34px;

    font-size: 0.9rem;

    flex-shrink: 0;
  }

}


 
