/* Rileks In-App Live Support & AI Chat Widget Styles */

#rlx-chat-launcher {
  position: fixed;
  bottom: 90px; /* Above mobile sticky CTA bar (~70px tall) */
  left: 16px;   /* KIRI — tidak bertabrakan dengan tombol Order di kanan */
  right: auto;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  animation: rlxBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@media (min-width: 768px) {
  #rlx-chat-launcher {
    bottom: 90px;
    left: 20px;
    right: auto;
  }
}

@media (min-width: 1024px) {
  #rlx-chat-launcher {
    bottom: 28px;
    left: 28px;
    right: auto;
  }
}

.rlx-launcher-btn {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -3px rgba(13, 148, 136, 0.5), 0 4px 6px -2px rgba(13, 148, 136, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 13px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rlxPulse 3s ease-in-out 1s infinite;
}

.rlx-launcher-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 15px 30px -3px rgba(13, 148, 136, 0.5);
}

.rlx-launcher-btn:active {
  transform: scale(0.96);
}

.rlx-chat-window {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 90vh;
  max-height: 700px;
  background: #ffffff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

@media (min-width: 640px) {
  .rlx-chat-window {
    bottom: 24px;
    right: 24px;
    width: 390px;
    height: 620px;
    border-radius: 24px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  }
}

.rlx-chat-header {
  background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.rlx-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Chat Bubbles */
.rlx-msg {
  max-width: 84%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  word-wrap: break-word;
  animation: rlxFadeIn 0.2s ease-out forwards;
}

.rlx-msg-bot, .rlx-msg-admin {
  align-self: flex-start;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-top-left-radius: 4px;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 18px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.rlx-msg-user {
  align-self: flex-end;
  background: #0d9488;
  color: #ffffff;
  border-top-left-radius: 18px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 18px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

.rlx-install-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: #78350f;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.rlx-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  scrollbar-width: none;
}
.rlx-quick-chips::-webkit-scrollbar {
  display: none;
}

.rlx-chip {
  background: #f1f5f9;
  color: #0f766e;
  border: 1px solid #ccfbf1;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rlx-chip:hover {
  background: #0d9488;
  color: #ffffff;
}

.rlx-chat-footer {
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rlx-chat-input {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 9px 14px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

.rlx-chat-input:focus {
  border-color: #0d9488;
  background: #ffffff;
}

.rlx-send-btn {
  background: #0d9488;
  color: white;
  border: none;
  border-radius: 14px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rlx-send-btn:hover {
  background: #0f766e;
}

.rlx-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@keyframes rlxFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rlxBounceIn {
  0% { opacity: 0; transform: scale(0.5) translateY(20px); }
  70% { opacity: 1; transform: scale(1.05) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes rlxPulse {
  0%, 100% { box-shadow: 0 10px 25px -3px rgba(13, 148, 136, 0.5), 0 0 0 0 rgba(13, 148, 136, 0.4); }
  50% { box-shadow: 0 10px 25px -3px rgba(13, 148, 136, 0.5), 0 0 0 10px rgba(13, 148, 136, 0); }
}

.typing-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Lead Capture Card (Tanyakan No WhatsApp) */
.rlx-lead-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 4px 0 8px 0;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.08);
  animation: rlxFadeIn 0.3s ease-out forwards;
}

.rlx-lead-card.hidden {
  display: none !important;
}

.rlx-lead-title {
  font-size: 11px;
  font-weight: 800;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.rlx-lead-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  outline: none;
  background: #ffffff;
  color: #1e293b;
  margin-bottom: 6px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rlx-lead-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.rlx-lead-btn {
  width: 100%;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.3);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.rlx-lead-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.rlx-lead-btn:active {
  transform: scale(0.98);
}

.rlx-lead-note {
  font-size: 10px;
  color: #15803d;
  margin-top: 6px;
  text-align: center;
  font-weight: 500;
}

