/* ---------- XTINT AI chatbot ---------- */
.xtint-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  font-family: 'Sora', sans-serif;
}

/* Small launcher button */
.xtint-chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(193,244,92,.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20,24,20,.98), rgba(8,10,8,.98));
  color: var(--white);
  padding: 11px 17px 11px 13px;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0,0,0,.42), 0 0 24px rgba(193,244,92,.16);
  animation: chatbotFloat 3s ease-in-out infinite;
}

.xtint-chat-launcher:hover {
  border-color: rgba(193,244,92,.62);
  box-shadow: 0 22px 50px rgba(0,0,0,.48), 0 0 30px rgba(193,244,92,.26);
}

.ai-orb {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 50%;
  background-color: #0e120c;
  background-image: url("images/chatbot/xtint-assistant.png");
  background-repeat: no-repeat;
  background-size: 290%;
  background-position: 50% 9%;
  border: 2px solid rgba(193,244,92,.6);
  box-shadow: 0 0 18px rgba(193,244,92,.4), inset 0 0 10px rgba(0,0,0,.35);
}

.ai-orb::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(193,244,92,.45);
  animation: aiPulse 1.8s ease-out infinite;
}

/* small "online" badge in the corner */
.ai-orb span {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #0c0f0a;
  box-shadow: 0 0 8px rgba(193,244,92,.7);
}

.launcher-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.launcher-copy small {
  font-family: 'Saira', sans-serif;
  font-weight: 800;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}

.launcher-copy strong {
  font-family: 'Saira', sans-serif;
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}

/* Proactive greeter bubble */
.xtint-chat-teaser {
  position: absolute;
  right: 6px;
  bottom: 88px;
  width: 252px;
  max-width: calc(100vw - 40px);
  display: none;
  padding: 14px 32px 14px 16px;
  background: linear-gradient(180deg, #161c12, #0a0d07);
  border: 1px solid rgba(193,244,92,.4);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,.5), 0 0 26px rgba(193,244,92,.16);
  color: #e9eee0;
  font-family: 'Sora', sans-serif;
  font-size: .9rem;
  line-height: 1.42;
  cursor: pointer;
  transform-origin: bottom right;
  z-index: 9998;
}

.xtint-chat-teaser.is-visible {
  display: block;
  animation: teaserIn .32s cubic-bezier(.18,.9,.32,1.2) both;
}

.xtint-chat-teaser::after {
  content: '';
  position: absolute;
  right: 26px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  background: #0a0d07;
  border-right: 1px solid rgba(193,244,92,.4);
  border-bottom: 1px solid rgba(193,244,92,.4);
  transform: rotate(45deg);
}

.xtint-chat-teaser .teaser-text {
  margin: 0;
}

.teaser-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--grey);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
}

.teaser-close:hover {
  color: var(--green);
}

.teaser-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
}

.teaser-typing .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  opacity: .4;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.teaser-typing .dot:nth-child(2) { animation-delay: .15s; }
.teaser-typing .dot:nth-child(3) { animation-delay: .3s; }

@keyframes teaserIn {
  from { opacity: 0; transform: translateY(12px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Main chat window */
.xtint-chat-window {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(370px, calc(100vw - 44px));
  border-radius: 24px;
  background: linear-gradient(180deg, #101410, #070907);
  border: 1px solid rgba(193,244,92,.32);
  box-shadow: 0 30px 90px rgba(0,0,0,.62), 0 0 38px rgba(193,244,92,.14);
  display: none;
  overflow: visible;
}

/* Open state */
.xtint-chat-window.open {
  display: block;
  animation: chatOpen .28s ease;
}

/* Chatbot header */
.xtint-chat-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 18px 16px;
  background: linear-gradient(90deg, #0a0d07, #17200f);
  border-radius: 24px 24px 0 0;
  border-bottom: 1px solid rgba(193,244,92,.2);
}

.xtint-chat-header strong {
  display: block;
  font-family: 'Saira', sans-serif;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.xtint-chat-header span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--grey);
  font-size: .78rem;
  margin-top: 4px;
}

.xtint-chat-header span::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 7px;
  animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(193,244,92,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(193,244,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(193,244,92,0); }
}

.xtint-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.xtint-chat-header .xtint-chat-call,
.xtint-chat-header button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(193,244,92,.28);
  background: rgba(193,244,92,.08);
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.xtint-chat-header .xtint-chat-call:hover,
.xtint-chat-header button:hover {
  background: rgba(193,244,92,.16);
  border-color: rgba(193,244,92,.55);
  transform: translateY(-1px);
}

.xtint-chat-header .xtint-chat-call svg {
  width: 17px;
  height: 17px;
}

.xtint-chat-header button {
  font-size: 1.4rem;
  line-height: 1;
}

.xtint-chat-body {
  min-height: 260px;
  max-height: 360px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(120% 55% at 50% -8%, rgba(193,244,92,.12), transparent 62%);
  scrollbar-width: thin;
  scrollbar-color: rgba(193,244,92,.35) transparent;
}

.xtint-chat-body::-webkit-scrollbar {
  width: 6px;
}

.xtint-chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.xtint-chat-body::-webkit-scrollbar-thumb {
  background: rgba(193,244,92,.35);
  border-radius: 999px;
}

.xtint-chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(193,244,92,.6);
}

.bot-msg,
.user-msg {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 15px;
  font-size: .9rem;
  line-height: 1.45;
  white-space: pre-line;
}

.bot-msg {
  align-self: flex-start;
  background: rgba(255,255,255,.06);
  color: #e6eadf;
  border: 1px solid rgba(193,244,92,.12);
}

.user-msg {
  align-self: flex-end;
  background: var(--green);
  color: #0a0d07;
  font-weight: 600;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.quick-replies button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(193,244,92,.28);
  background: rgba(193,244,92,.08);
  color: var(--green);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: 'Saira', sans-serif;
  font-weight: 700;
  font-size: .76rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.quick-replies button:hover {
  background: rgba(193,244,92,.16);
  border-color: rgba(193,244,92,.55);
  transform: translateY(-1px);
}

.chat-booking-action {
  align-self: flex-start;
  margin: 2px 0 4px 41px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: calc(100% - 41px);
}

.chat-booking-price {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  width: fit-content;
  padding: 9px 12px;
  border: 1px solid rgba(193,244,92,.3);
  border-radius: 10px;
  background: rgba(193,244,92,.08);
  color: #dfe6d8;
  font-size: .76rem;
}

.chat-booking-price strong {
  color: var(--green);
  font-family: 'Saira', sans-serif;
  font-size: 1.05rem;
  line-height: 1;
}

.chat-booking-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #0a0d07;
  padding: 11px 15px;
  font-family: 'Saira', sans-serif;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.chat-booking-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(193,244,92,.25);
}

.chat-booking-note {
  color: #9da297;
  font-size: .72rem;
  line-height: 1.4;
}

.quick-replies button svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex: 0 0 13px;
}

/* Bot messages get the XTINT mascot as an avatar */
.bot-row {
  align-self: flex-start;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  max-width: 92%;
}

.bot-row .bot-msg {
  align-self: auto;
  max-width: none;
}

.bot-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #0e120c;
  background-image: url("images/chatbot/xtint-assistant.png");
  background-repeat: no-repeat;
  background-size: 290%;
  background-position: 50% 9%;
  border: 1px solid rgba(193,244,92,.42);
  box-shadow: 0 0 12px rgba(193,244,92,.22);
}

/* Animated typing indicator */
.bot-msg.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 15px 16px;
}

.bot-msg.typing .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  opacity: .4;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.bot-msg.typing .dot:nth-child(2) { animation-delay: .15s; }
.bot-msg.typing .dot:nth-child(3) { animation-delay: .3s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* Messages fade + slide in */
.bot-row,
.user-msg {
  animation: msgIn .28s ease both;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.xtint-chat-form {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(193,244,92,.18);
  background: rgba(0,0,0,.22);
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

.xtint-chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(193,244,92,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--white);
  padding: 12px 14px;
  outline: none;
}

.xtint-chat-form input::placeholder {
  color: var(--grey);
}

.xtint-chat-form button {
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #0a0d07;
  padding: 0 16px;
  font-family: 'Saira', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

/* "Talk to a human" WhatsApp handoff, pinned above the input */
.xtint-chat-whatsapp {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 14px 12px;
  padding: 11px 14px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(37,211,102,.10);
  border: 1px solid rgba(37,211,102,.32);
  color: #e6eadf;
  font-family: 'Sora', sans-serif;
  font-size: .84rem;
  line-height: 1.3;
  transition: background .2s ease, border-color .2s ease;
}

.xtint-chat-whatsapp:hover {
  background: rgba(37,211,102,.18);
  border-color: rgba(37,211,102,.62);
}

.xtint-chat-whatsapp svg {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  fill: #25D366;
}

.xtint-chat-whatsapp strong {
  display: block;
  color: #fff;
  font-weight: 600;
}

.xtint-chat-whatsapp small {
  display: block;
  color: var(--grey);
  font-size: .72rem;
}

@keyframes chatOpen {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aiPulse {
  0% {
    transform: scale(.8);
    opacity: .75;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes chatbotFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media(max-width: 600px) {
  .xtint-chatbot {
    right: 14px;
    bottom: 14px;
  }

  .xtint-chat-launcher {
    padding: 10px 14px 10px 12px;
  }

  .ai-orb {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .launcher-copy small {
    font-size: .56rem;
  }

  .launcher-copy strong {
    font-size: .86rem;
  }

  .xtint-chat-window {
    width: calc(100vw - 28px);
    bottom: 64px;
  }

  .xtint-chat-body {
    max-height: 320px;
  }

  .xtint-chat-teaser {
    bottom: 80px;
    right: 2px;
  }
}
