/*
 * EsVets Simple Chatbot
 * Colors: #1a6b5f teal | #f4a435 orange | #d6eeea mint | #c8e6e2 chip
 * All values hardcoded with !important to prevent theme override
 */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ══════════════════════════════════════
   BOTTOM-RIGHT WELCOME POPUP
══════════════════════════════════════ */

#esbot-popup {
  position: fixed !important;
  bottom: 100px !important;
  right: 24px !important;
  width: 300px !important;
  z-index: 2147483646 !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  animation: esbot-popin 0.45s cubic-bezier(.34,1.38,.64,1) both !important;
}
@keyframes esbot-popin {
  from { opacity: 0; transform: translateY(24px) scale(0.93); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#esbot-popup.esbot-popout {
  animation: esbot-popout 0.3s ease forwards !important;
  pointer-events: none !important;
}
@keyframes esbot-popout {
  to { opacity: 0; transform: translateY(16px) scale(0.9); }
}

#esbot-popup-inner {
  background: #ffffff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 48px rgba(26,107,95,0.25), 0 0 0 1px rgba(26,107,95,0.1) !important;
}

/* Popup header */
#esbot-popup-hdr {
  background: linear-gradient(135deg, #1a6b5f 0%, #124f46 100%) !important;
  padding: 13px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
#esbot-popup-paw {
  font-size: 26px !important;
  line-height: 1 !important;
  animation: esbot-pawbob 2.4s ease-in-out infinite !important;
  flex-shrink: 0 !important;
}
@keyframes esbot-pawbob {
  0%,100% { transform: rotate(-5deg) translateY(0); }
  50%      { transform: rotate(5deg) translateY(-4px); }
}
#esbot-popup-title {
  flex: 1 !important;
  min-width: 0 !important;
}
#esbot-popup-title strong {
  display: block !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#esbot-popup-title span {
  font-size: 11px !important;
  color: rgba(255,255,255,0.75) !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 2px !important;
}
#esbot-popup-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #6ee8a0 !important;
  box-shadow: 0 0 5px #6ee8a0 !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  animation: esbot-blink 2s ease-in-out infinite !important;
}


#esbot-popup-x {
  background: rgba(255,255,255,0.18) !important;
  border: none !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  transition: background 0.18s !important;
}
#esbot-popup-x:hover { background: rgba(255,255,255,0.3) !important; }
#esbot-popup-body {
  padding: 14px 14px 15px !important;
}
#esbot-popup-msg {
  font-size: 12.5px !important;
  color: #0d2b26 !important;
  line-height: 1.55 !important;
  margin: 0 0 12px !important;
  font-family: 'Nunito', Arial, sans-serif !important;
}
#esbot-popup-msg strong { color: #1a6b5f !important; }

/* Info grid */
#esbot-popup-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}
.esbot-pcard {
  background: #d6eeea !important;
  border: 1px solid #9ecec8 !important;
  border-radius: 10px !important;
  padding: 9px 9px !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
}
.esbot-pcard > span { font-size: 15px !important; flex-shrink: 0 !important; margin-top: 1px !important; }
.esbot-pcard em {
  display: block !important;
  font-style: normal !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  color: #4a8880 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 1px !important;
}
.esbot-pcard strong {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #0d2b26 !important;
  line-height: 1.4 !important;
}
.esbot-pcard strong a { color: #1a6b5f !important; text-decoration: none !important; }

/* Service tags */
#esbot-popup-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-bottom: 12px !important;
}
#esbot-popup-tags span {
  background: #c8e6e2 !important;
  border: 1px solid #9ecec8 !important;
  color: #1a6b5f !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 4px 9px !important;
  border-radius: 20px !important;
  font-family: 'Nunito', Arial, sans-serif !important;
}

/* CTA buttons */
#esbot-popup-btns {
  display: flex !important;
  gap: 7px !important;
}
#esbot-popup-book, #esbot-popup-chat {
  flex: 1 !important;
  padding: 10px 6px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  cursor: pointer !important;
  text-align: center !important;
  text-decoration: none !important;
  display: block !important;
  transition: all 0.18s !important;
  line-height: 1.3 !important;
}
#esbot-popup-book {
  background: #1a6b5f !important;
  color: #ffffff !important;
  border: none !important;
}
#esbot-popup-book:hover { background: #124f46 !important; color: #fff !important; }
#esbot-popup-chat {
  background: transparent !important;
  color: #1a6b5f !important;
  border: 2px solid #9ecec8 !important;
}
#esbot-popup-chat:hover { background: #d6eeea !important; border-color: #1a6b5f !important; }





/* ── BUBBLE ── */
#esbot-bubble {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 62px !important;
  height: 62px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #1e7b6f 0%, #1a6b5f 100%) !important;
  box-shadow: 0 6px 24px rgba(26,107,95,0.45), 0 2px 8px rgba(0,0,0,0.18) !important;
  border: 3px solid rgba(255,255,255,0.32) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 2147483645 !important;
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s !important;
}
#esbot-bubble:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 10px 34px rgba(26,107,95,0.55) !important;
}
#esbot-bubble::before {
  content: '' !important;
  position: absolute !important;
  inset: -6px !important;
  border-radius: 50% !important;
  border: 2px solid #1e7b6f !important;
  opacity: 0 !important;
  animation: esbot-ring 3s ease-out infinite !important;
}
@keyframes esbot-ring {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.65); opacity: 0;  }
}

#esbot-ndot {
  position: absolute !important;
  top: 1px !important;
  right: 1px !important;
  width: 15px !important;
  height: 15px !important;
  border-radius: 50% !important;
  background: #f4a435 !important;
  border: 2.5px solid #fff !important;
  display: block !important;
  animation: esbot-nd 1.6s ease-in-out infinite alternate !important;
}
@keyframes esbot-nd {
  from { transform: scale(1);    }
  to   { transform: scale(1.15); }
}

/* ── CHAT WINDOW ── */
#esbot-win {
  position: fixed !important;
  bottom: 98px !important;
  right: 24px !important;
  width: 355px !important;
  height: 560px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 60px rgba(26,107,95,0.22), 0 0 0 1px rgba(26,107,95,0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 2147483644 !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  transform: scale(0.88) translateY(16px) !important;
  transform-origin: bottom right !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.3s cubic-bezier(.34,1.4,.64,1), opacity 0.25s !important;
}
#esbot-win.esbot-open {
  transform: scale(1) translateY(0) !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

/* ── HEADER ── */
#esbot-hdr {
  background: linear-gradient(135deg, #1a6b5f 0%, #124f46 100%) !important;
  padding: 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  flex-shrink: 0 !important;
}
#esbot-hav {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.18) !important;
  border: 2px solid rgba(255,255,255,0.32) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  flex-shrink: 0 !important;
}
#esbot-hinfo { flex: 1 !important; }
#esbot-hname {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  font-family: 'Nunito', Arial, sans-serif !important;
}
#esbot-hsub {
  font-size: 11.5px !important;
  color: rgba(255,255,255,0.78) !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 3px !important;
}
#esbot-odot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #6ee8a0 !important;
  box-shadow: 0 0 6px #6ee8a0 !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  animation: esbot-blink 2s ease-in-out infinite !important;
}
@keyframes esbot-blink { 0%,100%{opacity:1;} 50%{opacity:0.25;} }

#esbot-hclose {
  background: rgba(255,255,255,0.15) !important;
  border: none !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  transition: background 0.18s !important;
  flex-shrink: 0 !important;
}
#esbot-hclose:hover { background: rgba(255,255,255,0.28) !important; }

/* ── BANNER ── */
#esbot-banner {
  background: #d6eeea !important;
  border-bottom: 1px solid #9ecec8 !important;
  padding: 9px 14px !important;
  font-size: 12.5px !important;
  color: #1a6b5f !important;
  font-weight: 700 !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}
#esbot-banner a {
  color: #1a6b5f !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

/* ── MESSAGES ── */
#esbot-msgs {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 14px 13px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  scroll-behavior: smooth !important;
}
#esbot-msgs::-webkit-scrollbar { width: 3px !important; }
#esbot-msgs::-webkit-scrollbar-thumb { background: #9ecec8 !important; border-radius: 4px !important; }

.esbot-msg {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  animation: esbot-mi 0.28s cubic-bezier(.34,1.4,.64,1) !important;
}
@keyframes esbot-mi { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:none;} }

.esbot-msg.esbot-user { align-items: flex-end !important; }
.esbot-msg.esbot-bot  { align-items: flex-start !important; }

.esbot-mrow {
  display: flex !important;
  align-items: flex-end !important;
  gap: 7px !important;
}
.esbot-msg.esbot-bot  .esbot-mrow { flex-direction: row !important; }
.esbot-msg.esbot-user .esbot-mrow { flex-direction: row-reverse !important; }

.esbot-av {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: #1a6b5f !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
  margin-bottom: 2px !important;
}

.esbot-bub {
  max-width: 80% !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  word-break: break-word !important;
  font-family: 'Nunito', Arial, sans-serif !important;
}
.esbot-msg.esbot-user .esbot-bub {
  background: #1a6b5f !important;
  color: #ffffff !important;
  border-bottom-right-radius: 3px !important;
  font-weight: 600 !important;
}
.esbot-msg.esbot-bot .esbot-bub {
  background: #d6eeea !important;
  color: #0d2b26 !important;
  border-bottom-left-radius: 3px !important;
  border: 1px solid #9ecec8 !important;
}
.esbot-msg.esbot-bot .esbot-bub a      { color: #1a6b5f !important; font-weight: 700 !important; }
.esbot-msg.esbot-bot .esbot-bub strong { color: #124f46 !important; }

.esbot-time {
  font-size: 10px !important;
  color: #4a8880 !important;
  padding: 0 4px !important;
  font-family: 'Nunito', Arial, sans-serif !important;
}

/* ── TYPING INDICATOR ── */
.esbot-typing {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 12px 15px !important;
}
.esbot-typing span {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #4a8880 !important;
  animation: esbot-type 1.2s ease-in-out infinite !important;
}
.esbot-typing span:nth-child(2) { animation-delay: 0.2s !important; }
.esbot-typing span:nth-child(3) { animation-delay: 0.4s !important; }
@keyframes esbot-type {
  0%,60%,100% { transform: translateY(0);    opacity: 0.4; }
  30%          { transform: translateY(-5px); opacity: 1;   }
}

/* ── FAQ CHIPS ── */
#esbot-chips {
  padding: 0 11px 9px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}
.esbot-chip {
  background: #c8e6e2 !important;
  border: 1.5px solid #9ecec8 !important;
  color: #1a6b5f !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  padding: 6px 13px !important;
  border-radius: 20px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.18s !important;
  line-height: 1.3 !important;
}
.esbot-chip:hover {
  background: #1a6b5f !important;
  border-color: #1a6b5f !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* ── INPUT FOOTER ── */
#esbot-foot {
  padding: 10px 12px 12px !important;
  border-top: 1px solid #9ecec8 !important;
  background: #d6eeea !important;
  display: flex !important;
  gap: 8px !important;
  align-items: flex-end !important;
  flex-shrink: 0 !important;
}
#esbot-input {
  flex: 1 !important;
  background: #ffffff !important;
  border: 1.5px solid #9ecec8 !important;
  border-radius: 13px !important;
  padding: 9px 13px !important;
  font-size: 13.5px !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  color: #0d2b26 !important;
  outline: none !important;
  resize: none !important;
  min-height: 40px !important;
  max-height: 88px !important;
  line-height: 1.5 !important;
  box-sizing: border-box !important;
  transition: border-color 0.18s !important;
}
#esbot-input::placeholder { color: #4a8880 !important; }
#esbot-input:focus        { border-color: #1a6b5f !important; }

#esbot-send {
  width: 40px !important;
  height: 40px !important;
  background: #1a6b5f !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  transition: transform 0.14s, box-shadow 0.14s !important;
}
#esbot-send:hover  { transform: scale(1.07) !important; box-shadow: 0 4px 14px rgba(26,107,95,0.4) !important; }
#esbot-send:active { transform: scale(0.94) !important; }

#esbot-credit {
  text-align: center !important;
  font-size: 10px !important;
  color: #4a8880 !important;
  padding: 2px 0 6px !important;
  font-family: 'Nunito', Arial, sans-serif !important;
  flex-shrink: 0 !important;
}

/* ── MOBILE ── */
@media screen and (max-width: 420px) {
  #esbot-win    { width: calc(100vw - 20px) !important; right: 10px !important; }
  #esbot-bubble { right: 14px !important; bottom: 14px !important; }
}
