/* VetBot AI Chat - Modern, Responsive, Eye-Catching */

:root {
  --vetbot-teal: #0d8a87;
  --vetbot-teal-light: #14a09d;
  --vetbot-bg: #f8fafc;
  --vetbot-white: #fff;
  --vetbot-shadow: 0 8px 32px rgba(20, 160, 157, 0.18);
  --vetbot-radius: 22px;
  --vetbot-font: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

body.vetbot-open {
  overflow: hidden;
}

/* Floating Button */
.vetbot-float-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--vetbot-teal-light), var(--vetbot-teal));
  border: none;
  border-radius: 50%;
  box-shadow: var(--vetbot-shadow);
  z-index: 99999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s, transform 0.2s;
  outline: none;
}
.vetbot-float-btn:hover {
  box-shadow: 0 12px 40px rgba(20, 160, 157, 0.28);
  transform: scale(1.08);
}
.vetbot-float-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.vetbot-float-icon img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vetbot-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: opacity 0.3s ease;
}
.vetbot-float-btn.open .vetbot-float-icon img {
  opacity: 0;
}
.vetbot-float-btn.open .vetbot-float-icon::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 24px;
  background: #fff;
  transform: rotate(45deg);
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -1px;
  transition: all 0.3s ease;
}
.vetbot-float-btn.open .vetbot-float-icon::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 24px;
  background: #fff;
  transform: rotate(-45deg);
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: -1px;
  transition: all 0.3s ease;
}
.vetbot-float-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,160,157,0.12) 0%, transparent 70%);
  animation: vetbot-pulse 2.2s infinite;
  z-index: 1;
}
@keyframes vetbot-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  60% { transform: scale(1.25); opacity: 0.3; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Chat Window */
.vetbot-chat-window {
  position: fixed;
  bottom: 110px;
  right: 28px;
  width: 390px;
  max-width: 98vw;
  height: 600px;
  max-height: 90vh;
  background: var(--vetbot-bg);
  border-radius: var(--vetbot-radius);
  box-shadow: var(--vetbot-shadow);
  display: none !important;
  flex-direction: column;
  z-index: 100000;
  font-family: var(--vetbot-font);
  overflow: hidden;
  animation: vetbot-slidein 0.4s cubic-bezier(.4,0,.2,1);
}
.vetbot-chat-window.open {
  display: flex !important;
}
.vetbot-chat-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.vetbot-chat-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.vetbot-messages {
  flex: 1 1 auto;
  overflow-y: auto !important;
  max-height: none;
}
@keyframes vetbot-slidein {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.vetbot-chat-header {
  background: linear-gradient(135deg, var(--vetbot-teal-light), var(--vetbot-teal));
  color: var(--vetbot-white);
  padding: 22px 22px 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: var(--vetbot-radius);
  border-top-right-radius: var(--vetbot-radius);
  box-shadow: 0 2px 12px rgba(20,160,157,0.10);
}
.vetbot-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.vetbot-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vetbot-white);
  border: 2px solid #e0f2f1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.vetbot-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vetbot-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--vetbot-white);
}
.vetbot-status {
  font-size: 13px;
  color: #e0f2f1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vetbot-dot {
  width: 9px;
  height: 9px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
  box-shadow: 0 0 8px #4ade80;
}
.vetbot-close-btn {
  background: #fff;
  border: 2px solid var(--vetbot-teal);
  color: var(--vetbot-teal);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(20,160,157,0.10);
}
.vetbot-close-btn:hover {
  background: var(--vetbot-teal);
  color: #fff;
  border-color: var(--vetbot-teal);
}
.vetbot-close-btn svg {
  display: block;
}

/* Welcome & Quick Actions */
.vetbot-welcome {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #14a09d !important;
  border-radius: 18px;
  margin: 18px 18px 0 18px;
  padding: 18px 18px 14px 18px;
  box-shadow: 0 2px 12px rgba(20,160,157,0.07);
  color: #fff !important;
}
.vetbot-welcome-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e0f2f1;
  margin-top: 2px;
}
.vetbot-welcome-text p {
  margin: 0 0 14px 0;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
}
.vetbot-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vetbot-quick-btn {
  background: #fff !important;
  border: 2px solid #fff !important;
  color: #14a09d !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  min-width: 120px;
  justify-content: center;
  outline: none;
  transition: all 0.3s;
}
.vetbot-quick-btn:hover, .vetbot-quick-btn:focus {
  background: #0d8a87 !important;
  color: #fff !important;
  border-color: #0d8a87 !important;
}
.vetbot-quick-icon {
  font-size: 18px;
  display: inline-block;
}

/* Messages */
.vetbot-messages {
  flex: 1;
  overflow-y: auto !important;
  padding: 18px 18px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: transparent;
  scroll-behavior: smooth;
  max-height: 340px;
}
.vetbot-messages::-webkit-scrollbar {
  width: 8px;
  background: #e0f2f1;
}
.vetbot-messages::-webkit-scrollbar-thumb {
  background: #14a09d;
  border-radius: 6px;
}
.vetbot-messages::-webkit-scrollbar-thumb:hover {
  background: #0d8a87;
}
.vetbot-message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.vetbot-message-row.user {
  justify-content: flex-end;
}
.vetbot-message-row.bot {
  justify-content: flex-start;
}
.vetbot-message-bubble {
  max-width: 75%;
  padding: 15px 20px;
  border-radius: 18px 18px 6px 18px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(20,160,157,0.07);
  word-break: break-word;
  background: #fff;
  color: #0d8a87;
  position: relative;
}
.vetbot-message-row.user .vetbot-message-bubble {
  background: linear-gradient(135deg, var(--vetbot-teal-light), var(--vetbot-teal));
  color: #fff;
  border-radius: 18px 18px 18px 6px;
  font-weight: 700;
}
.vetbot-message-bubble a {
  color: var(--vetbot-teal);
  text-decoration: underline;
  font-weight: 600;
}
.vetbot-message-row.user .vetbot-message-bubble a {
  color: #fff;
}

/* Input Bar */
.vetbot-input-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 10px 18px;
  background: #fff;
  border-bottom-left-radius: var(--vetbot-radius);
  border-bottom-right-radius: var(--vetbot-radius);
  border-top: 1px solid #e0f2f1;
}
.vetbot-user-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #e0f2f1;
  border-radius: 18px;
  font-size: 15px;
  outline: none;
  background: #f8fafc;
  color: #0d8a87;
  font-weight: 600;
  transition: border 0.2s, background 0.2s;
}
.vetbot-user-input:focus {
  border-color: var(--vetbot-teal);
  background: #fff;
}
.vetbot-send-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--vetbot-teal-light), var(--vetbot-teal));
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(20,160,157,0.15);
  border: 2px solid #fff;
  position: relative;
  outline: none;
  overflow: hidden;
}
.vetbot-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(20,160,157,0.25);
  background: linear-gradient(135deg, var(--vetbot-teal), var(--vetbot-teal-light));
}
.vetbot-send-btn:active {
  transform: scale(0.95);
}
.vetbot-send-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: #ffffff !important;
  stroke: #ffffff !important;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
  z-index: 2;
  position: relative;
  pointer-events: none;
}

/* Footer */
.vetbot-footer {
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
  color: #0d8a87;
  font-weight: 600;
  padding: 0 0 16px 0;
  background: transparent;
  margin-top: 0;
  position: relative;
}
.vetbot-footer a {
  color: var(--vetbot-teal);
  text-decoration: underline;
  font-weight: 700;
  transition: color 0.2s;
}
.vetbot-footer a:hover {
  color: var(--vetbot-teal-light);
}

/* Typing Indicator */
.vetbot-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: #fff;
  border-radius: 18px 18px 18px 6px;
  border: 1px solid #e0f2f1;
  max-width: 80px;
  box-shadow: 0 2px 8px rgba(20,160,157,0.07);
}
.vetbot-typing span {
  width: 8px;
  height: 8px;
  background: var(--vetbot-teal);
  border-radius: 50%;
  animation: vetbot-typing 1.6s infinite;
}
.vetbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.vetbot-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes vetbot-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 600px) {
  .vetbot-chat-window {
    width: 98vw !important;
    height: calc(85vh - 80px) !important;
    min-width: 0;
    min-height: 0;
    right: 1vw !important;
    bottom: 1vw !important;
    top: 15vh !important;
    border-radius: 12px !important;
    max-width: 100vw;
    max-height: 85vh;
    box-shadow: 0 4px 24px rgba(20,160,157,0.18);
    margin-bottom: 72px !important;
  }
  .vetbot-float-btn {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    z-index: 100001 !important;
  }
  .vetbot-float-icon img {
    width: 28px;
    height: 28px;
  }

  .vetbot-header-avatar {
    width: 32px;
    height: 32px;
  }
  .vetbot-welcome {
    margin: 10px 6px 0 6px;
    padding: 12px 10px 10px 10px;
  }
  .vetbot-messages {
    padding: 10px 6px 0 6px;
    gap: 10px;
  }
  .vetbot-input-form {
    padding: 10px 6px 6px 6px;
  }
  .vetbot-message-bubble {
    max-width: 75% !important;
    width: auto !important;
  }
  .vetbot-messages {
    flex: 1 1 auto;
    max-height: 100% !important;
    min-height: 0;
    overflow-y: auto !important;
  }
  .vetbot-reset-btn {
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

/* Reset Button Styles */
.vetbot-reset-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  background: transparent !important;
  border: none !important;
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  z-index: 10;
  box-shadow: none !important;
}
.vetbot-reset-btn.show {
  display: flex;
}
.vetbot-reset-btn:hover {
  transform: scale(1.1);
  opacity: 0.8;
  background: transparent !important;
}
.vetbot-reset-btn svg {
  display: none;
}

.vetbot-heading1 {
  font-size: 1.25em;
  font-weight: 800;
  color: #0d8a87;
  margin: 0.5em 0 0.2em 0;
}
.vetbot-heading2 {
  font-size: 1.1em;
  font-weight: 700;
  color: #14a09d;
  margin: 0.4em 0 0.2em 0;
}
.vetbot-link {
  color: #0d8a87;
  text-decoration: underline;
  font-weight: 700;
  transition: color 0.2s;
}
.vetbot-link:hover {
  color: #14a09d;
  text-decoration: underline;
}

.vetbot-show-options-btn {
  display: block;
  margin: 18px auto 0 auto;
  padding: 12px 28px;
  background: linear-gradient(135deg, #14a09d, #0d8a87);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 22px;
  box-shadow: 0 2px 8px rgba(20,160,157,0.10);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.vetbot-show-options-btn:hover {
  background: linear-gradient(135deg, #0d8a87, #14a09d);
  transform: scale(1.04);
}

.vetbot-send-icon {
  color: #fff;
  font-size: 1.7em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.18);
  pointer-events: none;
}


.vetbot-chat-window {
  z-index: 100000 !important;
}
.vetbot-float-btn {
  z-index: 100001 !important;
}
