/* ========================================================
   LISSA VIRTUAL ASSISTANT CHAT POPUP WIDGET
   Matches printerassistsnow.online floating livechat popup
   ======================================================== */

/* 1. FLOATING LAUNCHER BUTTON */
.lissa-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999990;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lissa-chat-launcher:hover {
  transform: scale(1.05);
}

.lissa-launcher-badge {
  background: #ffffff;
  color: #1e293b;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  animation: lissaPulseBubble 3s infinite ease-in-out;
}

@keyframes lissaPulseBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.lissa-launcher-badge .online-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.lissa-launcher-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  position: relative;
  transition: background 0.2s ease;
}

.lissa-launcher-circle:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.lissa-launcher-circle .leaf-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: #10b981;
  border-bottom-left-radius: 100%;
}

/* 2. CHAT POPUP WINDOW CONTAINER */
.lissa-chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 375px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #d1d5db;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(25px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), pointer-events 0.25s;
}

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

/* CLOSE CIRCULAR BUTTON */
.lissa-close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
}

.lissa-close-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: scale(1.1);
}

/* 3. GREY SLATE HEADER BAR */
.lissa-chat-header {
  background: #a3abb7;
  padding: 16px 20px 14px 48px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid #949ea9;
}

.lissa-header-leaf {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: #10b981;
  border-bottom-left-radius: 100%;
  pointer-events: none;
}

.lissa-header-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.lissa-header-sub {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lissa-header-sub .online-indicator {
  width: 7px;
  height: 7px;
  background: #15803d;
  border-radius: 50%;
  display: inline-block;
}

/* 4. CHAT BODY / MESSAGES AREA */
.lissa-chat-body {
  flex: 1;
  background: #ffffff;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* LISSA AGENT MESSAGE INTRO */
.lissa-agent-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lissa-agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  position: relative;
}

.lissa-agent-avatar .avatar-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.lissa-message-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 82%;
}

.lissa-agent-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}

.lissa-bubble {
  background: #f1f5f9;
  color: #1e293b;
  padding: 12px 14px;
  border-radius: 14px;
  border-top-left-radius: 3px;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* USER MESSAGE BUBBLE */
.lissa-user-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  max-width: 82%;
}

.lissa-user-bubble {
  background: #2563eb;
  color: #ffffff;
  padding: 11px 15px;
  border-radius: 14px;
  border-top-right-radius: 3px;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* 5. SUGGESTION PILLS (EXACT MATCHING SCREENSHOT) */
.lissa-pills-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.lissa-pills-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lissa-pill-btn {
  background: #ffffff;
  border: 1.5px solid #2563eb;
  color: #2563eb;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.lissa-pill-btn:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
  color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
}

.lissa-pill-btn:active {
  transform: translateY(0);
}

/* TYPING INDICATOR */
.lissa-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 14px;
  width: fit-content;
}

.lissa-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: lissaDotBounce 1.2s infinite ease-in-out;
}

.lissa-typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.lissa-typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes lissaDotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* 6. BOTTOM CHAT INPUT BAR */
.lissa-chat-input-wrap {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 12px 14px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lissa-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.lissa-input-cursor {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: #2563eb;
  border-radius: 1px;
  animation: lissaBlinkCursor 1s infinite;
  pointer-events: none;
}

@keyframes lissaBlinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.lissa-chat-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: #1e293b;
  padding: 8px 8px 8px 8px;
  background: transparent;
}

.lissa-chat-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.lissa-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.lissa-send-btn.active {
  background: #2563eb;
  color: #ffffff;
}

.lissa-send-btn.active:hover {
  background: #1d4ed8;
  transform: scale(1.05);
}

/* BOTTOM ICONS ROW */
.lissa-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.lissa-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 15px;
}

.lissa-action-icon {
  cursor: pointer;
  transition: color 0.15s ease;
}

.lissa-action-icon:hover {
  color: #475569;
}

.lissa-livechat-tag {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* RESPONSIVE DESIGN FOR MOBILE */
@media (max-width: 480px) {
  .lissa-chat-window {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 10px;
    height: 520px;
  }
  .lissa-chat-launcher {
    right: 14px;
    bottom: 14px;
  }
}
