#cara-chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #FBC67C;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10001;
}
#cara-chatbot-toggle img { 
  width: 50px;
  height: 60px;
  margin: -4px 4px 0 0;
}
#cara-chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 370px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  font-family: Arial, sans-serif !important;
  box-sizing: border-box;     /* prevent width overflow from padding/border */
}
@media (max-width: 430px) {
  #cara-chatbot-container {
    right: auto;                          /* stop pinning to right */
    left: 50%;                            /* center anchor */
    transform: translateX(-50%);          /* true center */
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));  /* keep clear of home indicator */
    width: min(360px, calc(100vw - 24px));/* 12px margin on each side */
    max-height: min(78vh, calc(100vh - 160px)); /* avoid top notch / URL bar */
    border-radius: 12px;
  }
}
#cara-chatbot-header {
  background: #FBC67C;
  color: #232324;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;     /* NEW */
}
.bot-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.status {
  font-size: 12px;
  color: #13ca7e;
}
#cara-chatbox {
  background: #fff;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}
.bot-msg, .user-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.user-msg { 
  justify-content: flex-end;
}
.bot-msg {
  justify-content: flex-start;
}
.msg-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.msg-text {
  color: #566069;
  font-size: 13px;
  line-height: 21px;
  letter-spacing: 0.3px;
  outline: none;
  background: #f2f3f6;
  font-family: "Support Board Font", "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif !important;
  padding: 10px 8px;
  border-radius: 8px;
  max-width: 70%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.msg-text-first {
  color: #566069;
  font-size: 13px;
  line-height: 21px;
  letter-spacing: 0.3px;
  outline: none;
  background: #f2f3f6;
  font-family: "Support Board Font", "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif !important;
  padding: 10px 8px;
  border-radius: 8px;
  max-width: 70%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.user-msg .msg-text {
  background: #e6f3ff !important;
}
.chat-btn {
  display: inline-block;
  background: #FBC67C;
  color: #232324 !important;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 5px;
  margin: 5px 0;
  font-size: 14px !important;
  width: 100%;
  text-align: center;
}
.chat-btn:hover{
  background-color: #F3AF50;
  color:#232324;
}
.chat-btn-call {
  display: inline-block;
  background: #274666;
  color: #fff !important;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 5px;
  margin: 5px 0;
  font-size: 14px !important;
  width: 100%;
  text-align: center;
}
.chat-btn-call:hover{
  background-color: #0F2235;
  color:#fff;
}
.input-row {
  display: flex;
  border-top: 1px solid #ccc;
  padding: 10px;
  background: #fff;
}
#userInput {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 10px;
  font-size: 14px;
  background: #f1f1f1;
  outline: none;
  color: #566069 !important;
}
#sendBtn {
  background: #FBC67C;
  color: #232324;
  border: none;
  border-radius: 50%;
  width: 36px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 16px;
  height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;        /* removes the dotted outline */
  box-shadow: none;     /* removes any glow effect */
}
#sendBtn:hover{
  background-color: #F3AF50;
}
#cara-chatbot-header strong {
  color: #232324;
  letter-spacing: 0.5px;
  font-size: 14px;
  white-space: nowrap;
  line-height: 22px;
  font-family: "Support Board Font", "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif !important;
  font-weight: 500;
}
.header-status {
  display: flex;
  flex-direction: column;
  letter-spacing: 0.5px;
  line-height: 22px;
  font-size: 12px;
  white-space: nowrap;
}
.fw-500{
  font-weight: 500 !important;
}
#cara-chatbot-toggle {
  transition: transform 0.3s ease;
}
#cara-chatbot-toggle.open {
  transform: rotate(90deg);
}
#cara-chatbot-toggle:hover{
  background-color: #F3AF50;
}
#cara-chatbot-toggle.open img{
  margin: 0 0 0 0 !important;
}
.typing span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 2px;
  background: #ccc;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}
/* width */
::-webkit-scrollbar {
  width: 5px;
}
/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 6px;
}
/* Handle */
::-webkit-scrollbar-thumb {
  background: #BFCBD3; 
  border-radius: 6px;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #9da1a3; 
}
.sb-main{
  display:none !important;
}
.msg-text a {
  color: #274666 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  text-decoration: underline !important;
}
 /* new */
#cara-chatbot-header .header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Close button in header */
#cara-chatbot-close.chat-close {
  background: transparent;
  border: none;
  color: #232324;
  font-size: 18px;        /* tweak size as you like */
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
  outline: none;        /* removes the dotted outline */
  box-shadow: none;     /* removes any glow effect */
}
#cara-chatbot-close.chat-close:hover {
  background: rgba(255,255,255,0.15);
}
#cara-chatbot-close.chat-close:active {
  transform: scale(0.96);
}

/* teaser */
#cara-chatbot-teaser {
  position: fixed;
  bottom: 100px;         /* sits above the floating button */
  right: 20px;           /* some spacing from button */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  max-width: 220px;
  line-height: 1.4;
  z-index: 10001;
 display: flex; 
 align-items: center; /* Vertically centers the items */
 justify-content: space-between; /* Pushes the button to the right and the text to the left */
}

#cara-chatbot-teaser::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  border-width: 10px 10px 0 10px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.12));
}

#cara-chatbot-teaser button#teaser-close {
  border: none;
  background: transparent;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  padding: 10px 10px 10px 24px !important;
}

/* newload */
/* Panel base – desktop defaults */
#cara-chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 360px;

  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);

  display: none;              /* toggled via JS */
  /* The three lines below make it a tall, flexible column */
  display: flex;
  flex-direction: column;
  height: 520px;              /* << increase overall height here */
  max-height: 80vh;           /* protect against very short viewports */

  overflow: hidden;
  z-index: 10000;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}

/* Header stays auto-height */
#cara-chatbot-header {
  background: #FBC67C;
  color: #232324;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* The chat stream grows to fill available space */
#cara-chatbox {
  background: #f8f8f8;
  flex: 1 1 auto;             /* << let it expand */
  min-height: 240px;          /* << avoid tiny boxes on odd layouts */
  max-height: none;           /* remove hard caps here; flex handles height */
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

/* Input row is fixed height at the bottom */
.input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #ccc;
  background: #fff;
  box-sizing: border-box;
}

/* Prevent the input from overflowing the row */
#userInput { min-width: 0; }

/* Mobile: center and use viewport height */
@media (max-width: 430px) {
  #cara-chatbot-container {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: min(360px, calc(100vw - 24px));
    height: 70vh;             /* << taller on mobile */
    max-height: 80vh;
  }
}

/* Optional fade when JS marks loading/ready */
#cara-chatbox.loading { opacity: 0; }
#cara-chatbox.ready   { opacity: 1; transition: opacity .15s ease; }

/* new */