/* ==========================================================================
   AI Auto Call demo — interactive phone IVR
   Mount point: #autocall-demo (inside .dd-visual)
   All classes prefixed with acx- to avoid collisions.
   ========================================================================== */

#autocall-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
}

.acx-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 22px;
  align-items: stretch;
}

/* ---------- Phone shell -------------------------------------------------- */
.acx-phone {
  position: relative;
  width: 270px;
  height: 540px;
  border-radius: 38px;
  background: linear-gradient(165deg, #1A1A2E 0%, #2A2877 100%);
  padding: 10px;
  box-shadow:
    0 30px 60px -20px rgba(20, 20, 50, 0.45),
    0 12px 24px -8px rgba(42, 40, 119, 0.3),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.06);
}
.acx-phone::before {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #0A0A18;
  border-radius: 999px;
  z-index: 30;
}
.acx-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: #FAFBFD;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Status bar */
.acx-status {
  flex: 0 0 auto;
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.acx-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.acx-status-icons [data-lucide] { width: 12px; height: 12px; }

/* ---------- Generic scene container ------------------------------------- */
.acx-scene {
  position: absolute;
  inset: 44px 0 0 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}
.acx-scene.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Scene: Incoming call ---------------------------------------- */
.acx-scene-incoming {
  background: linear-gradient(180deg, #221F66 0%, #2A2877 60%, #1A1A2E 100%);
  color: #fff;
  align-items: center;
  padding: 36px 0 28px;
  text-align: center;
}
.acx-incoming-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}
.acx-incoming-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.acx-incoming-sub {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.acx-avatar-ring {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 28px auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #FF9F4F);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  box-shadow: 0 12px 32px -8px rgba(255,129,35,0.6);
}
.acx-avatar-ring::before,
.acx-avatar-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,129,35,0.45);
  animation: acx-ring 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.acx-avatar-ring::after { animation-delay: .9s; }
@keyframes acx-ring {
  0%   { transform: scale(1);   opacity: .9; }
  100% { transform: scale(1.6); opacity: 0; }
}
.acx-incoming-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  width: 100%;
  padding: 0 28px 8px;
}
.acx-call-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.5);
  transition: transform .15s ease;
}
.acx-call-btn:hover { transform: scale(1.06); }
.acx-call-btn [data-lucide] { width: 24px; height: 24px; }
.acx-call-btn.decline { background: #EF4444; }
.acx-call-btn.accept  { background: #10B981; }
.acx-call-btn.accept.pulse {
  animation: acx-pulse-green 1.4s ease-in-out infinite;
}
@keyframes acx-pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.55), 0 10px 24px -8px rgba(0,0,0,0.5); }
  50%      { box-shadow: 0 0 0 14px rgba(16,185,129,0), 0 10px 24px -8px rgba(0,0,0,0.5); }
}
.acx-call-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

/* ---------- Scene: In call (IVR) ---------------------------------------- */
.acx-scene-call {
  background: linear-gradient(180deg, #FAFBFD 0%, #F0F1F7 100%);
  padding: 18px 18px 14px;
}
.acx-callbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.acx-callbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #FF9F4F);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.acx-callbar-text { flex: 1; min-width: 0; }
.acx-callbar-name {
  font-size: 12px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.acx-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
  animation: acx-livedot 1.4s ease-in-out infinite;
}
@keyframes acx-livedot {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(0.8); opacity: 0.65; }
}
.acx-callbar-sub {
  font-size: 10.5px; color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Order chip */
.acx-orderchip {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.acx-orderchip-label {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9.5px;
}
.acx-orderchip-id {
  font-weight: 700;
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
}
.acx-orderchip-price {
  color: var(--orange);
  font-weight: 800;
  font-size: 11.5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* IVR caption */
.acx-caption {
  margin-top: 12px;
  background: linear-gradient(135deg, #2A2877 0%, #221F66 100%);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px 12px;
  font-size: 11px;
  line-height: 1.5;
  position: relative;
  min-height: 56px;
}
.acx-caption-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
}
.acx-caption-head [data-lucide] { width: 11px; height: 11px; }
.acx-caption-text {
  font-weight: 600;
  color: #fff;
}
.acx-caption-text .acx-cursor {
  display: inline-block;
  width: 1px;
  background: #fff;
  height: 0.95em;
  vertical-align: -2px;
  margin-left: 1px;
  animation: acx-blink 0.9s steps(2) infinite;
}
@keyframes acx-blink { 50% { opacity: 0; } }

/* Waveform */
.acx-wave {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
}
.acx-wave-bar {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--orange), #FF9F4F);
  height: 6px;
}
.acx-wave.active .acx-wave-bar {
  animation: acx-wave 1s ease-in-out infinite;
}
.acx-wave .acx-wave-bar:nth-child(1) { animation-delay: -0.0s; }
.acx-wave .acx-wave-bar:nth-child(2) { animation-delay: -0.1s; }
.acx-wave .acx-wave-bar:nth-child(3) { animation-delay: -0.2s; }
.acx-wave .acx-wave-bar:nth-child(4) { animation-delay: -0.3s; }
.acx-wave .acx-wave-bar:nth-child(5) { animation-delay: -0.4s; }
.acx-wave .acx-wave-bar:nth-child(6) { animation-delay: -0.5s; }
.acx-wave .acx-wave-bar:nth-child(7) { animation-delay: -0.6s; }
.acx-wave .acx-wave-bar:nth-child(8) { animation-delay: -0.7s; }
.acx-wave .acx-wave-bar:nth-child(9) { animation-delay: -0.8s; }
.acx-wave .acx-wave-bar:nth-child(10){ animation-delay: -0.9s; }
.acx-wave .acx-wave-bar:nth-child(11){ animation-delay: -1.0s; }
.acx-wave .acx-wave-bar:nth-child(12){ animation-delay: -1.1s; }
@keyframes acx-wave {
  0%, 100% { height: 6px; opacity: 0.55; }
  50%      { height: 22px; opacity: 1; }
}

/* Keypad */
.acx-keypad {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.acx-key {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 4px 7px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
  user-select: none;
}
.acx-key:hover:not(:disabled) {
  border-color: var(--navy);
  box-shadow: 0 4px 14px -6px rgba(42,40,119,0.4);
}
.acx-key:disabled { opacity: 0.5; cursor: default; }
.acx-key-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.acx-key-sub {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
  text-transform: uppercase;
}
.acx-key.highlight {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,129,35,0.18);
  animation: acx-keyhint 1.4s ease-in-out infinite;
}
@keyframes acx-keyhint {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
.acx-key.pressed {
  background: var(--navy);
  border-color: var(--navy);
  transform: scale(0.95);
}
.acx-key.pressed .acx-key-num,
.acx-key.pressed .acx-key-sub { color: #fff; }

/* Hint strip */
.acx-hint {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  height: 14px;
}
.acx-hint .acx-hint-strong { color: var(--navy); font-weight: 700; }

/* ---------- Scene: Result ----------------------------------------------- */
.acx-scene-result {
  background: #fff;
  padding: 22px 18px 18px;
  align-items: center;
  text-align: center;
}
.acx-result-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 18px auto 14px;
  color: #fff;
  position: relative;
}
.acx-result-icon [data-lucide] { width: 32px; height: 32px; }
.acx-result-icon.confirmed { background: var(--green); box-shadow: 0 12px 28px -8px rgba(16,185,129,0.5); }
.acx-result-icon.support   { background: var(--navy);  box-shadow: 0 12px 28px -8px rgba(42,40,119,0.5); }
.acx-result-icon.cancelled { background: var(--red);   box-shadow: 0 12px 28px -8px rgba(239,68,68,0.5); }
.acx-result-icon::after {
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.18;
}
.acx-result-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.acx-result-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 0 8px;
}
.acx-result-stats {
  margin-top: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 0 0;
}
.acx-result-stat {
  background: #FAFBFD;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  text-align: left;
}
.acx-result-stat-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.acx-result-stat-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  margin-top: 1px;
}
.acx-result-stat-value.green { color: var(--green); }

/* ---------- Side panel (timeline + scene chooser) ----------------------- */
.acx-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acx-side-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.acx-scenarios {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acx-scenario {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.acx-scenario:hover { border-color: var(--navy); }
.acx-scenario.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,129,35,0.15);
}
.acx-scenario-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--orange-50);
  color: var(--orange);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.acx-scenario-icon [data-lucide] { width: 14px; height: 14px; }
.acx-scenario-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.acx-scenario-sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

/* Timeline */
.acx-timeline {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.acx-tl-head {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.acx-tl-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-2);
  opacity: 0.4;
  transition: opacity .3s ease;
  line-height: 1.4;
}
.acx-tl-row.active { opacity: 1; color: var(--ink); font-weight: 600; }
.acx-tl-row.done   { opacity: 0.85; }
.acx-tl-bullet {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 2px;
  display: grid; place-items: center;
  color: #fff;
  position: relative;
}
.acx-tl-bullet [data-lucide] {
  width: 9px; height: 9px;
  opacity: 0;
  transition: opacity .2s ease;
}
.acx-tl-row.active .acx-tl-bullet { background: var(--orange); }
.acx-tl-row.active .acx-tl-bullet::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  animation: acx-tl-pulse 1.4s ease-out infinite;
}
@keyframes acx-tl-pulse {
  0%   { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
.acx-tl-row.done .acx-tl-bullet { background: var(--green); }
.acx-tl-row.done .acx-tl-bullet [data-lucide] { opacity: 1; }

/* Bangla/English bilingual timeline rows */
.acx-tl-row .acx-tl-bn {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.acx-tl-row:not(.active):not(.done) .acx-tl-bn { color: var(--ink-2); }
.acx-tl-row .acx-tl-en {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 1px;
  font-weight: 500;
}

/* Free-trial CTA chip */
.acx-trial {
  background: linear-gradient(135deg, #FFF3E8, #fff);
  border: 1px solid rgba(255,129,35,0.35);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px -6px rgba(255,129,35,0.25);
}
.acx-trial-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.acx-trial-icon [data-lucide] { width: 16px; height: 16px; }
.acx-trial-text {
  display: flex;
  flex-direction: column;
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.35;
}
.acx-trial-text strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 1px;
}

/* Savings note */
.acx-savings {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.45;
  padding: 0 2px;
}
.acx-savings [data-lucide] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--navy);
  opacity: 0.65;
}
.acx-savings strong { color: var(--ink-2); font-weight: 800; }

/* Replay */
.acx-replay {
  position: absolute;
  top: 0;
  right: 0;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 20px -8px rgba(42,40,119,0.3), 0 2px 6px rgba(20,20,50,0.06);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: all .35s cubic-bezier(.3,1.4,.5,1);
  cursor: pointer;
  font-family: inherit;
  z-index: 5;
}
.acx-replay.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.acx-replay:hover { border-color: var(--navy); }
.acx-replay [data-lucide] { width: 12px; height: 12px; }

/* Fineprint shared with .dd-text */
.dd-text p.dd-fineprint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.5;
}

/* Mobile */
@media (max-width: 720px) {
  .acx-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 320px;
  }
  .acx-phone { margin: 0 auto; }
  .acx-side { order: 2; }
}
