/* ============================================================
   Ideal AI — Live Call Demo (showpiece)
   A playable "watch Chloe answer a live call" experience.
   Dark · brand blue (#188bf6) · Canvas waveform · typed transcript.
   $0 runtime — pure client-side simulation, no API/network calls.
   ============================================================ */

.livecall{position:relative;margin:34px auto 0;max-width:560px;width:100%;z-index:2}

/* ---- the device / call card ---- */
.lc-card{position:relative;border-radius:30px;overflow:hidden;
  background:linear-gradient(180deg,#0e1118 0%,#0a0c11 100%);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 40px 110px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.02),
    inset 0 1px 0 rgba(255,255,255,.05);
  transition:box-shadow .6s var(--ease),border-color .6s var(--ease)}
/* when connected, the card breathes brand-blue */
.livecall.connected .lc-card{border-color:rgba(0,210,255,.5);
  box-shadow:0 40px 110px rgba(0,0,0,.6),0 0 70px rgba(0,210,255,.22),
    0 0 0 1px rgba(0,210,255,.25),inset 0 1px 0 rgba(255,255,255,.06)}
.livecall.resolved .lc-card{border-color:rgba(46,230,166,.4);
  box-shadow:0 40px 110px rgba(0,0,0,.6),0 0 60px rgba(46,230,166,.14),
    inset 0 1px 0 rgba(255,255,255,.05)}

/* top accent hairline */
.lc-card::before{content:"";position:absolute;top:0;left:0;right:0;height:1px;z-index:6;
  background:linear-gradient(90deg,transparent,rgba(0,210,255,.7),transparent);
  opacity:0;transition:opacity .6s}
.livecall.connected .lc-card::before{opacity:1}

/* ---- call header (caller id / status) ---- */
.lc-head{position:relative;z-index:5;display:flex;align-items:center;gap:14px;
  padding:20px 22px;border-bottom:1px solid var(--line)}
.lc-avatar{position:relative;flex:none;width:50px;height:50px;border-radius:50%;
  display:grid;place-items:center;
  background:radial-gradient(circle at 35% 30%,#33dbff,var(--blue-deep));
  box-shadow:0 0 0 1px rgba(255,255,255,.08),0 8px 24px rgba(0,210,255,.3)}
.lc-avatar img{width:26px;height:26px;object-fit:contain;filter:brightness(0) invert(1)}
/* ring pulse around avatar while ringing */
.lc-avatar::after{content:"";position:absolute;inset:-6px;border-radius:50%;
  border:2px solid rgba(0,210,255,.6);opacity:0}
.livecall.ringing .lc-avatar::after{animation:lcRing 1.4s var(--ease) infinite}
@keyframes lcRing{0%{opacity:.8;transform:scale(1)}100%{opacity:0;transform:scale(1.55)}}

.lc-id{flex:1;min-width:0}
.lc-name{font-family:var(--disp);font-weight:600;font-size:1.06rem;color:#fff;
  letter-spacing:-.01em;line-height:1.2;display:flex;align-items:center;gap:8px}
.lc-sub{font-family:var(--mono);font-size:.76rem;color:var(--muted);margin-top:3px;
  display:flex;align-items:center;gap:7px;flex-wrap:wrap}
/* live status dot */
.lc-dot{width:7px;height:7px;border-radius:50%;background:var(--muted);flex:none;
  transition:background .4s,box-shadow .4s}
.livecall.connected .lc-dot{background:var(--green);box-shadow:0 0 0 3px rgba(46,230,166,.18);
  animation:lcLive 1.8s ease-in-out infinite}
.livecall.ringing .lc-dot{background:var(--blue-2);box-shadow:0 0 0 3px rgba(0,210,255,.2)}
@keyframes lcLive{0%,100%{opacity:1}50%{opacity:.4}}
.lc-timer{font-family:var(--mono);font-size:.76rem;color:var(--ink-2);
  font-variant-numeric:tabular-nums;margin-left:auto;flex:none}

/* tiny "speaking" label that swaps color by speaker */
.lc-speaker{font-family:var(--mono);font-size:.7rem;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted);transition:color .3s}
.lc-speaker[data-who="caller"]{color:#ffc48a}
.lc-speaker[data-who="chloe"]{color:var(--blue-2)}

/* ---- waveform stage ---- */
.lc-stage{position:relative;height:132px;background:
  radial-gradient(120% 90% at 50% 120%,rgba(0,210,255,.12),transparent 60%);
  border-bottom:1px solid var(--line);overflow:hidden}
.lc-wave{position:absolute;inset:0;width:100%;height:100%;display:block}
/* idle prompt shown before play */
.lc-idle{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:16px;text-align:center;padding:0 24px;z-index:3;
  transition:opacity .5s var(--ease)}
.livecall.playing .lc-idle,.livecall.connected .lc-idle{opacity:0;pointer-events:none}
.lc-incoming{font-family:var(--mono);font-size:.78rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--blue-2);display:flex;align-items:center;gap:9px}
.lc-incoming::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--blue);
  box-shadow:0 0 0 4px rgba(0,210,255,.2);animation:lcBlink 1.2s ease-in-out infinite}
@keyframes lcBlink{0%,100%{opacity:1}50%{opacity:.3}}

/* ---- transcript ---- */
.lc-script{position:relative;z-index:2;padding:18px 22px 4px;min-height:128px;
  display:flex;flex-direction:column;gap:12px}
.lc-line{display:flex;gap:11px;align-items:flex-start;opacity:0;transform:translateY(8px);
  transition:opacity .5s var(--ease),transform .5s var(--ease)}
.lc-line.show{opacity:1;transform:none}
.lc-tag{flex:none;font-family:var(--mono);font-size:.64rem;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;padding:4px 8px;border-radius:7px;margin-top:2px;line-height:1;
  white-space:nowrap}
.lc-line.caller .lc-tag{background:rgba(255,170,90,.12);color:#ffc48a;border:1px solid rgba(255,170,90,.25)}
.lc-line.chloe .lc-tag{background:rgba(0,210,255,.14);color:var(--blue-2);border:1px solid rgba(0,210,255,.3)}
.lc-text{font-size:1rem;line-height:1.55;color:var(--ink-2)}
.lc-line.caller .lc-text{color:#dfe5ee}
.lc-line.chloe .lc-text{color:#eef6ff}
/* blinking type caret */
.lc-caret{display:inline-block;width:2px;height:1.05em;background:var(--blue-2);
  margin-left:2px;vertical-align:-2px;animation:lcCaret .9s step-end infinite}
@keyframes lcCaret{50%{opacity:0}}

/* ---- action chips (Chloe's tools) ---- */
.lc-actions{display:flex;flex-wrap:wrap;gap:8px;padding:6px 22px 0}
.lc-chip{display:inline-flex;align-items:center;gap:8px;font-family:var(--mono);font-size:.74rem;
  font-weight:500;color:var(--blue-2);background:rgba(0,210,255,.1);
  border:1px solid rgba(0,210,255,.28);border-radius:9px;padding:7px 11px;white-space:nowrap;
  opacity:0;transform:translateY(8px) scale(.96);
  transition:opacity .4s var(--ease),transform .4s var(--ease)}
.lc-chip.show{opacity:1;transform:none}
.lc-chip .ck{display:grid;place-items:center;width:15px;height:15px;border-radius:50%;
  background:var(--green);color:#062a1d;font-size:.62rem;font-weight:800;flex:none;
  transform:scale(0);transition:transform .35s var(--ease) .12s}
.lc-chip.show .ck{transform:scale(1)}

/* ---- resolution banner ---- */
.lc-resolved{display:flex;align-items:center;gap:12px;margin:14px 22px 0;padding:13px 16px;
  border-radius:14px;background:rgba(46,230,166,.08);border:1px solid rgba(46,230,166,.28);
  opacity:0;transform:translateY(8px);transition:opacity .5s var(--ease),transform .5s var(--ease)}
.lc-resolved.show{opacity:1;transform:none}
.lc-resolved .ic{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;
  background:var(--green);color:#062a1d;font-weight:800;font-size:.85rem}
.lc-resolved .txt{font-size:.92rem;color:#cdeede;line-height:1.4}
.lc-resolved .txt b{color:#fff;font-weight:600}

/* ---- footer controls ---- */
.lc-foot{display:flex;align-items:center;gap:12px;padding:18px 22px 22px;flex-wrap:wrap}
.lc-play{flex:1;min-width:160px;justify-content:center}
.lc-play .ico{width:0;height:0;border-style:solid;border-width:7px 0 7px 12px;
  border-color:transparent transparent transparent #fff;margin-right:2px}
.lc-replay{display:none}
.livecall.resolved .lc-play{display:none}
.livecall.resolved .lc-replay{display:inline-flex}
.lc-foot .lc-book{margin-left:auto}
/* sound toggle — subtle, off by default */
.lc-sound{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;
  background:rgba(255,255,255,.04);border:1px solid var(--line-2);color:var(--muted);
  cursor:pointer;transition:color .2s,border-color .2s,background .2s}
.lc-sound:hover{color:var(--ink-2);border-color:var(--line-2)}
.lc-sound.on{color:var(--blue-2);border-color:rgba(0,210,255,.5);background:rgba(0,210,255,.08)}
.lc-sound svg{width:18px;height:18px}
.lc-sound .muted-x{display:block}.lc-sound.on .muted-x{display:none}
.lc-sound .on-wave{display:none}.lc-sound.on .on-wave{display:block}

/* progress hairline under the card while a call plays */
.lc-progress{position:absolute;left:0;bottom:0;height:2px;width:0;z-index:7;
  background:linear-gradient(90deg,var(--blue),var(--blue-2));
  box-shadow:0 0 10px rgba(0,210,255,.6);transition:width .25s linear;border-radius:2px}

/* caption under the card */
.lc-caption{text-align:center;margin:18px auto 0;max-width:46ch;font-size:.92rem;color:var(--muted)}
.lc-caption b{color:var(--ink-2);font-weight:600}

/* ---- responsive ---- */
@media(max-width:560px){
  .livecall{max-width:100%}
  .lc-card{border-radius:24px}
  .lc-head{padding:16px 16px}
  .lc-avatar{width:44px;height:44px}
  .lc-stage{height:110px}
  .lc-script{padding:16px 16px 4px;min-height:120px}
  .lc-text{font-size:.95rem}
  .lc-actions{padding:6px 16px 0}
  .lc-resolved{margin:12px 16px 0}
  .lc-foot{padding:16px 16px 18px}
  .lc-foot .lc-book{margin-left:0;width:100%;justify-content:center}
  .lc-play{flex:1 1 auto}
}

/* ---- reduced motion: static, readable version ---- */
@media(prefers-reduced-motion:reduce){
  .lc-wave{display:none}
  .lc-idle{position:static;opacity:1;height:auto;padding:22px 22px;flex-direction:row;
    flex-wrap:wrap;justify-content:center}
  .lc-stage{height:auto;min-height:0}
  .lc-line{opacity:1;transform:none;transition:none}
  .lc-chip{opacity:1;transform:none;transition:none}
  .lc-chip .ck{transform:scale(1)}
  .lc-resolved{opacity:1;transform:none;transition:none}
  .lc-caret{display:none}
  .lc-avatar::after,.lc-dot{animation:none}
  .lc-incoming::before{animation:none}
}
