/* ==========================================================================
   JATTA M KOMMERCE — AI ASSISTANT CHAT WIDGET
   Ultra-Frosted Cupertino Styling • 100% Guaranteed Visibility & Responsiveness
   ========================================================================== */

/* Floating Launcher Container */
/* Floating Launcher Container - Stacked Vertically One Above the Other */
.jmk-bot-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.jmk-bot-launcher-row {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Teaser Pill Beside Launcher (Positioned to the left) */
.jmk-bot-pill {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-radius: 24px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.jmk-bot-pill:hover {
  transform: translateY(-50%) scale(1.03);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.2);
}

.jmk-bot-pill .jmk-pill-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #312e81;
  letter-spacing: -0.01em;
}

.jmk-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: jmkPulse 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes jmkPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Floating Launcher Circular Button */
.jmk-bot-launcher {
  width: 50px;
  height: 50px;
  box-sizing: border-box;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.88) 0%, rgba(139, 92, 246, 0.88) 50%, rgba(168, 85, 247, 0.88) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px -4px rgba(99, 102, 241, 0.35), 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  flex-shrink: 0;
}

.jmk-bot-launcher:hover {
  transform: translateY(-3px) scale(1.06);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 50%, rgba(168, 85, 247, 0.95) 100%);
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.45), 0 0 20px rgba(139, 92, 246, 0.3);
}

.jmk-bot-launcher svg {
  display: block;
  transition: transform 0.25s ease;
}

.jmk-bot-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: #10b981;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

/* Chat Window */
.jmk-bot-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 550px;
  max-height: calc(100vh - 120px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: 0 20px 50px -10px rgba(99, 102, 241, 0.18), 0 10px 24px -5px rgba(0, 0, 0, 0.06);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
}

.jmk-bot-window.open {
  display: flex !important;
  animation: jmkPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes jmkPopIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.jmk-bot-header {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.jmk-bot-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jmk-bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.jmk-bot-title-group h4 {
  font-size: 0.95rem;
  font-weight: 750;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.jmk-bot-status-text {
  font-size: 0.74rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 650;
  margin-top: 2px;
}

.jmk-bot-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.jmk-bot-close-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s ease;
}

.jmk-bot-close-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  transform: scale(1.05);
}

/* Chat Messages */
.jmk-bot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  background: transparent;
}

.jmk-msg-bubble {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 18px;
  animation: jmkFadeIn 0.2s ease-out;
  word-wrap: break-word;
}

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

.jmk-msg-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #334155;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.jmk-msg-bot strong {
  color: #0f172a;
}

.jmk-msg-bot a {
  color: #6366f1;
  font-weight: 650;
  text-decoration: underline;
}

.jmk-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.88) 0%, rgba(139, 92, 246, 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.22);
}

/* Quick Topic Chips */
.jmk-bot-chips-wrapper {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jmk-bot-chip {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(199, 210, 254, 0.75);
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.jmk-bot-chip:hover {
  background: rgba(99, 102, 241, 0.88);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.88);
  transform: translateY(-1px);
}

/* Typing Indicator */
.jmk-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}

.jmk-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  animation: jmkBounce 1.2s infinite ease-in-out;
}

.jmk-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.jmk-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes jmkBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Input Footer */
.jmk-bot-input-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  gap: 8px;
  align-items: center;
}

.jmk-bot-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.jmk-bot-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(255, 255, 255, 0.9);
}

.jmk-bot-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.88) 0%, rgba(139, 92, 246, 0.88) 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
  flex-shrink: 0;
}

.jmk-bot-send-btn:hover {
  transform: scale(1.06);
}

@media (max-width: 480px) {
  .jmk-bot-pill {
    display: none;
  }
  .jmk-bot-window {
    right: 16px;
    bottom: 88px;
    width: calc(100vw - 32px);
    height: 490px;
  }
}

/* ==========================================================================
   FLOATING DOCK BUTTONS (WHATSAPP & EMAIL WITH SYMBOLS)
   ========================================================================== */
.jmk-dock-btn {
  width: 50px;
  height: 50px;
  box-sizing: border-box;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  box-shadow: 0 8px 22px -4px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.jmk-dock-btn svg {
  display: block;
}

.jmk-dock-wa {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
}

.jmk-dock-wa:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 26px rgba(37, 211, 102, 0.45), 0 0 16px rgba(37, 211, 102, 0.25);
}

.jmk-dock-mail {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #ffffff;
}

.jmk-dock-mail:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.4), 0 0 16px rgba(6, 182, 212, 0.25);
}

.jmk-dock-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000000;
}

.jmk-dock-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(15, 23, 42, 0.92);
}

.jmk-dock-btn:hover .jmk-dock-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   AUTOMATED WHATSAPP ROUTING MODAL (APPLE CUPERTINO GLASS)
   ========================================================================== */
.jmk-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: jmkFadeIn 0.25s ease forwards;
}

.jmk-modal-sheet {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow: 0 25px 55px -10px rgba(0, 0, 0, 0.18), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  position: relative;
  animation: jmkModalPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

@keyframes jmkFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes jmkModalPop {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.jmk-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.jmk-modal-badge-wa {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.jmk-modal-close {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.jmk-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #111827;
}

.jmk-notice-card {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.jmk-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jmk-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.jmk-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

.jmk-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.4);
}

.jmk-btn-whatsapp {
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
}

.jmk-btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
}

