/* ==========================================================================
   Q-DASH SMS CAMPAIGN LIVE SIMULATOR — EXACT REFERENCE STYLING
   Visual Identity: Clean Light/White Environment, Deep Navy (#0F2034 / #1E2D3D),
   Vibrant Orange (#FF6A2A), Electric Cyan/Blue (#00B4D8 / #38BDF8), WhatsApp Green (#25D366)
   ========================================================================== */

:root {
  --qd-sms-bg: #FFFFFF;
  --qd-sms-card-bg: #FFFFFF;
  --qd-sms-navy: #0F2034;
  --qd-sms-orange: #FF6A2A;
  --qd-sms-orange-glow: rgba(255, 106, 42, 0.45);
  --qd-sms-blue: #00B4D8;
  --qd-sms-green: #25D366;
  --qd-sms-border: #E8EDF3;
  --qd-sms-tx-title: #0F2034;
  --qd-sms-tx-desc: #64748B;
  --qd-sms-radius-lg: 24px;
  --qd-sms-radius-md: 16px;
  --qd-sms-radius-sm: 10px;
}

/* ── Full-Width Section Environment (Clean White SaaS Theme) ───────── */
#sms-campaign-simulator.qd-sms-section {
  width: 100% !important;
  max-width: 100% !important;
  background: radial-gradient(circle at 60% 30%, rgba(255, 106, 42, 0.05) 0%, transparent 60%),
              radial-gradient(circle at 20% 70%, rgba(0, 180, 216, 0.04) 0%, transparent 50%),
              linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%) !important;
  padding: 76px 3% 84px !important;
  position: relative !important;
  overflow: hidden !important;
  color: var(--qd-sms-tx-title) !important;
  box-sizing: border-box !important;
  border-top: 1px solid #E8EDF3 !important;
  border-bottom: 1px solid #E8EDF3 !important;
}

.qd-sms-container {
  max-width: 1420px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ── Master 3-Column Simulator Grid ───────────────────────────────────
   In Arabic RTL: Col 1 = Sales Content (Right), Col 2 = Engine (Mid), Col 3 = Phone (Left)
   In English LTR: Col 1 = Phone (Left), Col 2 = Engine (Mid), Col 3 = Sales Content (Right)
   ──────────────────────────────────────────────────────────────────── */
body.ar .qd-sms-main-grid {
  display: grid;
  grid-template-columns: 420px 1fr 310px;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}

body.en .qd-sms-main-grid {
  display: grid;
  grid-template-columns: 310px 1fr 420px;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}

/* ── 1. SALES CONTENT & 4-STEP MINI PROCESS (SCREEN RIGHT IN RTL) ──── */
.qd-sms-content-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: start;
}

.qd-sms-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 106, 42, 0.12);
  border: 1px solid rgba(255, 106, 42, 0.35);
  color: var(--qd-sms-orange);
  font-size: 12.5px;
  font-weight: 850;
  padding: 5px 16px;
  border-radius: 24px;
  width: fit-content;
}

.qd-sms-title {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 900;
  color: #0F2034;
  margin: 0;
  line-height: 1.28;
}

.qd-sms-title .hl-orange {
  color: var(--qd-sms-orange);
}

.qd-sms-desc {
  font-size: 14.5px;
  color: #64748B;
  line-height: 1.75;
  margin: 0;
}

/* 4-Step Process Bar with Colored Accents */
.qd-sms-steps-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #FFFFFF;
  border: 1.5px solid #E8EDF3;
  border-radius: 16px;
  padding: 14px 10px;
  box-shadow: 0 4px 16px rgba(15, 32, 52, 0.04);
  margin: 4px 0;
}

.qd-sms-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.qd-sms-step-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-bottom: 6px;
  transition: all 0.25s ease;
}

.qd-sms-step-icon.step-blue {
  background: rgba(0, 180, 216, 0.12);
  border: 1.5px solid #00B4D8;
  color: #00B4D8;
}

.qd-sms-step-icon.step-orange {
  background: rgba(255, 106, 42, 0.12);
  border: 1.5px solid #FF6A2A;
  color: #FF6A2A;
}

.qd-sms-step-icon.step-green {
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid #10B981;
  color: #10B981;
}

.qd-sms-step-icon.step-navy {
  background: rgba(15, 32, 52, 0.1);
  border: 1.5px solid #0F2034;
  color: #0F2034;
}

.qd-sms-step-item:hover .qd-sms-step-icon {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(255, 106, 42, 0.35);
}

.qd-sms-step-title {
  font-size: 11.5px;
  font-weight: 850;
  color: #0F2034;
  line-height: 1.2;
}

.qd-sms-step-sub {
  font-size: 9px;
  color: #94A3B8;
  line-height: 1.2;
  margin-top: 2px;
}

/* Action CTA Buttons */
.qd-sms-actions-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.qd-sms-cta-primary {
  background: linear-gradient(135deg, #FF6A2A 0%, #E05C2A 100%);
  color: #FFFFFF !important;
  font-size: 14.5px;
  font-weight: 850;
  padding: 13px 26px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(255, 106, 42, 0.35);
  transition: all 0.25s ease;
}

.qd-sms-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 106, 42, 0.5);
}

.qd-sms-cta-whatsapp {
  background: #25D366;
  color: #FFFFFF !important;
  font-size: 14.5px;
  font-weight: 850;
  padding: 13px 24px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
  transition: all 0.25s ease;
}

.qd-sms-cta-whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-2px);
}

.qd-sms-trust-micro {
  font-size: 11.5px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── 2. SCREEN MID: Q-DASH TRANSMISSION ENGINE & QATAR TARGETING ──── */
.qd-sms-engine-canvas {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1.5px solid #E8EDF3;
  border-radius: var(--qd-sms-radius-lg);
  padding: 26px 20px;
  box-shadow: 0 10px 30px rgba(15, 32, 52, 0.04);
  min-height: 420px;
  overflow: hidden;
}

.qd-sms-engine-badge {
  position: absolute;
  top: 14px;
  inset-inline-end: 20px;
  background: rgba(15, 32, 52, 0.05);
  border: 1px solid rgba(15, 32, 52, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 800;
  color: #0F2034;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Central Transmission Node */
.qd-sms-node-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 4;
}

.qd-sms-node-prompt {
  font-size: 11px;
  font-weight: 850;
  color: var(--qd-sms-orange);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.qd-sms-transmission-core {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F2034 0%, #08101C 100%);
  border: 2px solid var(--qd-sms-orange);
  box-shadow: 0 0 26px rgba(255, 106, 42, 0.35), inset 0 0 15px rgba(255, 106, 42, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qd-sms-core-ring-spin {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 106, 42, 0.65);
  animation: qdSMSRingSpin 14s linear infinite !important;
  pointer-events: none;
}

.qd-sms-core-ring-outer {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 180, 216, 0.45);
  border-left-color: transparent;
  border-right-color: transparent;
  animation: qdSMSRingSpinRev 18s linear infinite !important;
  pointer-events: none;
}

.qd-sms-core-logo {
  font-size: 11px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 1px;
}

/* Qatar Vector Map */
.qd-sms-map-wrap {
  position: relative;
  width: 130px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.qd-sms-qatar-map-svg {
  width: 100%;
  height: 100%;
}

/* SVG Transmission Routes */
.qd-sms-routes-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.qd-sms-route-path {
  stroke: rgba(255, 106, 42, 0.35);
  stroke-width: 1.8;
  stroke-dasharray: 4 4;
  fill: none;
}

.qd-sms-route-path.active {
  stroke: #FF6A2A;
  stroke-width: 2.2;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px #FF6A2A);
}

.qd-sms-route-pulse {
  fill: #FF6A2A;
  filter: drop-shadow(0 0 6px #FF874D);
}

/* 4 Location Delivery Cards with Distinct Backgrounds */
.qd-sms-locations-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 4;
}

.qd-sms-loc-card {
  background: #FFFFFF;
  border: 1.5px solid #E8EDF3;
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(15, 32, 52, 0.04);
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 145px;
  text-align: start;
  font-family: inherit;
}

.qd-sms-loc-card:hover,
.qd-sms-loc-card.is-active {
  border-color: var(--qd-sms-orange);
  box-shadow: 0 6px 18px rgba(255, 106, 42, 0.2);
  transform: scale(1.02);
}

.qd-sms-loc-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.qd-sms-loc-thumb.loc-doha { background: rgba(0, 180, 216, 0.12); border: 1.5px solid #00B4D8; color: #00B4D8; }
.qd-sms-loc-thumb.loc-rayyan { background: rgba(15, 32, 52, 0.1); border: 1.5px solid #0F2034; color: #0F2034; }
.qd-sms-loc-thumb.loc-wakra { background: rgba(56, 189, 248, 0.12); border: 1.5px solid #38BDF8; color: #0284C7; }
.qd-sms-loc-thumb.loc-khor { background: rgba(255, 106, 42, 0.12); border: 1.5px solid #FF6A2A; color: #FF6A2A; }

.qd-sms-loc-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.qd-sms-loc-name {
  font-size: 12.5px;
  font-weight: 850;
  color: #0F2034;
}

.qd-sms-loc-status {
  font-size: 9.5px;
  font-weight: 800;
  color: #10B981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qd-sms-loc-status.orange {
  color: var(--qd-sms-orange);
}

/* Floating Delivery Rate Widget */
.qd-sms-delivery-rate-widget {
  position: absolute;
  bottom: 16px;
  inset-inline-start: 20px;
  background: #FFFFFF;
  border: 1.5px solid #E8EDF3;
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 6px 20px rgba(15, 32, 52, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.qd-sms-rate-val {
  font-size: 18px;
  font-weight: 900;
  color: #10B981;
}

.qd-sms-rate-sparkline {
  width: 60px;
  height: 20px;
}

/* ── 3. SMARTPHONE LIVE SMS PREVIEW (SCREEN LEFT IN RTL) ────────────── */
.qd-sms-phone-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}

.qd-sms-phone-frame {
  width: 290px;
  background: #0B132B;
  border: 7px solid #1A2744;
  border-radius: 36px;
  padding: 12px 14px 18px;
  box-shadow: 0 20px 50px rgba(11, 19, 43, 0.18), 0 0 0 1px rgba(0, 180, 216, 0.2);
  display: flex;
  flex-direction: column;
  color: #FFFFFF;
  position: relative;
}

.qd-sms-phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 800;
  color: #94A3B8;
  padding: 0 6px 8px;
}

.qd-sms-phone-notch {
  width: 70px;
  height: 12px;
  background: #1A2744;
  border-radius: 0 0 10px 10px;
  margin: -12px auto 6px;
}

.qd-sms-phone-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.qd-sms-phone-brand {
  font-size: 13px;
  font-weight: 900;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qd-sms-phone-subtext {
  font-size: 9px;
  color: #64748B;
  text-align: center;
  margin-bottom: 12px;
}

.qd-sms-bubble {
  background: #FFFFFF;
  color: #0F2034;
  border-radius: 16px 16px 4px 16px;
  padding: 14px 14px 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  margin-bottom: 16px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.qd-sms-bubble-hl {
  font-size: 12.5px;
  font-weight: 900;
  color: #E11D48;
  margin-bottom: 4px;
}

.qd-sms-bubble-txt {
  font-size: 11.5px;
  line-height: 1.5;
  color: #1E293B;
  margin-bottom: 6px;
}

.qd-sms-bubble-time {
  font-size: 8.5px;
  color: #94A3B8;
  text-align: start;
}

.qd-sms-phone-metrics {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.qd-sms-phone-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.qd-sms-phone-metric-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
}

.qd-sms-phone-metric-val {
  font-weight: 900;
  color: #FFFFFF;
}

.qd-sms-phone-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 6px 10px;
}

.qd-sms-phone-input-txt {
  flex: 1;
  font-size: 10px;
  color: #64748B;
  text-align: start;
}

.qd-sms-phone-send-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #00B4D8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #FFFFFF;
}

/* ── 4. BOTTOM 5-METRIC ANALYTICS CONSOLE (INDIVIDUAL ELEVATED CARDS) ── */
.qd-sms-analytics-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.qd-sms-metric-item {
  border-radius: var(--qd-sms-radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 6px 20px rgba(15, 32, 52, 0.04);
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
}

.qd-sms-metric-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(15, 32, 52, 0.08);
}

/* 5 Distinct Identity Backgrounds */
.qd-sms-metric-item.card-blue {
  background: linear-gradient(180deg, #F0F9FF 0%, #FFFFFF 100%);
  border-color: rgba(0, 180, 216, 0.25);
}

.qd-sms-metric-item.card-green {
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
  border-color: rgba(16, 185, 129, 0.25);
}

.qd-sms-metric-item.card-orange {
  background: linear-gradient(180deg, #FFF7ED 0%, #FFFFFF 100%);
  border-color: rgba(255, 106, 42, 0.25);
}

.qd-sms-metric-item.card-purple {
  background: linear-gradient(180deg, #FAF5FF 0%, #FFFFFF 100%);
  border-color: rgba(139, 92, 246, 0.25);
}

.qd-sms-metric-item.card-amber {
  background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 100%);
  border-color: rgba(245, 158, 11, 0.25);
}

.qd-sms-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.qd-sms-metric-icon.blue { background: rgba(0, 180, 216, 0.15); color: #00B4D8; }
.qd-sms-metric-icon.green { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.qd-sms-metric-icon.orange { background: rgba(255, 106, 42, 0.15); color: #FF6A2A; }
.qd-sms-metric-icon.purple { background: rgba(139, 92, 246, 0.15); color: #8B5CF6; }
.qd-sms-metric-icon.amber { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

.qd-sms-metric-info {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.qd-sms-metric-hd {
  font-size: 11px;
  color: #64748B;
  margin-bottom: 2px;
}

.qd-sms-metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.qd-sms-metric-val {
  font-size: 18px;
  font-weight: 900;
  color: #0F2034;
}

.qd-sms-metric-pct {
  font-size: 10.5px;
  font-weight: 800;
}

.qd-sms-metric-sparkline {
  width: 100%;
  height: 18px;
}

/* ── Keyframe Animations ───────────────────────────────────────────── */
@keyframes qdSMSRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes qdSMSRingSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* ── Responsive Adaptations ────────────────────────────────────────── */
@media (max-width: 1280px) {
  body.ar .qd-sms-main-grid,
  body.en .qd-sms-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .qd-sms-content-col {
    grid-column: 1 / -1;
    order: 1;
  }
  .qd-sms-engine-canvas {
    order: 2;
    grid-column: 1 / -1;
  }
  .qd-sms-phone-wrap {
    order: 3;
    grid-column: 1 / -1;
  }
  .qd-sms-analytics-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #sms-campaign-simulator.qd-sms-section {
    padding: 48px 4% 56px !important;
  }
  body.ar .qd-sms-main-grid,
  body.en .qd-sms-main-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .qd-sms-steps-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .qd-sms-engine-canvas {
    flex-direction: column;
    gap: 20px;
    padding: 20px 14px;
  }
  .qd-sms-analytics-bar {
    grid-template-columns: 1fr;
  }
  .qd-sms-actions-wrap {
    flex-direction: column;
    width: 100%;
  }
  .qd-sms-cta-primary,
  .qd-sms-cta-whatsapp {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qd-sms-core-ring-spin,
  .qd-sms-core-ring-outer,
  .qd-sms-bubble {
    animation: none !important;
    transition: none !important;
  }
}
