/* JessBot Chat Widget Styles */
.jessbot-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  height: 600px;
  max-width: 95vw;
  max-height: 85vh;
  background: var(--jessbot-bg, #fff) center/cover no-repeat;
  border-radius: var(--jessbot-radius, 16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
  font-size: var(--jessbot-font-size, 16px);
  z-index: 9999;
}

/* JessBot Open Button Styles */
.jessbot-chat-open-btn {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 150px !important;
  height: 50px !important;
  border-radius: 25px !important;
  background: linear-gradient(135deg, var(--jessbot-button-gradient-start, #667eea) 0%, var(--jessbot-button-gradient-end, #764ba2) 100%);
  border: none !important;
  color: var(--jessbot-button-icon-color, white);
  cursor: pointer;
  box-shadow: none;
  z-index: 9999;
  display: flex;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 20px 0 16px !important;
  gap: 10px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  filter: none;
  transform: none !important;
  transition: none !important;
  margin: 0 !important;
}

.jessbot-chat-open-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.jessbot-chat-open-btn .jessbot-chat-text {
  color: var(--jessbot-header-color, white);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  line-height: 1;
  vertical-align: baseline;
  text-align: left;
  opacity: 0;
  transform: none !important;
  transition: opacity 0.6s ease-in-out !important;
}

.jessbot-chat-open-btn.jessbot-show-text .jessbot-chat-text {
  opacity: 1;
}

.jessbot-chat-open-btn:hover {
  outline: none;
  animation: jessbot-hover-pulse 1.5s ease-in-out infinite;
}

.jessbot-chat-open-btn:focus,
.jessbot-chat-open-btn:active {
  outline: none;
}

@keyframes jessbot-hover-pulse {
  0%, 100% {
    box-shadow: 0 0 10px var(--jessbot-button-gradient-start, #667eea);
    filter: brightness(1.05);
  }
  50% {
    box-shadow: 0 0 20px var(--jessbot-button-gradient-start, #667eea), 0 0 30px var(--jessbot-button-gradient-end, #764ba2);
    filter: brightness(1.1);
  }
}

/* Initial attention-grabbing animation */
.jessbot-chat-open-btn.jessbot-intro-flash {
  animation: jessbot-intro-pulse 2s ease-in-out;
}

@keyframes jessbot-intro-pulse {
  0%, 100% {
    box-shadow: none;
    filter: none;
  }
  25%, 75% {
    box-shadow: 0 0 20px var(--jessbot-button-gradient-start, #667eea), 0 0 40px var(--jessbot-button-gradient-end, #764ba2);
    filter: brightness(1.1);
  }
  50% {
    box-shadow: 0 0 30px var(--jessbot-button-gradient-start, #667eea), 0 0 60px var(--jessbot-button-gradient-end, #764ba2);
    filter: brightness(1.2);
  }
}




.jessbot-chat-header {
  background: var(--jessbot-header-bg, #222e3a);
  color: var(--jessbot-header-color, #fff);
  padding: 1.25rem;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.jessbot-chat-header span {
  flex: 1;
}

.jessbot-chat-header .jessbot-contact-icon-btn {
  margin-right: 4px;
}

/* Slick close button */
.jessbot-chat-header button {
  background: none;
  border: none;
  color: var(--jessbot-header-color, #fff);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.jessbot-chat-header button:hover {
  background: rgba(255,255,255,0.1);
  opacity: 1;
  transform: scale(1.1);
}

.jessbot-chat-messages {
  flex: 1 1 auto;
  padding: 1.5rem;
  overflow-y: auto;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jessbot-chat-input {
  display: flex;
  border-top: 1px solid #e0e0e0;
  background: var(--jessbot-input-bg, #f9f9f9);
  padding: 0;
}

.jessbot-chat-input input[type="text"] {
  flex: 1 1 auto;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  background: transparent;
  outline: none;
}

.jessbot-chat-input input[type="text"]::placeholder {
  color: #999;
  font-style: italic;
}

.jessbot-chat-input button {
  background: var(--jessbot-accent, #0073aa);
  color: #fff;
  border: none;
  padding: 0 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.jessbot-chat-input button:hover {
  background: var(--jessbot-accent-hover, #005a87);
  transform: translateY(-1px);
}

.jessbot-chat-input button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--jessbot-accent, #0073aa);
}

.jessbot-chat-message {
  margin-bottom: 0;
  line-height: 1.6;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
}

.jessbot-chat-message.user {
  text-align: right;
  color: #fff;
  background: var(--jessbot-accent, #0073aa);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.jessbot-chat-message.bot {
  text-align: left;
  color: var(--jessbot-bot-color, #333);
  background: #f0f0f0;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

/* Improved Contact Us button */
.jessbot-contact-btn {
  background: var(--jessbot-contact-bg, #f8f9fa) !important;
  color: var(--jessbot-contact-color, #666) !important;
  border: 2px solid var(--jessbot-contact-border, #e0e0e0) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1.5rem !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  margin: 1rem !important;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
}

.jessbot-contact-btn:hover {
  background: var(--jessbot-contact-hover-bg, #e9ecef) !important;
  color: var(--jessbot-contact-hover-color, #333) !important;
  border-color: var(--jessbot-contact-hover-border, #adb5bd) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.jessbot-contact-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* JessBot Position Classes */
.jessbot-pos-bottom-right { bottom: 24px; right: 24px; left: auto; top: auto; }
.jessbot-pos-bottom-middle { bottom: 24px; left: 50%; right: auto; top: auto; transform: translateX(-50%); }
.jessbot-pos-bottom-left { bottom: 24px; left: 24px; right: auto; top: auto; }
.jessbot-pos-top-left { top: 24px; left: 24px; right: auto; bottom: auto; }
.jessbot-pos-top-middle { top: 24px; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); }
.jessbot-pos-top-right { top: 24px; right: 24px; left: auto; bottom: auto; }
.jessbot-pos-centre-right { top: 50%; right: 24px; left: auto; bottom: auto; transform: translateY(-50%); }
.jessbot-pos-centre-middle { top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); }
/* Remove transform for default bottom-right */
.jessbot-pos-bottom-right, .jessbot-pos-bottom-left, .jessbot-pos-top-left, .jessbot-pos-top-right { transform: none !important; }

@media (max-width: 768px) {
  .jessbot-chat-widget {
    width: calc(100vw - 20px);
    height: calc(75vh - 75px);
    max-width: calc(100vw - 20px);
    max-height: calc(75vh - 75px);
    left: 10px !important;
    right: 10px !important;
    top: 50px !important;
    bottom: 50px !important;
    border-radius: var(--jessbot-radius, 16px);
    transform: none !important;
  }
  
  /* Position overrides for mobile - center all positions */
  .jessbot-pos-bottom-right .jessbot-chat-widget,
  .jessbot-pos-bottom-middle .jessbot-chat-widget,
  .jessbot-pos-bottom-left .jessbot-chat-widget,
  .jessbot-pos-top-left .jessbot-chat-widget,
  .jessbot-pos-top-middle .jessbot-chat-widget,
  .jessbot-pos-top-right .jessbot-chat-widget,
  .jessbot-pos-centre-right .jessbot-chat-widget,
  .jessbot-pos-centre-middle .jessbot-chat-widget {
    width: calc(100vw - 20px) !important;
    height: calc(75vh - 75px) !important;
    left: 10px !important;
    right: 10px !important;
    top: 50px !important;
    bottom: 50px !important;
    transform: none !important;
  }
  
  .jessbot-chat-open-btn {
    width: 130px;
    height: 45px;
    border-radius: 22.5px;
    font-size: 14px;
    padding: 0 15px 0 12px;
    gap: 8px;
    bottom: 20px;
    right: 20px;
  }

  .jessbot-chat-open-btn svg {
    width: 20px;
    height: 20px;
  }

  .jessbot-chat-open-btn .jessbot-chat-text {
    font-size: 14px;
  }


  
  .jessbot-chat-header {
    padding: 1rem;
    font-size: 1.1rem;
  }
  
  .jessbot-chat-messages {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .jessbot-chat-message {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    max-width: 90%;
  }
  
  .jessbot-chat-input input[type="text"] {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
  
  .jessbot-chat-input button {
    padding: 0 1.2rem;
    font-size: 0.9rem;
  }
  
  .jessbot-contact-btn {
    margin: 0.75rem !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  .jessbot-chat-widget {
    width: calc(100vw - 16px);
    height: calc(75vh - 60px);
    max-width: calc(100vw - 16px);
    max-height: calc(75vh - 60px);
    left: 8px !important;
    right: 8px !important;
    top: 40px !important;
    bottom: 40px !important;
  }
  
  /* Position overrides for small mobile */
  .jessbot-pos-bottom-right .jessbot-chat-widget,
  .jessbot-pos-bottom-middle .jessbot-chat-widget,
  .jessbot-pos-bottom-left .jessbot-chat-widget,
  .jessbot-pos-top-left .jessbot-chat-widget,
  .jessbot-pos-top-middle .jessbot-chat-widget,
  .jessbot-pos-top-right .jessbot-chat-widget,
  .jessbot-pos-centre-right .jessbot-chat-widget,
  .jessbot-pos-centre-middle .jessbot-chat-widget {
    width: calc(100vw - 16px) !important;
    height: calc(75vh - 60px) !important;
    left: 8px !important;
    right: 8px !important;
    top: 40px !important;
    bottom: 40px !important;
  }
  
  .jessbot-chat-open-btn {
    width: 120px;
    height: 40px;
    border-radius: 20px;
    font-size: 13px;
    padding: 0 12px 0 10px;
    gap: 6px;
    bottom: 16px;
    right: 16px;
  }

  .jessbot-chat-open-btn svg {
    width: 18px;
    height: 18px;
  }

  .jessbot-chat-open-btn .jessbot-chat-text {
    font-size: 13px;
  }


  
  .jessbot-chat-header {
    padding: 0.8rem;
    font-size: 1rem;
  }
  
  .jessbot-chat-messages {
    padding: 0.8rem;
  }
} 