/* Sara Chat Support CSS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.sjs-sara-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999990;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
}

.sjs-sara-widget * {
  box-sizing: border-box;
}

/* Floating Avatar Button Group */
.sara-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sara-avatar-container:hover {
  transform: translateY(-4px) scale(1.05);
}

.sara-avatar-img-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 8px 24px rgba(26, 35, 126, 0.25);
  border: 2px solid #1a237e;
  animation: sara-pulse 2.5s infinite;
}

.sara-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f4ff;
}

/* Pulse animation */
@keyframes sara-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 35, 126, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(26, 35, 126, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 35, 126, 0);
  }
}

.sara-avatar-tag {
  margin-top: 6px;
  background: #1a237e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Online Dot Indicator on Avatar */
.sara-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background-color: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

/* Chat Window Box */
.sara-chat-window {
  position: absolute;
  bottom: 84px;
  left: 0;
  width: 360px;
  height: 480px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom left;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sara-chat-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.sara-chat-header {
  background: #1a237e;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sara-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sara-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sara-header-meta h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sara-header-meta span {
  font-size: 10px;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sara-close-btn {
  background: transparent;
  border: none;
  color: #c7d2fe;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sara-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages Area */
.sara-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Individual Message Bubble */
.sara-msg {
  max-width: 80%;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 18px;
}

.sara-msg.sara {
  background: #ffffff;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sara-msg.user {
  background: #1a237e;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(26, 35, 126, 0.15);
}

/* Quick Option Chips */
.sara-quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sara-chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sara-chip:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Chat Input Bar */
.sara-chat-input-bar {
  padding: 14px 16px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sara-chat-input-bar input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 10px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.sara-chat-input-bar input:focus {
  border-color: #1a237e;
}

.sara-send-btn {
  background: #1a237e;
  color: #ffffff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(26, 35, 126, 0.2);
}

.sara-send-btn:hover {
  background: #12185c;
  transform: scale(1.05);
}

.sara-send-btn:active {
  transform: scale(0.95);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .sjs-sara-widget {
    bottom: 16px;
    left: 16px;
  }
  
  .sara-avatar-img-wrapper {
    width: 54px;
    height: 54px;
  }
  
  .sara-chat-window {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    bottom: 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }
  
  .sara-chat-window.active {
    transform: translateY(0);
  }
}
