/**
 * Musaned Custom Chat System — Musaned Website Brand System
 * Direction: Accessible, compact support experience
 * Color System: Site Charcoal (#0C1012), Secondary Slate (#334155),
 *               Brand Cyan (#2990B1), Background (#F5F8FA), Soft Border (#DCE3E4)
 * Supports: Arabic (RTL) / English (LTR), Dark Mode, Mobile Safe-Areas, Reduced Motion
 *
 * @package MusanedCustomChat
 */

:root {
  /* Musaned Site Color Tokens */
  --mcc-primary-dark: #0C1012;
  --mcc-secondary-slate: #334155;
  --mcc-brand-cyan-dark: #1B6C86;
  --mcc-brand-cyan: #2990B1;
  --mcc-brand-cyan-light: #EAF5F8;
  --mcc-brand-cyan-glow: rgba(41, 144, 177, 0.22);
  --mcc-bg-body: #F5F8FA;
  --mcc-bg-window: #FFFFFF;
  --mcc-bg-header: #0C1012;
  --mcc-surface: #FFFFFF;
  --mcc-surface-hover: #F5F8FA;
  --mcc-border: #DCE3E4;
  --mcc-border-subtle: #E8ECEE;
  --mcc-text-primary: #0F172A;
  --mcc-text-secondary: #475569;
  --mcc-text-muted: #64748B;
  --mcc-text-on-dark: #FFFFFF;

  /* Bubbles */
  --mcc-bubble-bot-bg: #FFFFFF;
  --mcc-bubble-bot-border: #DCE3E4;
  --mcc-bubble-bot-text: #17262D;
  --mcc-bubble-user-bg: #1B6C86;
  --mcc-bubble-user-text: #FFFFFF;

  /* WhatsApp Official */
  --mcc-whatsapp: #25D366;
  --mcc-whatsapp-dark: #1EBE5D;
  --mcc-whatsapp-glow: rgba(37, 211, 102, 0.3);

  /* Elevation & Geometry */
  --mcc-shadow-window: 0 18px 48px -14px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.06);
  --mcc-shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
  --mcc-shadow-card-hover: 0 5px 14px rgba(15, 23, 42, 0.1);
  --mcc-radius-window: 20px;
  --mcc-radius-card: 14px;
  --mcc-radius-bubble: 16px;
  --mcc-font: "Cairo", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

/* Dark Mode Integration */
.dark, [data-theme="dark"] {
  --mcc-bg-window: #0C1012;
  --mcc-bg-header: #0C1012;
  --mcc-bg-body: #0C1012;
  --mcc-surface: #12181B;
  --mcc-surface-hover: #182126;
  --mcc-border: #263F4E;
  --mcc-border-subtle: #1E3340;
  --mcc-text-primary: #F5F8FA;
  --mcc-text-secondary: #9FB2BD;
  --mcc-text-muted: #6B828F;
  --mcc-bubble-bot-bg: #182C38;
  --mcc-bubble-bot-border: #263F4E;
  --mcc-bubble-bot-text: #F5F8FA;
  --mcc-bubble-user-bg: #1B6C86;
  --mcc-bubble-user-text: #FFFFFF;
  --mcc-shadow-window: 0 28px 70px -15px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(41, 144, 177, 0.15);
}

/* --------------------------------------------------------------------------
   Root Container
   -------------------------------------------------------------------------- */
.mcc-root {
  position: fixed;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  z-index: 99999;
  font-family: var(--mcc-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--mcc-text-primary);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.mcc-root *, .mcc-root *::before, .mcc-root *::after {
  box-sizing: inherit;
}

.mcc-root [hidden] {
  display: none !important;
}

.mcc-pos-right {
  right: max(1.5rem, env(safe-area-inset-right, 1.5rem));
  left: auto;
}

.mcc-pos-left {
  left: max(1.5rem, env(safe-area-inset-left, 1.5rem));
  right: auto;
}

/* --------------------------------------------------------------------------
   Floating Launcher Button (Musaned Cyan)
   -------------------------------------------------------------------------- */
.mcc-launcher {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: var(--mcc-brand-cyan-dark);
  color: #FFFFFF;
  border: 1.5px solid var(--mcc-brand-cyan-dark);
  box-shadow: 0 12px 28px -6px rgba(19, 35, 45, 0.4), 0 0 0 1px rgba(41, 144, 177, 0.3);
  cursor: pointer;
  padding: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s ease,
              border-color 0.22s ease;
  user-select: none;
  outline: none;
}

.mcc-launcher:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: var(--mcc-brand-cyan);
  box-shadow: 0 16px 36px -6px rgba(19, 35, 45, 0.5), 0 0 0 3px var(--mcc-brand-cyan-glow);
}

.mcc-launcher:active {
  transform: translateY(0) scale(0.96);
}

.mcc-launcher:focus-visible {
  outline: 2px solid var(--mcc-brand-cyan-dark);
  outline-offset: 3px;
}

.mcc-launcher-icon-wrap {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  position: relative;
}

.mcc-launcher-icon {
  position: absolute;
  width: 26px;
  height: 26px;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.mcc-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

.mcc-launcher[aria-expanded="true"] .mcc-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

.mcc-launcher[aria-expanded="true"] .mcc-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.mcc-unread-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--mcc-brand-cyan-dark);
  color: #0C1012;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   Chat Window (Corporate Luxury Dimension & Styling)
   -------------------------------------------------------------------------- */
.mcc-window {
  position: absolute;
  bottom: calc(60px + 14px);
  width: 396px;
  max-width: calc(100vw - 28px);
  height: min(590px, calc(100dvh - 110px), calc(100vh - 110px));
  max-height: calc(100dvh - 90px);
  min-height: 400px;
  background: var(--mcc-bg-window);
  border: 1px solid var(--mcc-border);
  border-radius: var(--mcc-radius-window);
  box-shadow: var(--mcc-shadow-window);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
  z-index: 99999;
}

.mcc-pos-right .mcc-window {
  right: 0;
  left: auto;
  transform-origin: bottom right;
}

.mcc-pos-left .mcc-window {
  left: 0;
  right: auto;
  transform-origin: bottom left;
}

.mcc-window.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* --------------------------------------------------------------------------
   Window Header (Deep Luxury Dark with Gold Accent)
   -------------------------------------------------------------------------- */
.mcc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--mcc-primary-dark);
  color: var(--mcc-text-on-dark);
  border-bottom: 1px solid rgba(41, 144, 177, 0.2);
  flex-shrink: 0;
  z-index: 5;
  gap: 6px;
}

.mcc-header-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.mcc-btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.18s ease, transform 0.18s ease;
}

.mcc-btn-back:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

.mcc-btn-back svg {
  width: 15px;
  height: 15px;
}

.mcc-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.mcc-avatar-circle {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1.5px solid var(--mcc-brand-cyan-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  padding: 2px;
}

.mcc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mcc-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--mcc-brand-cyan-dark);
  border: 2px solid var(--mcc-primary-dark);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.mcc-status-dot.is-live {
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.mcc-status-dot.is-queued {
  background: #F59E0B;
}

.mcc-status-dot.is-offline {
  background: #8E9BA1;
}

.mcc-title-meta {
  min-width: 0;
  flex: 1;
}

.mcc-brand-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.mcc-subtitle {
  margin: 1px 0 0 0;
  font-size: 11px;
  color: #DCE3E4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mcc-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mcc-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.mcc-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.mcc-header-btn svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Body Area & Messages Region
   -------------------------------------------------------------------------- */
.mcc-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 22px 16px;
  background: var(--mcc-bg-body);
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.mcc-body::-webkit-scrollbar {
  width: 5px;
}

.mcc-body::-webkit-scrollbar-track {
  background: transparent;
}

.mcc-body::-webkit-scrollbar-thumb {
  background: rgba(19, 35, 45, 0.15);
  border-radius: 999px;
}

.mcc-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  min-height: min-content;
}

/* --------------------------------------------------------------------------
   Message Bubbles (Corporate Contrast & Operator Support)
   -------------------------------------------------------------------------- */
.mcc-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: mccFadeSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mcc-msg-bot,
.mcc-msg-operator {
  align-self: flex-start;
}

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

.mcc-msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mcc-text-secondary);
  margin-bottom: 3px;
  padding: 0 4px;
}

.mcc-msg-meta.is-operator .mcc-sender-name {
  color: var(--mcc-primary-dark);
  font-weight: 800;
}

.mcc-operator-chip {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(41, 144, 177, 0.18);
  color: #1B6C86;
  border: 1px solid rgba(41, 144, 177, 0.4);
}

.mcc-bubble {
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: var(--mcc-radius-bubble);
  word-wrap: break-word;
  white-space: pre-line;
}

.mcc-msg-bot .mcc-bubble {
  background: var(--mcc-bubble-bot-bg);
  color: var(--mcc-bubble-bot-text);
  border: 1px solid var(--mcc-bubble-bot-border);
  box-shadow: 0 1px 3px rgba(19, 35, 45, 0.04);
  border-top-left-radius: 4px;
}

[dir="rtl"] .mcc-msg-bot .mcc-bubble {
  border-top-left-radius: var(--mcc-radius-bubble);
  border-top-right-radius: 4px;
}

/* Real Human Operator Bubble (Distinguished Gold Rim) */
.mcc-msg-operator .mcc-bubble {
  background: var(--mcc-surface);
  color: var(--mcc-text-primary);
  border: 1.5px solid var(--mcc-brand-cyan-dark);
  box-shadow: 0 3px 12px -2px rgba(41, 144, 177, 0.28);
  border-top-left-radius: 4px;
}

[dir="rtl"] .mcc-msg-operator .mcc-bubble {
  border-top-left-radius: var(--mcc-radius-bubble);
  border-top-right-radius: 4px;
}

.mcc-msg-user .mcc-bubble {
  background: var(--mcc-bubble-user-bg);
  color: var(--mcc-bubble-user-text);
  box-shadow: 0 2px 6px rgba(19, 35, 45, 0.15);
  border-top-right-radius: 4px;
}

[dir="rtl"] .mcc-msg-user .mcc-bubble {
  border-top-right-radius: var(--mcc-radius-bubble);
  border-top-left-radius: 4px;
}

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

.mcc-msg-bot .mcc-msg-time,
.mcc-msg-operator .mcc-msg-time {
  align-self: flex-start;
}

.mcc-msg-user .mcc-msg-time {
  align-self: flex-end;
}

/* --------------------------------------------------------------------------
   Interactive Tracks: PRIMARY CTA + SECONDARY SERVICES
   -------------------------------------------------------------------------- */
.mcc-interactive {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: 2px;
  padding-bottom: 6px;
}

.mcc-welcome-tracks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Track 1: Primary Action — Live Customer Support (High Priority Corporate Luxury Card) */
.mcc-primary-cta,
.mcc-service-card.mcc-primary-cta {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 13px 15px !important;
  background: #0C1012 !important;
  color: #FFFFFF !important;
  border: 1.5px solid var(--mcc-brand-cyan-dark) !important;
  border-radius: var(--mcc-radius-card) !important;
  box-shadow: 0 6px 18px -3px rgba(19, 35, 45, 0.28), 0 0 0 1px rgba(41, 144, 177, 0.2) !important;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease,
              background 0.2s ease;
  user-select: none;
  text-align: start !important;
  margin: 2px 0 6px 0 !important;
  min-height: auto !important;
  box-sizing: border-box !important;
}

.mcc-primary-cta:hover,
.mcc-service-card.mcc-primary-cta:hover {
  transform: translateY(-2px);
  background: #12181B !important;
  border-color: var(--mcc-brand-cyan) !important;
  box-shadow: 0 10px 24px -4px rgba(19, 35, 45, 0.38), 0 0 0 2px var(--mcc-brand-cyan-glow) !important;
}

.mcc-primary-cta:active,
.mcc-service-card.mcc-primary-cta:active {
  transform: translateY(0);
}

.mcc-primary-cta-content {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.mcc-primary-cta-icon-wrap {
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 9999px !important;
  background: rgba(41, 144, 177, 0.2) !important;
  border: 1.5px solid var(--mcc-brand-cyan-dark) !important;
  color: #EAF5F8 !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mcc-primary-cta:hover .mcc-primary-cta-icon-wrap,
.mcc-service-card.mcc-primary-cta:hover .mcc-primary-cta-icon-wrap {
  transform: scale(1.06);
  background: var(--mcc-brand-cyan-dark) !important;
  color: var(--mcc-primary-dark) !important;
}

.mcc-primary-cta-icon-wrap svg {
  width: 20px !important;
  height: 20px !important;
}

.mcc-primary-cta-texts {
  min-width: 0 !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.mcc-primary-cta-header-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 1px !important;
  flex-wrap: wrap !important;
}

.mcc-primary-cta-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
  letter-spacing: -0.1px;
  line-height: 1.3 !important;
}

.mcc-primary-cta-badge {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: rgba(41, 144, 177, 0.25) !important;
  color: #EAF5F8 !important;
  border: 1px solid var(--mcc-brand-cyan-dark) !important;
  letter-spacing: 0.2px;
  white-space: nowrap !important;
}

.mcc-primary-cta-sub {
  margin: 0 !important;
  font-size: 11.5px !important;
  color: #DCE3E4 !important;
  line-height: 1.35 !important;
}

.mcc-primary-cta-arrow {
  display: grid !important;
  place-items: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--mcc-brand-cyan-dark) !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mcc-primary-cta:hover .mcc-primary-cta-arrow,
.mcc-service-card.mcc-primary-cta:hover .mcc-primary-cta-arrow {
  background: var(--mcc-brand-cyan-dark) !important;
  color: var(--mcc-primary-dark) !important;
}

[dir="rtl"] .mcc-primary-cta:hover .mcc-primary-cta-arrow,
[dir="rtl"] .mcc-service-card.mcc-primary-cta:hover .mcc-primary-cta-arrow {
  transform: translateX(-3px);
}
[dir="ltr"] .mcc-primary-cta:hover .mcc-primary-cta-arrow,
[dir="ltr"] .mcc-service-card.mcc-primary-cta:hover .mcc-primary-cta-arrow {
  transform: translateX(3px);
}

.mcc-primary-cta-arrow svg {
  width: 14px !important;
  height: 14px !important;
}

/* Track 2: Secondary Action Header */
.mcc-secondary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px 0;
}

.mcc-secondary-header::before,
.mcc-secondary-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--mcc-border);
}

.mcc-secondary-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--mcc-text-secondary);
  letter-spacing: 0.2px;
}

/* Secondary Services Grid (Minimal SaaS Compact Grid) */
.mcc-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  width: 100%;
}

.mcc-service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 9px 11px;
  background: var(--mcc-surface);
  border: 1px solid var(--mcc-border);
  border-radius: 11px;
  cursor: pointer;
  text-align: start;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--mcc-shadow-card);
  position: relative;
  outline: none;
  min-height: 68px;
}

.mcc-service-card:hover {
  background: var(--mcc-surface-hover);
  border-color: var(--mcc-brand-cyan-dark);
  transform: translateY(-2px);
  box-shadow: var(--mcc-shadow-card-hover);
}

.mcc-service-card:focus-visible {
  outline: 2px solid var(--mcc-brand-cyan-dark);
  outline-offset: 2px;
}

.mcc-service-card.is-contextual {
  border-color: var(--mcc-brand-cyan-dark);
  background: var(--mcc-brand-cyan-light);
  box-shadow: 0 4px 12px -2px var(--mcc-brand-cyan-glow);
}

.mcc-service-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--mcc-bg-body);
  border: 1px solid var(--mcc-border);
  color: var(--mcc-primary-dark);
  margin-bottom: 5px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.mcc-service-card:hover .mcc-service-icon {
  transform: scale(1.08);
  background: var(--mcc-brand-cyan-dark);
  color: #0C1012;
  border-color: var(--mcc-brand-cyan-dark);
}

.mcc-service-icon svg {
  width: 14px;
  height: 14px;
}

.mcc-service-info {
  min-width: 0;
  width: 100%;
}

.mcc-service-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.mcc-service-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--mcc-text-primary);
  line-height: 1.25;
}

.mcc-contextual-badge {
  font-size: 9px;
  font-weight: 700;
  color: #1B6C86;
  background: rgba(41, 144, 177, 0.2);
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
}

.mcc-service-desc {
  display: block;
  font-size: 10px;
  color: var(--mcc-text-secondary);
  line-height: 1.25;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mcc-service-card.is-contextual {
  border-color: var(--mcc-brand-cyan-dark);
  background: var(--mcc-brand-cyan-light);
  box-shadow: 0 4px 14px -2px var(--mcc-brand-cyan-glow);
}

.mcc-service-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--mcc-bg-body);
  border: 1px solid var(--mcc-border);
  color: var(--mcc-primary-dark);
  margin-bottom: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mcc-service-card:hover .mcc-service-icon {
  transform: scale(1.08);
  background: var(--mcc-brand-cyan-dark);
  color: #0C1012;
  border-color: var(--mcc-brand-cyan-dark);
}

.mcc-service-icon svg {
  width: 17px;
  height: 17px;
}

.mcc-service-info {
  min-width: 0;
  width: 100%;
}

.mcc-service-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.mcc-service-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--mcc-text-primary);
  line-height: 1.3;
}

.mcc-contextual-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: #1B6C86;
  background: rgba(41, 144, 177, 0.2);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.mcc-service-desc {
  display: block;
  font-size: 11px;
  color: var(--mcc-text-secondary);
  line-height: 1.35;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Confirmation Card (Corporate Summary)
   -------------------------------------------------------------------------- */
.mcc-confirm-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--mcc-surface);
  border: 1px solid var(--mcc-border);
  border-radius: var(--mcc-radius-card);
  box-shadow: var(--mcc-shadow-card);
  animation: mccFadeSlide 0.2s ease;
}

.mcc-confirm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--mcc-border-subtle);
  font-size: 13px;
}

.mcc-confirm-item:last-of-type {
  border-bottom: none;
}

.mcc-confirm-key {
  color: var(--mcc-text-secondary);
}

.mcc-confirm-val-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcc-confirm-val {
  color: var(--mcc-text-primary);
  font-weight: 600;
}

.mcc-btn-edit {
  background: transparent;
  border: none;
  color: var(--mcc-brand-cyan-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.mcc-btn-edit:hover {
  background: var(--mcc-brand-cyan-light);
  color: var(--mcc-brand-cyan);
}

.mcc-confirm-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcc-btn-edit-details {
  min-height: 42px;
  border: 1px solid var(--mcc-border);
  border-radius: 10px;
  background: transparent;
  color: var(--mcc-primary-dark);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.mcc-btn-edit-details:hover,
.mcc-btn-edit-details:focus-visible {
  border-color: var(--mcc-brand-cyan-dark);
  outline: 2px solid var(--mcc-brand-cyan-glow);
  outline-offset: 2px;
}

.mcc-btn-primary {
  width: 100%;
  padding: 12px 18px;
  background: var(--mcc-brand-cyan-dark);
  color: #FFFFFF;
  border: 1.5px solid var(--mcc-brand-cyan-dark);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(19, 35, 45, 0.15);
}

.mcc-btn-primary:hover {
  background: var(--mcc-brand-cyan-dark);
  border-color: var(--mcc-brand-cyan);
  box-shadow: 0 6px 18px rgba(19, 35, 45, 0.25);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   WhatsApp Fallback Card (Verified Channel)
   -------------------------------------------------------------------------- */
.mcc-whatsapp-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--mcc-surface);
  border: 1px solid var(--mcc-border);
  border-radius: var(--mcc-radius-card);
  box-shadow: var(--mcc-shadow-card);
  animation: mccFadeSlide 0.2s ease;
}

.mcc-whatsapp-card-header {
  display: flex;
  gap: 12px;
}

.mcc-whatsapp-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  color: var(--mcc-whatsapp);
  flex-shrink: 0;
}

.mcc-whatsapp-card-icon svg {
  width: 22px;
  height: 22px;
}

.mcc-whatsapp-card-meta {
  min-width: 0;
  flex: 1;
}

.mcc-whatsapp-card-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mcc-text-primary);
}

.mcc-whatsapp-card-text {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: var(--mcc-text-secondary);
  line-height: 1.4;
}

.mcc-whatsapp-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: var(--mcc-whatsapp);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px -3px var(--mcc-whatsapp-glow);
}

.mcc-whatsapp-cta-btn:hover {
  background: var(--mcc-whatsapp-dark);
  transform: translateY(-1px);
  color: #FFFFFF;
}

.mcc-whatsapp-cta-icon svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Typing Indicator
   -------------------------------------------------------------------------- */
.mcc-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--mcc-surface);
  border: 1px solid var(--mcc-border);
  border-radius: 12px;
  align-self: flex-start;
  width: fit-content;
}

.mcc-typing-dots {
  display: flex;
  gap: 4px;
}

.mcc-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--mcc-brand-cyan-dark);
  animation: mccBounce 1.4s infinite ease-in-out both;
}

.mcc-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.mcc-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.mcc-typing-label {
  color: var(--mcc-text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.mcc-root button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none !important;
  box-shadow: none !important;
}

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

/* --------------------------------------------------------------------------
   Footer & Input Form
   -------------------------------------------------------------------------- */
.mcc-footer {
  padding: 12px 16px;
  background: var(--mcc-bg-window);
  border-top: 1px solid var(--mcc-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcc-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.mcc-form-error {
  color: #A33030;
  font-size: 12px;
  line-height: 1.4;
  padding: 2px 4px;
}

.mcc-form-error[hidden] {
  display: none;
}

.mcc-country-select-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.mcc-country-source {
  padding-inline-start: 5px;
  color: var(--mcc-text-muted);
  font-size: 9px;
  line-height: 1.1;
}

.mcc-country-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 10px;
  background: var(--mcc-bg-body);
  border: 1px solid var(--mcc-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mcc-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mcc-country-name-display {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcc-name-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 6px;
  padding: 4px 0 4px 4px;
  padding-inline-start: 4px;
}

.mcc-skip-name {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--mcc-border);
  border-radius: 10px;
  background: var(--mcc-surface);
  color: var(--mcc-primary-dark);
  font: inherit;
  cursor: pointer;
}

.mcc-skip-name:hover,
.mcc-skip-name:focus-visible {
  border-color: var(--mcc-brand-cyan-dark);
  outline: 2px solid var(--mcc-brand-cyan-glow);
  outline-offset: 2px;
}

.mcc-country-btn:hover {
  border-color: var(--mcc-brand-cyan-dark);
  background: var(--mcc-surface);
}

.mcc-chevron-down {
  width: 14px;
  height: 14px;
  color: var(--mcc-text-muted);
}

.mcc-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.mcc-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--mcc-bg-body);
  border: 1px solid var(--mcc-border);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--mcc-text-primary);
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.mcc-input:focus {
  background: var(--mcc-surface);
  border-color: var(--mcc-primary-dark);
  box-shadow: 0 0 0 3px var(--mcc-brand-cyan-glow);
}

.mcc-send-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--mcc-brand-cyan-dark);
  color: #FFFFFF;
  border: 1px solid var(--mcc-brand-cyan-dark);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mcc-send-btn:hover {
  background: var(--mcc-brand-cyan-dark);
  border-color: var(--mcc-brand-cyan);
  transform: scale(1.04);
}

.mcc-send-btn:active {
  transform: scale(0.96);
}

.mcc-send-icon {
  width: 18px;
  height: 18px;
}

[dir="rtl"] .mcc-send-icon {
  transform: rotate(180deg);
}

.mcc-footer-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--mcc-text-muted);
}

.mcc-footer-privacy a {
  color: var(--mcc-text-secondary);
  text-decoration: none;
}

.mcc-footer-privacy a:hover {
  color: var(--mcc-brand-cyan-dark);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Country Dropdown Popover
   -------------------------------------------------------------------------- */
.mcc-country-dropdown {
  position: absolute;
  bottom: 64px;
  left: 16px;
  right: 16px;
  max-height: 280px;
  background: var(--mcc-surface);
  border: 1px solid var(--mcc-border);
  border-radius: 14px;
  box-shadow: 0 16px 36px -6px rgba(19, 35, 45, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  animation: mccFadeSlide 0.18s ease;
}

.mcc-country-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--mcc-border);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--mcc-text-primary);
}

.mcc-country-dropdown-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--mcc-text-muted);
}

.mcc-country-dropdown-close svg {
  width: 16px;
  height: 16px;
}

.mcc-country-search-wrap {
  position: relative;
  padding: 8px 12px;
  border-bottom: 1px solid var(--mcc-border-subtle);
}

.mcc-country-search-icon {
  position: absolute;
  top: 16px;
  left: 20px;
  width: 14px;
  height: 14px;
  color: var(--mcc-text-muted);
}

[dir="rtl"] .mcc-country-search-icon {
  left: auto;
  right: 20px;
}

.mcc-country-search {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 28px;
  background: var(--mcc-bg-body);
  border: 1px solid var(--mcc-border);
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  color: var(--mcc-text-primary);
}

[dir="rtl"] .mcc-country-search {
  padding: 0 28px 0 10px;
}

.mcc-country-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  flex: 1;
}

.mcc-country-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--mcc-text-primary);
}

.mcc-country-option:hover,
.mcc-country-option.is-highlighted {
  background: var(--mcc-surface-hover);
  color: var(--mcc-brand-cyan);
}

.mcc-country-option.is-selected {
  background: var(--mcc-brand-cyan-light);
  color: var(--mcc-brand-cyan-dark);
}

.mcc-country-option-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcc-country-option-dial {
  font-size: 11.5px;
  color: var(--mcc-text-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Mobile Floating Peek Bubble
   -------------------------------------------------------------------------- */
.mcc-mobile-peek {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 290px;
  padding: 12px 14px;
  background: var(--mcc-surface);
  border: 1px solid var(--mcc-border);
  border-radius: 14px;
  box-shadow: 0 12px 28px -6px rgba(19, 35, 45, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  animation: mccFadeSlide 0.25s ease;
}

.mcc-peek-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--mcc-brand-cyan-dark);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mcc-peek-avatar svg {
  width: 16px;
  height: 16px;
}

.mcc-peek-content {
  min-width: 0;
  flex: 1;
}

.mcc-peek-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mcc-text-primary);
}

.mcc-peek-text {
  margin: 1px 0 0 0;
  font-size: 11px;
  color: var(--mcc-text-secondary);
}

.mcc-peek-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--mcc-text-muted);
  cursor: pointer;
  padding: 0 4px;
}

/* --------------------------------------------------------------------------
   Scroll Pill Indicator
   -------------------------------------------------------------------------- */
.mcc-new-messages-indicator {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--mcc-brand-cyan-dark);
  color: #FFFFFF;
  border: 1px solid var(--mcc-brand-cyan-dark);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(19, 35, 45, 0.25);
  animation: mccFadeSlide 0.2s ease;
}

.mcc-new-messages-indicator svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Mobile Responsiveness (Below 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .mcc-root {
    bottom: 16px;
  }

  .mcc-pos-right {
    right: 16px;
  }

  .mcc-pos-left {
    left: 16px;
  }

  .mcc-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    z-index: 100000;
  }

  .mcc-header {
    padding-top: max(12px, env(safe-area-inset-top, 12px));
    padding-bottom: 10px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .mcc-brand-title {
    font-size: 13px;
  }

  .mcc-body {
    padding: 12px 14px 22px 14px;
    gap: 10px;
  }

  .mcc-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }

  /* Compact 2-column luxury grid on mobile */
  .mcc-services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .mcc-service-card {
    padding: 8px 10px !important;
    min-height: 60px !important;
    border-radius: 9px !important;
  }

  .mcc-service-icon {
    width: 22px !important;
    height: 22px !important;
    margin-bottom: 3px !important;
  }

  .mcc-service-icon svg {
    width: 12px !important;
    height: 12px !important;
  }

  .mcc-service-label {
    font-size: 11px !important;
  }

  .mcc-service-desc {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
  }

  .mcc-primary-cta,
  .mcc-service-card.mcc-primary-cta {
    padding: 11px 13px !important;
  }

  .mcc-primary-cta-icon-wrap {
    width: 36px !important;
    height: 36px !important;
  }

  .mcc-primary-cta-icon-wrap svg {
    width: 18px !important;
    height: 18px !important;
  }

  .mcc-primary-cta-title {
    font-size: 13px !important;
  }

  .mcc-primary-cta-sub {
    font-size: 10.5px !important;
  }

  .mcc-country-name-display {
    display: inline;
    max-width: 58px;
    font-size: 10.5px;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mcc-launcher,
  .mcc-window,
  .mcc-msg,
  .mcc-primary-cta,
  .mcc-service-card,
  .mcc-typing-dots span {
    animation: none !important;
    transition: none !important;
  }
}
