/* Spark Holidays AI Chatbot PRO v4.2.0 - WhatsApp-style UI */
:root{
  --wa-green:#075e54;
  --wa-green-2:#128c7e;
  --wa-light:#dcf8c6;
  --wa-bg:#efe7dd;
  --wa-panel:#ffffff;
  --wa-text:#111b21;
  --wa-muted:#667781;
  --wa-line:#e9edef;
  --wa-send:#25d366;
  --wa-shadow:0 18px 60px rgba(0,0,0,.20);
}

#spark-chat-root,
#spark-chat-root *{
  box-sizing:border-box;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

#spark-chat-root{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:999999;
  color:var(--wa-text);
}

.spark-inline-mode{
  position:relative!important;
  right:auto!important;
  bottom:auto!important;
  z-index:1;
}
.spark-inline-mode #spark-launcher,
.spark-inline-mode #spark-launcher-greeting{display:none!important;}
.spark-inline-mode #spark-chat-window{
  position:relative!important;
  display:flex!important;
  right:auto!important;
  bottom:auto!important;
  width:100%!important;
  height:640px!important;
  max-height:none!important;
}

/* Keep launcher transparent as requested */
#spark-launcher{
  width:84px;
  height:84px;
  border:0;
  border-radius:0;
  background:transparent!important;
  box-shadow:none!important;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  overflow:visible;
  padding:0;
  transition:transform .22s ease, filter .22s ease;
  -webkit-tap-highlight-color:transparent;
}
#spark-launcher:hover{
  transform:translateY(-4px) scale(1.04);
  filter:drop-shadow(0 8px 18px rgba(0,0,0,.16));
}
#spark-launcher-lottie{
  width:84px;
  height:84px;
  display:block;
  background:transparent!important;
}
#spark-launcher svg,
#spark-launcher canvas{
  background:transparent!important;
  overflow:visible!important;
}
.spark-launcher-fallback{
  display:none;
  position:relative;
  z-index:2;
  font-size:36px;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.18));
}
#spark-launcher.spark-lottie-failed .spark-launcher-fallback{display:block;}
#spark-launcher.spark-lottie-failed #spark-launcher-lottie{display:none;}

#spark-unread-dot{
  position:absolute;
  top:4px;
  right:3px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:none;
  place-items:center;
  background:#25d366;
  color:#fff;
  border-radius:999px;
  border:2px solid #fff;
  font-size:11px;
  font-weight:800;
  box-shadow:0 6px 16px rgba(37,211,102,.34);
}

#spark-launcher-greeting{
  position:absolute;
  right:84px;
  bottom:18px;
  max-width:275px;
  padding:10px 14px;
  background:#fff;
  color:#111b21;
  border:1px solid rgba(17,27,33,.08);
  border-radius:16px 16px 4px 16px;
  box-shadow:0 12px 34px rgba(0,0,0,.14);
  white-space:nowrap;
  font-size:13px;
  font-weight:600;
}
.spark-greeting-text:before{
  content:"💬 ";
}

/* Main WhatsApp card */
#spark-chat-window{
  position:absolute;
  right:0;
  bottom:92px;
  width:410px;
  height:660px;
  max-height:calc(100vh - 116px);
  display:none;
  flex-direction:column;
  overflow:hidden;
  background:var(--wa-panel);
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  box-shadow:var(--wa-shadow);
  animation:sparkWAIn .22s ease;
}
@keyframes sparkWAIn{
  from{opacity:0;transform:translateY(16px) scale(.985);}
  to{opacity:1;transform:none;}
}

/* Header like WhatsApp */
.spark-header{
  min-height:76px;
  padding:12px 14px;
  color:#fff;
  display:flex;
  gap:11px;
  align-items:center;
  position:relative;
  background:linear-gradient(135deg,var(--wa-green),var(--wa-green-2));
  border-bottom:0;
}
.spark-header:before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 100% 0,rgba(255,255,255,.13),transparent 34%);
  pointer-events:none;
}
.spark-header > *{
  position:relative;
  z-index:1;
}
.spark-avatar{
  width:46px;
  height:46px;
  flex:0 0 46px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.16);
  color:#fff;
  border:1px solid rgba(255,255,255,.20);
  box-shadow:0 8px 18px rgba(0,0,0,.14);
  font-size:22px;
}
.spark-header strong{
  display:block;
  font-size:18px;
  line-height:1.05;
  font-weight:800;
  letter-spacing:.1px;
}
.spark-header span{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:5px;
  font-size:12px;
  line-height:1.2;
  color:rgba(255,255,255,.90);
  font-weight:500;
}
.spark-header span:before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#25d366;
  box-shadow:0 0 0 3px rgba(37,211,102,.18);
}
.spark-header button{
  margin-left:auto;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:25px;
  line-height:1;
  cursor:pointer;
  transition:background .18s ease, transform .18s ease;
}
.spark-header button:hover{
  background:rgba(255,255,255,.20);
  transform:rotate(90deg);
}

/* Quick top chips */
.spark-trust{
  display:flex;
  gap:8px;
  padding:10px 12px;
  overflow-x:auto;
  background:#f7f9fa;
  border-bottom:1px solid var(--wa-line);
  scrollbar-width:none;
}
.spark-trust::-webkit-scrollbar{display:none;}
.spark-trust span{
  flex:0 0 auto;
  padding:7px 11px;
  border-radius:999px;
  background:#fff;
  border:1px solid #dfe5e7;
  color:#075e54;
  font-size:11.5px;
  font-weight:700;
}

/* WhatsApp wallpaper background */
#spark-messages{
  flex:1;
  padding:14px 12px 10px;
  overflow-y:auto;
  background-color:var(--wa-bg);
  background-image:
    radial-gradient(circle at 20% 22%,rgba(255,255,255,.30) 0 1px,transparent 1.5px),
    radial-gradient(circle at 70% 34%,rgba(255,255,255,.22) 0 1px,transparent 1.5px),
    radial-gradient(circle at 36% 78%,rgba(255,255,255,.24) 0 1px,transparent 1.5px),
    linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.05));
  background-size:34px 34px,42px 42px,38px 38px,100% 100%;
  scroll-behavior:smooth;
}
.spark-msg-row{
  display:flex;
  margin:7px 0;
  animation:sparkMsgIn .16s ease both;
}
.spark-incoming{justify-content:flex-start;}
.spark-outgoing{justify-content:flex-end;}
@keyframes sparkMsgIn{
  from{opacity:0;transform:translateY(7px);}
  to{opacity:1;transform:none;}
}

/* Bubbles with tails */
.spark-bubble{
  max-width:84%;
  padding:8px 10px 6px;
  border-radius:8px;
  font-size:13.6px;
  line-height:1.46;
  word-wrap:break-word;
  position:relative;
  box-shadow:0 1px .5px rgba(11,20,26,.13);
}
.spark-in{
  color:#111b21;
  background:#fff;
  border:0;
  border-top-left-radius:0;
}
.spark-in:before{
  content:"";
  position:absolute;
  left:-8px;
  top:0;
  width:0;
  height:0;
  border-top:8px solid #fff;
  border-left:8px solid transparent;
}
.spark-out{
  color:#111b21;
  background:var(--wa-light);
  border:0;
  border-top-right-radius:0;
}
.spark-out:before{
  content:"";
  position:absolute;
  right:-8px;
  top:0;
  width:0;
  height:0;
  border-top:8px solid var(--wa-light);
  border-right:8px solid transparent;
}
.spark-time{
  display:block;
  margin-top:4px;
  color:#8696a0;
  font-size:10px;
  line-height:1;
  text-align:right;
}
.spark-out .spark-time:after{
  content:" ✓✓";
  color:#53bdeb;
  font-weight:800;
}
.spark-bubble a{
  color:#027eb5;
  font-weight:700;
  text-decoration:none;
}

/* Quick reply buttons */
.spark-qr-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 3px;
}
.spark-qr-wrap button{
  border:1px solid rgba(18,140,126,.24);
  background:#fff;
  color:#075e54;
  border-radius:999px;
  padding:8px 11px;
  font-size:12px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:all .18s ease;
}
.spark-qr-wrap button:hover{
  background:#e7f7f2;
  border-color:rgba(18,140,126,.38);
  transform:translateY(-1px);
}

/* Typing dots */
#spark-typing{
  width:58px;
  margin:8px 0;
  padding:11px 12px;
  display:none;
  align-items:center;
  gap:5px;
  background:#fff;
  border-radius:8px;
  border-top-left-radius:0;
  box-shadow:0 1px .5px rgba(11,20,26,.13);
}
#spark-typing span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#8696a0;
  animation:sparkDot 1.1s infinite;
}
#spark-typing span:nth-child(2){animation-delay:.18s;}
#spark-typing span:nth-child(3){animation-delay:.36s;}
@keyframes sparkDot{
  0%,70%,100%{transform:none;opacity:.45;}
  35%{transform:translateY(-4px);opacity:1;}
}

/* CTA area */
.spark-cta{
  display:flex;
  gap:9px;
  padding:10px 12px;
  background:#f0f2f5;
  border-top:1px solid #dfe5e7;
}
.spark-cta a,
.spark-cta button{
  flex:1;
  min-height:42px;
  display:grid;
  place-items:center;
  border-radius:999px;
  padding:10px;
  font-size:12.5px;
  font-weight:800;
  text-align:center;
  text-decoration:none;
  cursor:pointer;
  transition:all .18s ease;
}
.spark-cta a{
  color:#fff;
  background:#25d366;
  border:1px solid rgba(37,211,102,.25);
  box-shadow:0 8px 18px rgba(37,211,102,.20);
}
.spark-cta button{
  color:#075e54;
  background:#fff;
  border:1px solid #dfe5e7;
}
.spark-cta a:hover,
.spark-cta button:hover{
  transform:translateY(-1px);
  box-shadow:0 9px 18px rgba(0,0,0,.10);
}

/* Input area like WhatsApp */
.spark-inputbar{
  display:flex;
  align-items:flex-end;
  gap:9px;
  padding:10px 11px;
  background:#f0f2f5;
  border-top:1px solid #dfe5e7;
}
#spark-input{
  flex:1;
  min-height:44px;
  max-height:120px;
  resize:none;
  outline:none;
  background:#fff;
  border:0;
  border-radius:22px;
  padding:12px 15px;
  color:#111b21;
  font-size:14px;
  line-height:1.35;
  box-shadow:none;
}
#spark-input::placeholder{color:#8696a0;}
#spark-input:focus{box-shadow:0 0 0 2px rgba(18,140,126,.14);}
.spark-inputbar button{
  width:44px;
  height:44px;
  flex:0 0 44px;
  border:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#25d366;
  color:#fff;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
  box-shadow:none;
  transition:all .18s ease;
}
.spark-inputbar button:hover{
  transform:scale(1.04);
  background:#1fb85a;
}

#spark-messages::-webkit-scrollbar{width:5px;}
#spark-messages::-webkit-scrollbar-track{background:transparent;}
#spark-messages::-webkit-scrollbar-thumb{background:rgba(17,27,33,.18);border-radius:99px;}

@media(max-width:520px){
  #spark-chat-root{right:10px;bottom:12px;}
  #spark-launcher,#spark-launcher-lottie{width:76px;height:76px;}
  #spark-launcher-greeting{display:none!important;}
  #spark-chat-window{
    width:calc(100vw - 14px);
    height:calc(100vh - 88px);
    right:-3px;
    bottom:76px;
    border-radius:16px;
  }
  .spark-header{min-height:72px;padding:11px 12px;}
  .spark-avatar{width:42px;height:42px;flex-basis:42px;}
  .spark-header strong{font-size:17px;}
  .spark-bubble{max-width:88%;font-size:13.25px;}
  #spark-messages{padding:12px 10px 9px;}
  .spark-trust{padding:8px 10px;}
  .spark-cta{padding:9px;gap:8px;}
  .spark-inputbar{padding:9px;}
}

@media(max-width:380px){
  .spark-cta a,.spark-cta button{font-size:11.5px;padding:9px 7px;}
  .spark-trust span{font-size:10.5px;padding:7px 9px;}
}

/* Strong force override */
html body #spark-chat-root #spark-chat-window{
  background:#fff!important;
  border-radius:18px!important;
  box-shadow:0 18px 60px rgba(0,0,0,.20)!important;
}
html body #spark-chat-root .spark-header{
  color:#fff!important;
  background:linear-gradient(135deg,#075e54,#128c7e)!important;
  border-bottom:0!important;
}
html body #spark-chat-root #spark-messages{
  background-color:#efe7dd!important;
}
html body #spark-chat-root .spark-bubble.spark-in{
  background:#fff!important;
  color:#111b21!important;
}
html body #spark-chat-root .spark-bubble.spark-out{
  background:#dcf8c6!important;
  color:#111b21!important;
}
html body #spark-chat-root .spark-inputbar,
html body #spark-chat-root .spark-cta{
  background:#f0f2f5!important;
}
html body #spark-chat-root .spark-inputbar button{
  background:#25d366!important;
}


/* v4.2.1 - AI markdown emphasis/highlight fix */
#spark-chat-root .spark-md-bold{
  font-weight:800!important;
  color:#075e54!important;
  background:rgba(37,211,102,.14)!important;
  border-radius:6px!important;
  padding:1px 5px!important;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
#spark-chat-root .spark-out .spark-md-bold{
  color:#075e54!important;
  background:rgba(255,255,255,.45)!important;
}
#spark-chat-root .spark-bubble strong{
  font-weight:800!important;
}


/* v4.2.2 - Render every markdown-style emphasis, not just one word */
#spark-chat-root .spark-bubble .spark-md-bold,
#spark-chat-root .spark-bubble strong{
  font-weight:800!important;
  color:#075e54!important;
  background:rgba(37,211,102,.15)!important;
  border-radius:6px!important;
  padding:1px 5px!important;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
#spark-chat-root .spark-bubble.spark-out .spark-md-bold,
#spark-chat-root .spark-bubble.spark-out strong{
  color:#075e54!important;
  background:rgba(255,255,255,.42)!important;
}
#spark-chat-root .spark-bubble .spark-md-italic,
#spark-chat-root .spark-bubble em{
  font-style:italic!important;
  color:#1f3f39!important;
}
#spark-chat-root .spark-bubble .spark-md-code,
#spark-chat-root .spark-bubble code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;
  font-size:.92em!important;
  background:rgba(17,27,33,.08)!important;
  border-radius:5px!important;
  padding:1px 5px!important;
}
