/* ============================================================
   MEGAMIND LIVE SUPPORT WIDGET - MODERN 3D DESIGN
   Completely rewritten with 3D touch effects and modern UI
   ============================================================ */

/* ─── 3D Animations & Effects ───────────────────────────── */
@keyframes pulse3D {
  0%, 100% { 
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 30px rgba(181, 0, 56, 0.45), 0 0 0 0 rgba(181, 0, 56, 0.4);
  }
  50% { 
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(181, 0, 56, 0.55), 0 0 0 8px rgba(181, 0, 56, 0.2);
  }
}

@keyframes statusPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% { 
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

@keyframes slideUp3D {
  from { 
    opacity: 0;
    transform: translateY(30px) rotateX(-10deg) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

@keyframes float3D {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50% { transform: translateY(-6px) rotateX(2deg); }
}

@keyframes shimmer3D {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ─── Backdrop overlay (Mobile only) ───────────────────────── */
.livechat-backdrop {
  display: none;
}

@media (max-width: 640px) {
  .livechat-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .livechat-backdrop.active,
  .fixed-live-chat:has(.dropchat.active) .livechat-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ─── Wrapper & Floating Trigger Button ────────────────────── */
.fixed-live-chat {
  position: fixed;
  bottom: 28px;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  right: 28px;
  right: calc(28px + env(safe-area-inset-right, 0px));
  z-index: 100000;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  perspective: 1000px;
}

.live-chat .chatbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 62px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8a0028 0%, #b50038 40%, #e41e26 70%, #ff6b6b 100%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse3D 3s ease-in-out infinite;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 
    0 12px 35px rgba(181, 0, 56, 0.5),
    0 4px 15px rgba(181, 0, 56, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.live-chat .chatbox::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b6b, #b50038, #8a0028, #ff6b6b);
  background-size: 300% 300%;
  animation: shimmer3D 4s linear infinite;
  z-index: -1;
  opacity: 0.6;
  filter: blur(8px);
}

.live-chat .chatbox:hover,
.live-chat .chatbox:focus-visible {
  transform: translateY(-6px) scale(1.08) rotateX(5deg);
  border-color: rgba(255, 255, 255, 0.95);
  animation-play-state: paused;
  box-shadow: 
    0 20px 50px rgba(181, 0, 56, 0.6),
    0 8px 25px rgba(181, 0, 56, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
  outline: none;
}

.live-chat .chatbox:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
}

.live-chat .chatbox:active {
  transform: translateY(-2px) scale(1.02) rotateX(2deg);
  box-shadow: 
    0 8px 20px rgba(181, 0, 56, 0.5),
    0 4px 12px rgba(181, 0, 56, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Green status dot inside trigger button */
.live-chat .chatbox-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
  position: relative;
}

.live-chat .chatbox-status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  animation: statusPulse 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

/* ─── Popup Container ─────────────────────────────────────── */
.live-chat .dropchat {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  right: calc(28px + env(safe-area-inset-right, 0px));
  width: 420px;
  max-width: calc(100vw - 56px);
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(40px) rotateX(-15deg) scale(0.9);
  transform-origin: bottom right;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100005;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  box-sizing: border-box;
  perspective: 1000px;
}

.live-chat .dropchat.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) rotateX(0deg) scale(1);
}

/* ─── Card shell with 3D effects ───────────────────────────── */
.livechat-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 28px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow:
    0 40px 80px rgba(15, 23, 42, 0.3),
    0 15px 40px rgba(181, 0, 56, 0.2),
    0 0 0 1px rgba(226, 232, 240, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  transform-style: preserve-3d;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.livechat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  z-index: 1;
}

/* ─── Header with 3D gradient and effects ───────────────────── */
.livechat-header {
  background: linear-gradient(135deg, #5a0018 0%, #b50038 50%, #1a1f3c 100%);
  padding: 20px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.livechat-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float3D 6s ease-in-out infinite;
}

.livechat-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
  position: relative;
  z-index: 1;
}

.livechat-logo-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  transform: translateZ(10px);
  transition: transform 0.3s ease;
}

.livechat-logo-badge:hover {
  transform: translateZ(15px) rotateY(10deg);
}

.livechat-header-text {
  min-width: 0;
  overflow: hidden;
  transform: translateZ(5px);
}

.livechat-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.livechat-online-status {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.livechat-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
  flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
}

.livechat-close-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  transform: translateZ(8px);
  position: relative;
  z-index: 2;
}

.livechat-close-btn:hover,
.livechat-close-btn:focus-visible {
  background: #ffffff;
  color: #b50038;
  transform: translateZ(12px) rotate(90deg) scale(1.15);
  box-shadow: 
    0 10px 25px rgba(255, 255, 255, 0.4),
    0 0 0 4px rgba(255, 255, 255, 0.3);
}

.livechat-close-btn:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

.livechat-close-btn:active {
  transform: translateZ(6px) rotate(90deg) scale(1.05);
}

/* ─── Body with 3D depth ───────────────────────────────────── */
.livechat-body {
  padding: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  position: relative;
}

.livechat-body::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(248, 250, 252, 0.8), transparent);
  pointer-events: none;
}

.livechat-executive-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  animation: slideUp3D 0.6s ease-out;
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.livechat-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.livechat-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b50038, #e41e26, #ff6b6b);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 
    0 8px 20px rgba(181, 0, 56, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.livechat-avatar-icon:hover {
  transform: scale(1.1) rotateY(10deg);
}

.livechat-status-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 3px solid #f8fafc;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
  animation: statusPulse 2s ease-in-out infinite;
}

.livechat-chat-bubble {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px 18px;
  border-radius: 20px 20px 20px 6px;
  box-shadow: 
    0 4px 15px rgba(15, 23, 42, 0.1),
    0 2px 6px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.8);
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  transform: translateZ(4px);
  transition: transform 0.3s ease;
}

.livechat-chat-bubble:hover {
  transform: translateZ(8px) translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(15, 23, 42, 0.15),
    0 4px 10px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.livechat-chat-bubble p {
  margin: 0;
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.6;
  font-weight: 600;
}

.livechat-time {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.livechat-time i {
  color: #f59e0b;
  filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.3));
}

/* Quick-action chips with 3D effects */
.livechat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  animation: slideUp3D 0.6s ease-out;
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

.livechat-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  flex: 1 1 auto;
  min-width: fit-content;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateZ(2px);
  position: relative;
  overflow: hidden;
}

.livechat-chip-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.livechat-chip-btn:hover::before {
  opacity: 1;
}

.livechat-chip-btn.chip-wa i { color: #10b981; }
.livechat-chip-btn.chip-call i { color: #2563eb; }
.livechat-chip-btn.chip-demo i { color: #b50038; }

.livechat-chip-btn:hover,
.livechat-chip-btn:focus-visible {
  background: linear-gradient(135deg, #b50038 0%, #e41e26 100%);
  color: #ffffff !important;
  border-color: #b50038;
  transform: translateZ(8px) translateY(-3px) scale(1.05);
  box-shadow: 
    0 8px 20px rgba(181, 0, 56, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  outline: none;
}

.livechat-chip-btn:hover i,
.livechat-chip-btn:focus-visible i {
  color: #ffffff !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.livechat-chip-btn:active {
  transform: translateZ(4px) translateY(-1px) scale(1.02);
}

/* ─── Footer CTAs with 3D effects ─────────────────────────────── */
.livechat-footer {
  padding: 16px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid #eef2f7;
  flex-shrink: 0;
  position: relative;
}

.livechat-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.8), transparent);
}

.livechat-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.livechat-cta-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  border: none;
}

.livechat-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.livechat-cta-btn:hover::before {
  opacity: 1;
}

.livechat-cta-btn:hover,
.livechat-cta-btn:focus-visible {
  transform: translateY(-4px) scale(1.05) rotateX(5deg);
  filter: brightness(1.1);
  outline: none;
}

.livechat-cta-btn:active {
  transform: translateY(-2px) scale(1.02) rotateX(2deg);
}

.livechat-cta-btn .cta-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
  transform: translateZ(4px);
  position: relative;
  z-index: 1;
}

.livechat-cta-btn .cta-sub {
  font-size: 0.72rem;
  opacity: 0.95;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  transform: translateZ(3px);
  position: relative;
  z-index: 1;
}

.whatsapp-cta {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  box-shadow: 
    0 6px 20px rgba(16, 185, 129, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.whatsapp-cta:hover,
.whatsapp-cta:focus-visible {
  box-shadow: 
    0 12px 30px rgba(16, 185, 129, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.call-cta {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  box-shadow: 
    0 6px 20px rgba(37, 99, 235, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.call-cta:hover,
.call-cta:focus-visible {
  box-shadow: 
    0 12px 30px rgba(37, 99, 235, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* ─── Tablet / Medium screens (641px – 1024px) ────────────── */
@media (min-width: 641px) and (max-width: 1024px) {
  .fixed-live-chat {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
  }
  .live-chat .dropchat {
    right: calc(24px + env(safe-area-inset-right, 0px));
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    width: 380px;
  }
}

/* ─── Mobile (<= 640px) ───────────────────────────────────── */
@media (max-width: 640px) {
  .fixed-live-chat {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
  }

  /* Hide trigger button on mobile */
  .live-chat .chatbox {
    display: none !important;
  }

  /* Hide trigger when chat is open */
  .fixed-live-chat:has(.dropchat.active) .chatbox,
  .fixed-live-chat.chat-open .chatbox {
    display: none !important;
  }

  /* Popup: mobile optimized - more prominent */
  .live-chat .dropchat {
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    width: calc(100% - 32px);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    max-height: calc(100vh - 70px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 70px - env(safe-area-inset-bottom, 0px));
    transform-origin: bottom center;
    z-index: 100005;
  }

  .livechat-card {
    border-radius: 28px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(181, 0, 56, 0.2);
  }

  .livechat-header {
    padding: 20px 22px;
    gap: 14px;
    background: linear-gradient(135deg, #8a0028 0%, #b50038 50%, #e41e26 100%);
  }

  .livechat-header-info {
    gap: 14px;
  }

  .livechat-logo-badge {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .livechat-title {
    font-size: 1.15rem;
    font-weight: 700;
  }

  .livechat-online-status {
    font-size: 0.8rem;
    gap: 7px;
    color: rgba(255, 255, 255, 0.95);
  }

  .livechat-close-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .livechat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
  }

  .livechat-body {
    padding: 20px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  }

  .livechat-executive-row {
    gap: 14px;
    margin-bottom: 18px;
  }

  .livechat-avatar-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .livechat-chat-bubble {
    padding: 16px 18px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .livechat-chat-bubble p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #1e293b;
  }

  .livechat-chips {
    gap: 10px;
    margin-top: 18px;
  }

  .livechat-chip-btn {
    font-size: 0.84rem;
    padding: 12px 16px;
    gap: 7px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .livechat-footer {
    padding: 18px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .livechat-action-grid {
    gap: 12px;
  }

  .livechat-cta-btn {
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .livechat-cta-btn .cta-label {
    font-size: 0.9rem;
    gap: 8px;
    font-weight: 700;
  }

  .livechat-cta-btn .cta-sub {
    font-size: 0.72rem;
    font-weight: 500;
  }
}

/* ─── Extra-narrow phones (<= 360px) ──────────────────────── */
@media (max-width: 360px) {
  .fixed-live-chat {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }

  /* Hide trigger button on extra-narrow phones */
  .live-chat .chatbox {
    display: none !important;
  }
  /* Popup fills almost full width */
  .live-chat .dropchat {
    right: 10px;
    left: 10px;
    width: calc(100% - 20px);
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 60px - env(safe-area-inset-bottom, 0px));
  }
  .livechat-card {
    border-radius: 24px;
  }
  .livechat-header {
    padding: 18px 18px;
  }
  .livechat-logo-badge {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
  .livechat-title {
    font-size: 1.05rem;
  }
  .livechat-close-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1rem;
  }
  .livechat-body {
    padding: 16px 16px;
  }
  .livechat-avatar-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  .livechat-chat-bubble {
    padding: 14px 15px;
  }
  .livechat-chat-bubble p {
    font-size: 0.88rem;
  }
  .livechat-chips {
    gap: 8px;
  }
  .livechat-chip-btn {
    font-size: 0.8rem;
    padding: 10px 14px;
  }
  .livechat-footer {
    padding: 16px 16px;
  }
  /* Single-column CTA grid */
  .livechat-action-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .livechat-cta-btn {
    padding: 14px 12px;
  }
  .livechat-cta-btn .cta-label {
    font-size: 0.88rem;
  }
  .livechat-cta-btn .cta-sub {
    font-size: 0.7rem;
  }
}

/* ─── Accessibility: reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .live-chat .chatbox,
  .live-chat .chatbox-status-dot,
  .livechat-online-dot,
  .livechat-status-badge,
  .livechat-executive-row,
  .livechat-chips {
    animation: none !important;
  }
  
  .live-chat .chatbox:hover,
  .live-chat .dropchat.active,
  .livechat-cta-btn:hover {
    transform: none !important;
  }
}