/* ===================== FLOATING SUPPORT & WHATSAPP POPUP WIDGET ===================== */
.floating-support-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.floating-support-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-support-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.48);
}

.floating-support-btn .icon-active {
  display: none;
}

.floating-support-container.active .floating-support-btn .icon-default {
  display: none;
}

.floating-support-container.active .floating-support-btn .icon-active {
  display: block;
}

.floating-support-menu {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 280px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  display: none;
  flex-direction: column;
  gap: 10px;
  transform-origin: bottom right;
  animation: fsmOpen 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-support-container.active .floating-support-menu {
  display: flex;
}

@keyframes fsmOpen {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.fsm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.fsm-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.fsm-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.fsm-option-live {
  background: rgba(var(--primary-rgb), 0.06);
  border-color: rgba(var(--primary-rgb), 0.15);
}

.fsm-option-live:hover {
  background: rgba(var(--primary-rgb), 0.12);
  transform: translateX(-2px);
}

.fsm-option-live .fsm-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.fsm-option-wa {
  background: rgba(var(--whatsapp-rgb), 0.08);
  border-color: rgba(var(--whatsapp-rgb), 0.2);
}

.fsm-option-wa:hover {
  background: rgba(var(--whatsapp-rgb), 0.16);
  transform: translateX(-2px);
}

.fsm-option-wa .fsm-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--whatsapp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.fsm-text {
  display: flex;
  flex-direction: column;
}

.fsm-text strong {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 700;
}

.fsm-text small {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ===================== LIVE SUPPORT AI CHAT MODAL ===================== */
/* Live Support Backdrop & True Background Page Isolation / Scroll Lock */
.live-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2147483646;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.live-chat-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

html.chat-open,
body.chat-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  height: 100% !important;
}

body.chat-open .page-wrapper,
body.chat-open header,
body.chat-open nav,
body.chat-open main,
body.chat-open footer {
  pointer-events: none !important;
  user-select: none !important;
}

body.chat-open .floating-support-container {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.live-chat-window {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 56px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483647;
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.94) translateY(20px);
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
  isolation: isolate;
}

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

/* Chat Header */
.lc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, var(--glass-bg-dense) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.lc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lc-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: transparent !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lc-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.lc-avatar-initials {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.4px;
  user-select: none;
}

.lc-online-pulse {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
}

.lc-online-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: lc-pulse 1.8s infinite;
}

@keyframes lc-pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.lc-info {
  display: flex;
  flex-direction: column;
}

.lc-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.lc-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 2px;
}

.lc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: var(--glass-bg-dense);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lc-action-btn:hover {
  background: var(--white);
  transform: translateY(-1px);
  color: var(--text);
}

.lc-wa-btn {
  color: var(--whatsapp);
  border-color: rgba(var(--whatsapp-rgb), 0.25);
  background: rgba(var(--whatsapp-rgb), 0.08);
}

.lc-wa-btn:hover {
  background: var(--whatsapp);
  color: var(--white);
}

.lc-close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.2);
}

/* Quick Suggestion Chips */
.lc-chips-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px 10px 14px;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(248, 250, 252, 0.6);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
}

.lc-chips-scroll::-webkit-scrollbar {
  display: none;
}

.lc-chip {
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--white);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lc-chip:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Message Stream */
.lc-messages {
  flex: 1;
  padding: 16px 16px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.lc-messages::-webkit-scrollbar {
  width: 5px;
}

.lc-messages::-webkit-scrollbar-track {
  background: transparent;
}

.lc-messages::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border-radius: 9999px;
}

.lc-scroll-bottom-btn {
  position: absolute;
  right: 16px;
  bottom: 76px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
  z-index: 4;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.lc-scroll-bottom-btn:hover {
  transform: translateY(-2px);
}

.lc-msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  padding: 0 4px;
}

.lc-msg-check {
  font-size: 10px;
  color: var(--primary);
  opacity: 0.85;
}

.lc-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  margin: 2px 1px;
  border-radius: 9999px;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  color: var(--primary);
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.18s ease, transform 0.15s ease;
}

.lc-link-pill:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.lc-link-pill i {
  font-size: 10px;
  opacity: 0.85;
}

.lc-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: lcMsgIn 0.16s ease-out forwards;
}

@keyframes lcMsgIn {
  from { opacity: 0.72; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.lc-msg-user {
  align-self: flex-end;
  align-items: flex-end;
}

.lc-msg-user .lc-msg-bubble {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--white);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25);
}

.lc-msg-assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.lc-msg-assistant .lc-msg-bubble {
  background: var(--surface-page);
  color: var(--text);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 2px 8px rgba(var(--ink-rgb), 0.04);
}

.lc-msg-assistant + .lc-msg-assistant {
  margin-top: -6px;
}

.lc-msg-assistant + .lc-msg-assistant .lc-msg-bubble {
  border-top-left-radius: 6px;
}

.lc-msg-user + .lc-msg-user {
  margin-top: -6px;
}

.lc-msg-user + .lc-msg-user .lc-msg-bubble {
  border-top-right-radius: 6px;
}

.lc-msg-bubble {
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
  unicode-bidi: plaintext;
  text-align: start;
  font-family: var(--font-ar, 'Tajawal'), var(--font-en, 'Inter'), sans-serif;
}

.lc-msg-time {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 4px;
  padding: 0 4px;
}

/* Typing Indicator */
.lc-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: rgba(248, 250, 252, 0.8);
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.lc-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: lcTypingBounce 1.4s infinite ease-in-out both;
}

.lc-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.lc-typing-dot:nth-child(2) { animation-delay: -0.16s; }

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

.lc-typing-label {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 6px;
  font-style: italic;
}

/* Input Area */
.lc-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--white);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.lc-input {
  flex: 1;
  padding: 10px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: var(--surface-page);
  font-size: 16px !important; /* Critical: 16px font-size prevents mobile keyboard auto-zoom like WhatsApp */
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  touch-action: manipulation;
}

.lc-input:focus {
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.lc-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.lc-send-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.lc-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.lc-footer-meta {
  padding: 6px 14px;
  text-align: center;
  font-size: 10px;
  color: var(--text-3);
  background: var(--surface-page);
  border-top: 1px solid rgba(241, 245, 249, 0.8);
}

/* Pre-Chat Intake Form & Human Handoff States */
.lc-chat-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lc-prechat-view {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

.lc-prechat-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lc-prechat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(22, 163, 74, 0.1);
  color: #15803D;
  font-size: 11px;
  font-weight: 700;
}

.lc-prechat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
}

.lc-prechat-heading {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.lc-prechat-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.lc-prechat-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lc-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}

.lc-field-input,
.lc-field-textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 16px !important;
  font-family: var(--font-ar, 'Tajawal'), var(--font-en, 'Inter'), sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.lc-field-textarea {
  resize: none;
  min-height: 76px;
  line-height: 1.45;
}

.lc-field-input:focus,
.lc-field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
  background: #FFFFFF;
}

.lc-prechat-error {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: #B91C1C;
  font-size: 12px;
  font-weight: 600;
}

.lc-prechat-submit {
  width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.28);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.lc-prechat-submit:hover:not(:disabled) {
  transform: translateY(-1px);
}

.lc-prechat-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Connecting / Routing to Human Specialist View */
.lc-connecting-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 22px;
  gap: 12px;
}

.lc-connecting-spinner {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.lc-connecting-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(var(--primary-rgb), 0.18);
  border-top-color: var(--primary);
  animation: lcSpin 0.9s linear infinite;
}

@keyframes lcSpin {
  to { transform: rotate(360deg); }
}

.lc-connecting-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lc-connecting-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
}

.lc-connecting-sub {
  font-size: 12.5px;
  color: var(--text-2);
}

.lc-system-pill {
  align-self: center;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  margin: 2px 0 4px;
}

/* Escalation Waiting Bar, Session Closing Banner & Closed State */
.lc-escalation-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.1);
  border-top: 1px solid rgba(245, 158, 11, 0.28);
  color: #92400E;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.lc-escalation-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  flex-shrink: 0;
  animation: lc-pulse 1.6s infinite;
}

.lc-closing-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(var(--primary-rgb), 0.07);
  border-top: 1px solid rgba(var(--primary-rgb), 0.22);
  font-size: 12px;
  color: var(--text);
}

.lc-closing-text {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-2);
}

.lc-closing-text i {
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
}

.lc-closing-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lc-closing-btn {
  flex: 1;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.lc-closing-keep {
  background: var(--white);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.lc-closing-keep:hover {
  background: rgba(var(--primary-rgb), 0.1);
}

.lc-closing-end {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.lc-closing-end:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.lc-closed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(248, 250, 252, 0.95);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.lc-closed-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
}

.lc-restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
  transition: transform 0.18s ease;
}

.lc-restart-btn:hover {
  transform: translateY(-1px);
}

/* Mobile Responsive — Translucent Glassmorphic Keyboard-Aware Sheet */
@media (max-width: 640px) {
  .floating-support-container {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
  }

  .floating-support-btn {
    width: 54px;
    height: 54px;
  }

  .live-chat-window {
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: rgba(248, 250, 252, 0.86) !important;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    transform-origin: bottom center;
    transform: translateY(100%);
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .live-chat-window.active {
    opacity: 1;
    transform: translateY(0);
  }

  .lc-header {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px 14px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.65);
    position: sticky;
    top: 0;
    z-index: 3;
  }

  .lc-avatar,
  .lc-avatar-initials {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    font-size: 14.5px;
  }

  .lc-title {
    font-size: 15.5px;
  }

  .lc-subtitle {
    font-size: 11.5px;
  }

  .lc-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 17px;
  }

  .lc-chips-scroll {
    padding: 10px 28px 10px 14px;
    gap: 8px;
    background: transparent;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .lc-chips-scroll.lc-chips-collapsed {
    display: none;
  }

  .lc-chip {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12.5px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .lc-messages {
    padding: 14px 14px 18px 14px;
    gap: 10px;
    background: transparent;
  }

  .lc-msg {
    max-width: 84%;
  }

  .lc-msg-bubble {
    padding: 11px 14px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .lc-msg-time {
    font-size: 10.5px;
  }

  .lc-typing {
    padding: 8px 16px;
    background: transparent;
    border-top: none;
  }

  .lc-input-area {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px;
    gap: 8px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(226, 232, 240, 0.65);
  }

  .lc-input {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 16px !important;
    background: rgba(255, 255, 255, 0.85);
  }

  .lc-send-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    font-size: 16px;
  }

  .lc-footer-meta {
    display: none;
  }
}


/* Live Wait-Time Expectation Bar & Consent Close Banner */
.lc-wait-eta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(29, 128, 195, 0.1);
  border-top: 1px solid rgba(29, 128, 195, 0.22);
  color: #0f4c75;
  font-size: 12px;
  font-weight: 700;
}

.lc-wait-eta-bar i {
  color: #1D80C3;
  flex-shrink: 0;
}

.lc-wait-eta-bar #lcWaitEtaText {
  flex: 1;
}

.lc-wait-eta-timer {
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(29, 128, 195, 0.16);
  color: #1D80C3;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.lc-consent-banner {
  background: rgba(99, 102, 241, 0.08);
  border-top-color: rgba(99, 102, 241, 0.28);
}

.lc-system-pill-time {
  opacity: 0.65;
  font-weight: 600;
  margin-inline-start: 6px;
}

/* Verified Order Draft Confirmation Card */
.lc-order-draft-slot {
  padding: 10px 12px;
  border-top: 1px solid rgba(29, 128, 195, 0.24);
  background: rgba(248, 250, 252, 0.96);
}

.lc-draft-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(29, 128, 195, 0.24);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
}

.lc-draft-card.is-confirmed {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(236, 253, 245, 0.9);
}

.lc-draft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.lc-draft-title {
  font-weight: 800;
  color: var(--text, #0f172a);
  font-size: 13px;
}

.lc-draft-badge {
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(29, 128, 195, 0.12);
  color: #1D80C3;
}

.lc-draft-card.is-confirmed .lc-draft-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
}

.lc-draft-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 96px;
  overflow-y: auto;
  padding: 6px 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
}

.lc-draft-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2, #334155);
}

.lc-draft-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}

.lc-draft-addr-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(203, 213, 225, 0.95);
  background: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.lc-draft-addr-input:focus {
  border-color: #1D80C3;
  box-shadow: 0 0 0 3px rgba(29, 128, 195, 0.14);
}

.lc-draft-error {
  color: #b91c1c;
  font-size: 11.5px;
  font-weight: 700;
}

.lc-draft-actions {
  display: flex;
  gap: 8px;
}

.lc-draft-btn-confirm {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lc-draft-btn-confirm:active {
  transform: scale(0.98);
}

.lc-draft-btn-confirm:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lc-draft-btn-cancel {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

/* ===================== STORE CHOICE CARD & HORIZONTAL PRODUCT SWIPER ===================== */
.lc-choice-card {
  align-self: flex-start;
  width: 94%;
  max-width: 330px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(29, 128, 195, 0.24);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: 0 8px 24px rgba(29, 128, 195, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lc-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.lc-choice-sub {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.lc-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.lc-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 58px;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.lc-choice-btn:active {
  transform: scale(0.98);
}

.lc-choice-btn-chat {
  background: linear-gradient(135deg, #1D80C3 0%, #0ea5e9 100%);
  border: none;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(29, 128, 195, 0.25);
}

.lc-choice-btn i {
  font-size: 15px;
}

/* Horizontal Product Swiper Inside Chat */
.lc-swiper-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.lc-swiper-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.lc-swiper-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lc-swiper-nav {
  display: flex;
  gap: 4px;
}

.lc-swiper-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #FFFFFF;
  color: #334155;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lc-swiper-arrow:hover {
  border-color: #1D80C3;
  color: #1D80C3;
}

.lc-swiper-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lc-swiper-track::-webkit-scrollbar {
  display: none;
}

.lc-prod-card {
  flex: 0 0 156px;
  scroll-snap-align: start;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.lc-prod-card.is-selected {
  border-color: #1D80C3;
  box-shadow: 0 6px 16px rgba(29, 128, 195, 0.16);
}

.lc-prod-img-box {
  width: 100%;
  height: 104px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.lc-prod-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lc-prod-img-box img.lc-prod-img-fallback {
  object-fit: contain;
  padding: 10px;
  background: #ffffff;
}

.lc-swiper-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(29, 128, 195, 0.28);
  background: rgba(29, 128, 195, 0.08);
  color: #1D80C3;
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
}

.lc-swiper-menu-link:hover {
  background: #1D80C3;
  color: #FFFFFF;
}

.lc-gender-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lc-gender-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lc-gender-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lc-gender-pill span {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid rgba(203, 213, 225, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s ease;
}

.lc-gender-pill input:checked + span {
  border-color: #1D80C3;
  background: rgba(29, 128, 195, 0.12);
  color: #0f4c75;
}

.lc-prod-img-placeholder {
  font-size: 24px;
  color: #94a3b8;
}

.lc-prod-body {
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.lc-prod-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
}

.lc-prod-price {
  font-size: 12px;
  font-weight: 800;
  color: #1D80C3;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lc-prod-old-price {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.lc-prod-ctrl {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lc-prod-add-btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(29, 128, 195, 0.35);
  border-radius: 10px;
  background: rgba(29, 128, 195, 0.09);
  color: #1D80C3;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.lc-prod-add-btn:hover {
  background: #1D80C3;
  color: #FFFFFF;
}

.lc-prod-stepper {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(29, 128, 195, 0.11);
  border-radius: 10px;
  padding: 4px 6px;
}

.lc-prod-step-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: #1D80C3;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lc-prod-qty {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.lc-swiper-checkout-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1D80C3 0%, #0284c7 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(29, 128, 195, 0.28);
}

@media (max-width: 640px) {
  .lc-order-draft-slot {
    max-height: 46dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lc-draft-addr-input {
    font-size: 16px !important;
    min-height: 44px;
  }

  .lc-choice-card {
    width: 100%;
    max-width: 100%;
  }

  .lc-prod-card {
    flex: 0 0 168px;
  }

  .lc-prod-add-btn,
  .lc-prod-stepper {
    min-height: 44px;
  }

  .lc-prod-step-btn {
    width: 34px;
    height: 34px;
  }

  .lc-swiper-arrow {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .lc-swiper-menu-link {
    min-height: 36px;
    padding: 4px 10px;
    font-size: 11.5px;
  }

  .lc-gender-pill span {
    min-height: 44px;
    font-size: 13px;
  }
}

.lc-swiper-checkout-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
