/* ==========================================================================
   Wize AI Agent page: "Your AI agent can now pick up the phone." (dark section).
   Simulated call widget (styled like the homepage chat widget).
   Markup: template-parts/rc-v4-wize-ai-agent/voice.php. Behaviour: js/rc-v4-wize-ai-agent/voice.js.
   ========================================================================== */

/* ---------- two columns (V4 79dae6a): title, description, call cards + button | the call widget ---------- */
.rc-wize-voice .rc-wize-voice-split {
  --rc-wize-vo-w: 436px; /* the call cards share the description's width */
  display: grid; grid-template-columns: minmax(0, var(--rc-wize-vo-w)) 400px; justify-content: center; align-items: center; gap: 64px;
}
.rc-wize-voice .rc-wize-voice-copy { gap: 20px; }
.rc-wize-voice .rc-wize-voice-copy .rc-section-title {
  max-width: 15ch; margin: 0; font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: #fff; text-wrap: balance;
}
.rc-wize-voice .rc-wize-voice-copy .rc-section-title em { font-size: 1.08em; font-weight: 400; color: #b79cff; }
.rc-wize-voice .rc-wize-voice-copy .rc-section-subtitle {
  max-width: var(--rc-wize-vo-w); margin: 0; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.72); text-wrap: pretty;
}
.rc-wize-voice .rc-wize-voice-copy .rc-wize-voice-tabs { width: 100%; max-width: var(--rc-wize-vo-w); }
.rc-wize-voice .rc-wize-voice-tabs { display: grid; gap: 10px; }
.rc-wize-voice .rc-wize-voice-tabs button {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px; background: rgba(255, 255, 255, 0.04);
  font-family: var(--rc-font); font-size: 16px; line-height: 1.55; color: #fff; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.rc-wize-voice .rc-wize-voice-tabs button:hover { background: rgba(255, 255, 255, 0.08); }
.rc-wize-voice .rc-wize-voice-tabs button.is-on { border-color: #9b7dff; background: rgba(155, 125, 255, 0.14); }
.rc-wize-voice .rc-wize-voice-tabs b { display: block; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.rc-wize-voice .rc-wize-voice-tabs small {
  display: block; margin-top: 3px; font-family: var(--rc-font-label); font-size: 11px; line-height: 1.55;
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55);
}
.rc-wize-voice .rc-wize-voice-tab-icon {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.08); color: #cdbcff;
}
.rc-wize-voice .rc-wize-voice-tabs .is-on .rc-wize-voice-tab-icon { background: #6d4fe0; color: #fff; }

/* the call widget */
.rc-wize-voice .rc-wize-call {
  display: flex; flex-direction: column; height: 500px; padding: 14px; border-radius: 26px;
  background: #fff; color: var(--rc-ink); border: 2px solid #cfc6fb;
  box-shadow: 0 0 0 6px rgba(155, 125, 255, 0.14), 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.rc-wize-voice .rc-wize-call-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
.rc-wize-voice .rc-wize-call-logo { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: #efeaff; color: var(--rc-wize-violet); }
.rc-wize-voice .rc-wize-call-title { flex: 1; min-width: 0; }
.rc-wize-voice .rc-wize-call-title b { display: block; font-size: 15px; font-weight: 500; line-height: 1.55; }
.rc-wize-voice .rc-wize-call-title small { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-family: var(--rc-font); font-size: 12px; line-height: 1.55; color: var(--rc-wize-muted); }
.rc-wize-voice .rc-wize-call-title small i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #b9b6c6; }
.rc-wize-voice .rc-wize-call-title small i.is-on { background: #22a559; }
.rc-wize-voice .rc-wize-call-wave { display: flex; align-items: center; gap: 3px; height: 24px; margin-right: 4px; }
.rc-wize-voice .rc-wize-call-wave i { display: block; width: 3px; height: 100%; border-radius: 2px; background: #8a6bff; transform: scaleY(0.2); }
.rc-wize-voice .rc-wize-call-wave[data-on='1'] i { animation: rc-wize-voice-bar 0.85s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s); }
.rc-wize-voice .rc-wize-call.is-ended .rc-wize-call-wave { display: none; }
@keyframes rc-wize-voice-bar { 0%, 100% { transform: scaleY(0.2); } 35% { transform: scaleY(1); } 65% { transform: scaleY(0.45); } }

/* live captions */
.rc-wize-voice .rc-wize-call-log {
  display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 10px; padding: 4px 4px 8px;
  overflow-y: auto; scrollbar-width: none;
}
.rc-wize-voice .rc-wize-call-log::-webkit-scrollbar { display: none; }
.rc-wize-voice .rc-wize-call-demo { align-self: center; margin: 4px 0 6px; padding: 4px 12px; border-radius: 999px; background: var(--rc-wize-soft); color: var(--rc-wize-deep); font-size: 12px; line-height: 1.55; }
.rc-wize-voice .rc-wize-call-hint { align-self: center; margin: 24px 0; font-size: 14px; line-height: 1.55; color: var(--rc-wize-muted); }
.rc-wize-voice .rc-wize-call-line { margin: 0; max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.4; animation: rc-wize-voice-in 0.3s ease both; }
.rc-wize-voice .rc-wize-call-line.is-a { align-self: flex-start; background: #f1f2f6; color: var(--rc-ink); border-bottom-left-radius: 5px; }
.rc-wize-voice .rc-wize-call-line.is-c { align-self: flex-end; background: var(--rc-ink); color: #fff; border-bottom-right-radius: 5px; }
@keyframes rc-wize-voice-in { from { opacity: 0; transform: translateY(6px); } }

/* tool action card (captions + summary) */
.rc-wize-voice .rc-wize-call-act {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px;
  background: #eefaf3; border: 1px solid #bfe7cf; font-size: 13.5px; line-height: 1.55; animation: rc-wize-voice-in 0.3s ease both;
}
.rc-wize-voice .rc-wize-call-act-icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; background: #22a559; color: #fff; }
.rc-wize-voice .rc-wize-call-act div { flex: 1; min-width: 0; }
.rc-wize-voice .rc-wize-call-act b { display: block; font-weight: 600; }
.rc-wize-voice .rc-wize-call-act-sub { font-size: 12.5px; letter-spacing: -0.01em; color: #4d6a5a; }
.rc-wize-voice .rc-wize-call-act-res { font-size: 12.5px; font-weight: 500; color: #1b7f46; text-align: right; }
.rc-wize-voice .rc-wize-call-act-sm { padding: 8px 10px; }

/* status line + controls */
.rc-wize-voice .rc-wize-call-mic { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 22px; margin: 0 0 8px; font-family: var(--rc-font); font-size: 13px; line-height: 1.55; color: var(--rc-wize-muted); }
.rc-wize-voice .rc-wize-call-mic.is-heard { color: var(--rc-wize-violet); }
.rc-wize-voice .rc-wize-call-pulse { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--rc-wize-violet); animation: rc-wize-pulse 0.9s ease-in-out infinite; }
.rc-wize-voice .rc-wize-call-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rc-wize-voice .rc-wize-call-controls button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 56px;
  border-radius: 14px; border: 1px solid #e3e1ec; background: #fff; color: var(--rc-ink);
  font-family: var(--rc-font); font-size: 12px; line-height: 1.55; cursor: pointer; transition: background-color 0.2s, border-color 0.2s;
}
.rc-wize-voice .rc-wize-call-controls button:hover { background: #f6f5fa; }
.rc-wize-voice .rc-wize-call-controls button.is-on { background: #efeaff; border-color: #cfc6fb; color: var(--rc-wize-deep); }
.rc-wize-voice .rc-wize-call-controls button.is-end { background: #ef4452; border-color: #ef4452; color: #fff; }
.rc-wize-voice .rc-wize-call-controls button.is-end:hover { background: #dc3441; }

/* call summary */
.rc-wize-voice .rc-wize-call-end {
  display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 10px; padding: 8px 4px 4px;
  overflow-y: auto; scrollbar-width: none; animation: rc-wize-voice-in 0.35s ease both;
}
.rc-wize-voice .rc-wize-call-tag { margin: 0; font-family: var(--rc-font-label); font-size: 11px; line-height: 1.55; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rc-wize-muted); }
.rc-wize-voice .rc-wize-call-end h3 { margin: 0; font-family: var(--rc-font); font-size: 22px; font-weight: 500; line-height: 1.55; letter-spacing: -0.02em; color: var(--rc-ink); }
.rc-wize-voice .rc-wize-call-out { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 15px; line-height: 1.4; color: var(--rc-ink); }
.rc-wize-voice .rc-wize-call-out svg { flex: none; margin-top: 3px; color: #22a559; }
.rc-wize-voice .rc-wize-call-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rc-wize-voice .rc-wize-call-tags li { padding: 4px 10px; border-radius: 999px; background: var(--rc-wize-soft); color: var(--rc-wize-deep); font-size: 12px; line-height: 1.55; }
.rc-wize-voice .rc-wize-call-replay {
  margin-top: auto; height: 46px; border: 0; border-radius: 999px; background: var(--rc-wize-ui-blue); color: #fff;
  font-family: var(--rc-font); font-size: 15px; font-weight: 500; line-height: 1.55; cursor: pointer;
}
.rc-wize-voice .rc-wize-call-replay:hover { filter: brightness(1.1); }
.rc-wize-voice .rc-wize-call-fine { margin: 0; font-size: 12px; line-height: 1.4; color: #8a8698; text-align: center; }

/* ---------- the call widget, now the homepage chat widget's call view (V4 79dae6a): 400 x 640, lavender frame, overlay header,
   soft caption bubbles fading in from the top, four controls ---------- */
.rc-wize-voice .rc-wize-call {
  position: relative; width: min(100%, 400px); height: 640px; padding: 0; overflow: hidden; border-radius: 24px; justify-self: start;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: #253748;
}
.rc-wize-voice .rc-wize-call-head { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 14px 16px 18px; background: linear-gradient(#fff 62%, rgba(255, 255, 255, 0)); }
.rc-wize-voice .rc-wize-call-logo { width: 30px; height: 30px; background: linear-gradient(135deg, #8a4dff, #6a3bd8); color: #fff; }
.rc-wize-voice .rc-wize-call-title b { font-size: 14px; font-weight: 600; color: #253748; }
.rc-wize-voice .rc-wize-call-title small { margin-top: 2px; font-family: inherit; color: #4d657c; }
.rc-wize-voice .rc-wize-call-title small i { width: 6px; height: 6px; background: #b9c3cc; }
.rc-wize-voice .rc-wize-call-title small i.is-on { background: #1f9d55; }
.rc-wize-voice .rc-wize-call-wave i { background: #b9c3cc; }
.rc-wize-voice .rc-wize-call-wave[data-on='1'] i { background: #8a4dff; }
.rc-wize-voice .rc-wize-call.is-live, .rc-wize-voice .rc-wize-call.is-ring { display: flex; flex-direction: column; padding: 56px 14px 12px; }
.rc-wize-voice .rc-wize-call-log {
  flex: 1 1 0; gap: 6px; padding: 36px 0 2px; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.3) 18%, #000 52%); mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, 0.3) 18%, #000 52%);
}
.rc-wize-voice .rc-wize-call-demo { margin: 0 0 4px; padding: 3px 10px; background: #f2e9ff; color: #2d194f; font-size: 11.5px; }
.rc-wize-voice .rc-wize-call-hint { margin: 0; font-size: 12.5px; color: #4d657c; }
.rc-wize-voice .rc-wize-call-line { max-width: 88%; padding: 6px 10px; border-radius: 12px; font-size: 12.5px; line-height: 18px; }
.rc-wize-voice .rc-wize-call-line.is-a { background: #f5f7f8; color: #253748; border-top-left-radius: 4px; border-bottom-left-radius: 12px; }
.rc-wize-voice .rc-wize-call-line.is-c { background: #f2e9ff; color: #2d194f; border-top-right-radius: 4px; border-bottom-right-radius: 12px; text-align: right; }
.rc-wize-voice .rc-wize-call-act { padding: 7px 10px; border-radius: 12px; font-size: 12px; }
.rc-wize-voice .rc-wize-call-act-sub, .rc-wize-voice .rc-wize-call-act-res { font-size: 11.5px; }
.rc-wize-voice .rc-wize-call-mic { justify-content: flex-start; min-height: 20px; margin: 6px 0 0; font-family: inherit; font-size: 11.5px; font-weight: 500; color: #4d657c; }
.rc-wize-voice .rc-wize-call-mic.is-heard { color: #1a7f46; }
.rc-wize-voice .rc-wize-call-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.rc-wize-voice .rc-wize-call-controls button { height: 56px; gap: 5px; border-radius: 12px; border-color: #e6eaed; font-family: inherit; font-size: 10.5px; }
.rc-wize-voice .rc-wize-call-controls button:hover { background: #f5f7f8; }
.rc-wize-voice .rc-wize-call-controls button.is-on { background: #f2e9ff; border-color: rgba(156, 73, 255, 0.5); color: #2d194f; }
.rc-wize-voice .rc-wize-call-controls button.is-end { background: #e5484d; border-color: #e5484d; color: #fff; }
.rc-wize-voice .rc-wize-call-controls button.is-end:hover { background: #d23b40; }
.rc-wize-voice .rc-wize-call.is-ended { padding-top: 0; }
.rc-wize-voice .rc-wize-call.is-ended .rc-wize-call-head { position: static; padding-bottom: 8px; background: #fff; }
.rc-wize-voice .rc-wize-call-end { padding: 8px 16px 14px; }

@media (max-width: 1000px) {
  .rc-wize-voice .rc-wize-voice-split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .rc-wize-voice .rc-wize-voice-copy .rc-section-title { max-width: 20ch; }
  .rc-wize-voice .rc-wize-voice-copy .rc-section-subtitle, .rc-wize-voice .rc-wize-voice-copy .rc-wize-voice-tabs { max-width: 560px; }
  .rc-wize-voice .rc-wize-call { justify-self: center; }
}
@media (max-width: 860px) { .rc-wize-voice .rc-wize-voice-copy .rc-section-title { font-size: 30px; } }
@media (max-width: 700px) {
  .rc-wize-voice .rc-wize-voice-copy .rc-section-subtitle { font-size: 16.5px; }
  .rc-wize-voice .rc-wize-call { height: 600px; }
}

/* ---------- more room above the CTA, slightly smaller button (V4 2130849) ---------- */
.rc-wize-voice .rc-wize-voice-copy .rc-wize-voice-tabs { margin-bottom: 12px; }
.rc-wize-voice .rc-wize-voice-copy > .rc-btn { height: 46px; padding: 0 22px; font-size: 15px; }
