/* =========================================================
   Roiatek AI · voice.css
   "Voice AI agents" section: agent tabs, call video in a phone,
   agent profile, steps and the test-link request form.
   Bilingual: the section's data-lang ("en" | "ar") shows the
   matching [data-l] text.
   ========================================================= */

.voice [hidden] { display: none !important; }
.voice[data-lang="en"] [data-l="ar"],
.voice[data-lang="ar"] [data-l="en"] { display: none; }
.voice[data-lang="ar"] .va-panel,
.voice [lang="ar"] { font-family: var(--font-body), "IBM Plex Sans Arabic", sans-serif; }
.voice[data-lang="ar"] .va-panel h3 { font-family: "IBM Plex Sans Arabic", var(--font-body), sans-serif; font-weight: 700; letter-spacing: 0; }

/* ---------- Agent tabs ---------- */
.va-agents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 0 auto clamp(30px, 4vw, 48px);
}
.va-agent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  text-align: start;
  color: var(--text);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 46, 106, 0.5), rgba(10, 22, 56, 0.5));
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.va-agent.is-active {
  border-color: rgba(34, 228, 245, 0.55);
  box-shadow: 0 0 0 1px rgba(34, 228, 245, 0.2), 0 14px 30px -18px rgba(34, 228, 245, 0.7);
}
.va-agent.is-soon { opacity: 0.55; cursor: default; border-style: dashed; }
.va-agent-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 70%, #1a2f70), color-mix(in srgb, var(--tone) 30%, #0a1a44));
  border: 1px solid color-mix(in srgb, var(--tone) 70%, #fff);
  box-shadow: 0 0 16px -4px var(--tone);
}
.va-agent-ico .ico { width: 20px; height: 20px; }
.va-agent.is-soon .va-agent-ico { filter: grayscale(0.6); box-shadow: none; }
.va-agent-txt { display: grid; min-width: 0; line-height: 1.3; }
.va-agent-txt strong { font-size: 0.9688rem; font-weight: 600; }
.va-agent-txt small { font-size: 0.8125rem; color: var(--text-3); }
.va-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--green);
  background: rgba(70, 224, 138, 0.1);
  border: 1px solid rgba(70, 224, 138, 0.35);
}
.va-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: va-blink 1.6s ease-in-out infinite; }

/* ---------- Stage ---------- */
.va-stage {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

/* Phone + video */
.va-phone-col { position: sticky; top: calc(var(--header-h) + 24px); display: grid; justify-items: center; gap: 18px; }
.va-lang {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(10, 24, 62, 0.8);
  border: 1px solid var(--line-strong);
}
.va-lang button {
  min-width: 96px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.va-lang button[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--font-body), sans-serif; }
.va-lang button[aria-pressed="true"] {
  color: #03112b;
  background: linear-gradient(100deg, var(--cyan), #5b8cff);
  box-shadow: 0 0 16px -4px rgba(34, 228, 245, 0.7);
}
.va-phone {
  width: min(320px, 100%);
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #18264d, #070d24);
}
.va-screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 37px;
  background: radial-gradient(80% 50% at 50% 30%, #16306e, #060f2b);
}
.va-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #060f2b; }
.va-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  padding: 18px 14px 22px;
  background: linear-gradient(180deg, rgba(6, 15, 43, 0.55), transparent 28%, transparent 62%, rgba(6, 15, 43, 0.85));
  transition: opacity 0.3s var(--ease);
}
.va-phone.is-playing .va-overlay { opacity: 0; pointer-events: none; }
.va-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(6, 15, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.va-badge i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 8px #ff4d6d; animation: va-blink 1.2s ease-in-out infinite; }
/* The play button sits below the agent's portrait in the video (between the photo and the call button) */
.va-play {
  position: absolute;
  left: 50%;
  top: 68%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: #03112b;
  background: linear-gradient(135deg, #5ef0ff, #46e08a);
  box-shadow: 0 12px 30px -8px rgba(70, 224, 138, 0.8), 0 0 0 6px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s var(--ease);
}
.va-play:hover { transform: translate(-50%, -50%) scale(1.07); }
.va-play .ico { width: 30px; height: 30px; margin-left: 4px; }
.va-play-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(94, 240, 255, 0.6);
  animation: va-ring 2s ease-out infinite;
}
.va-hint {
  grid-row: 3;
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  background: rgba(6, 15, 43, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.va-hint .ico { width: 16px; height: 16px; color: var(--cyan); }
.va-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  background: radial-gradient(80% 50% at 50% 40%, #16306e, #060f2b);
}
.va-missing .ico { width: 40px; height: 40px; color: var(--cyan); }
.va-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cyan);
}
.va-jump .ico { width: 16px; height: 16px; transform: rotate(90deg); }
.va-jump:hover { color: #fff; }

/* ---------- Panel ---------- */
.va-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.va-card {
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 46, 106, 0.55), rgba(10, 22, 56, 0.55));
}
.va-profile { display: flex; align-items: center; gap: 18px; }
.va-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #a8f7ff, #36b9ff 35%, #3f55dc 70%, #2b1b70);
  box-shadow: inset -6px -8px 16px rgba(24, 0, 70, 0.5), 0 0 26px -4px rgba(54, 185, 255, 0.7);
}
.va-avatar .ico { width: 30px; height: 30px; }
.va-avatar i {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(70, 224, 138, 0.55);
  animation: va-ring 2.4s ease-out infinite;
}
.va-who { min-width: 0; }
.va-name { font-size: 1.5rem; font-stretch: 110%; }
.va-role { margin-top: 2px; color: var(--cyan); font-weight: 600; font-size: 0.9688rem; }
.va-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.va-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  color: var(--text-2);
  background: rgba(5, 12, 34, 0.55);
  border: 1px solid var(--line);
}
.va-tags .ico { width: 14px; height: 14px; color: var(--cyan); }

.va-does { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.va-does li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 0.9063rem;
  line-height: 1.45;
  color: var(--text-2);
  background: rgba(10, 24, 62, 0.45);
  border: 1px solid var(--line);
}
.va-does .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--green); }

/* Steps: the clear "what happens next" indicator */
.va-steps { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 460px; width: 100%; margin-inline: auto; }
.va-steps::before {
  content: "";
  position: absolute;
  top: 17px;
  inset-inline: 25% 25%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--green));
  opacity: 0.35;
}
.va-steps li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.va-steps li > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-3);
  background: #0a1638;
  border: 1.5px solid var(--line-strong);
  transition: all 0.35s var(--ease);
}
.va-steps p { font-size: 0.875rem; font-weight: 600; color: var(--text-3); transition: color 0.35s; }
.va-steps li.is-current > span { color: #03112b; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px -2px var(--cyan); }
.va-steps li.is-current p { color: var(--text); }
.va-steps li.is-done > span { color: #03112b; background: var(--green); border-color: var(--green); }
.va-steps li.is-done p { color: var(--text-2); }

/* Form card */
.va-form-card { scroll-margin-top: calc(var(--header-h) + 24px); background:
    radial-gradient(70% 60% at 0% 0%, rgba(70, 224, 138, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(22, 46, 106, 0.7), rgba(10, 22, 56, 0.7)); }
.va-form-card.is-highlight { animation: va-glow 1.4s ease-in-out 2; }
.va-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.va-form h3 { font-size: 1.3125rem; font-stretch: 106%; line-height: 1.3; }
.va-form-sub { margin-top: -6px; font-size: 0.9375rem; color: var(--text-2); }
.va-form-sub b { color: var(--text); }
.va-form label { display: grid; gap: 6px; font-size: 0.8438rem; font-weight: 500; color: var(--text-2); }
.va-form input {
  min-height: 48px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 1rem;
  color: var(--text);
  background: rgba(5, 11, 31, 0.6);
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.va-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(70, 224, 138, 0.15); }
.va-form input[aria-invalid="true"] { border-color: var(--magenta); }
/* Phone: country code + national number */
.va-tel-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.va-tel-label { font-size: 0.8438rem; font-weight: 500; color: var(--text-2); }
.va-tel { display: flex; gap: 8px; }
.va-cc {
  position: relative;
  display: flex;
  flex: none;
  border-radius: var(--r-sm);
  background: rgba(5, 11, 31, 0.6);
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.va-cc:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(70, 224, 138, 0.15); }
.va-cc-show {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 12px;
  min-height: 46px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.va-cc-flag { font-size: 1.15rem; line-height: 1; }
.va-cc-caret { width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The native list (full country names, searchable by typing) sits invisibly on top */
.va-cc select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 1rem;
}
.va-tel input { flex: 1; width: 100%; min-width: 0; }
/* The opened country list: readable colours in both themes (Windows/Chrome use these) */
.va-cc select { color-scheme: dark; color: #eaf1ff; background: #0a1a40; }
.va-cc select optgroup { color: #7d8eb5; background: #0a1a40; font-style: normal; font-weight: 600; }
.va-cc select option { color: #eaf1ff; background: #0a1a40; font-weight: 400; }
.va-cc select option:checked { color: #03112b; background: #22e4f5; }
html[data-theme="light"] .va-cc select { color-scheme: light; color: #0b1a3f; background: #fff; }
html[data-theme="light"] .va-cc select optgroup { color: #66759a; background: #fff; }
html[data-theme="light"] .va-cc select option { color: #0b1a3f; background: #fff; }
html[data-theme="light"] .va-cc select option:checked { color: #fff; background: #3359e0; }
html[data-theme="light"] .va-cc { background: #f7f9fe; }

.va-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 4px;
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 700;
  color: #03201a;
  background: linear-gradient(100deg, #46e08a, #2bd9b9 55%, #22e4f5);
  box-shadow: 0 12px 28px -12px rgba(70, 224, 138, 0.9);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s;
}
.va-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(70, 224, 138, 1); }
.va-submit:disabled { opacity: 0.6; transform: none; }
.va-submit .ico { width: 18px; height: 18px; }
.va-status { min-height: 1.2em; font-size: 0.875rem; color: #ff8cc8; }
.va-note { display: flex; gap: 8px; font-size: 0.8125rem; color: var(--text-3); }
.va-note .ico { width: 14px; height: 14px; margin-top: 3px; flex: none; }
.va-wa { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 0.875rem; font-weight: 600; color: var(--green); }
.va-wa .ico { width: 18px; height: 18px; }
.va-wa:hover { color: #fff; }
.va-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.va-done { display: grid; justify-items: center; gap: 12px; padding: 20px 6px; text-align: center; }
.va-done-ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #03201a;
  background: var(--green);
  box-shadow: 0 0 30px -4px var(--green);
  animation: va-pop 0.5s var(--ease) both;
}
.va-done-ico .ico { width: 30px; height: 30px; stroke-width: 2.4; }
.va-done h3 { font-size: 1.375rem; }
.va-done-msg { max-width: 42ch; color: var(--text-2); }

.va-start {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 16px 30px;
  border-radius: var(--r-pill);
  font-size: 1.0625rem;
  font-weight: 700;
  color: #03201a;
  background: linear-gradient(100deg, #46e08a, #2bd9b9 55%, #22e4f5);
  box-shadow: 0 14px 34px -12px rgba(70, 224, 138, 1);
  transition: transform 0.2s var(--ease);
}
.va-start:hover { transform: translateY(-2px) scale(1.02); }
.va-start .ico { width: 22px; height: 22px; animation: va-shake 2.4s ease-in-out infinite; }
.va-start-ring { position: absolute; inset: -6px; border-radius: inherit; border: 2px solid rgba(70, 224, 138, 0.55); animation: va-ring 2s ease-out infinite; pointer-events: none; }
.va-tips { display: grid; gap: 10px; width: 100%; margin-top: 10px; text-align: start; }
.va-tips li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; color: var(--text-2); }
.va-tips .ico { width: 17px; height: 17px; margin-top: 2px; flex: none; color: var(--cyan); }
@keyframes va-shake { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-14deg); } 88% { transform: rotate(12deg); } 92% { transform: rotate(-8deg); } 96% { transform: rotate(6deg); } }

@keyframes va-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes va-ring { from { opacity: 0.9; transform: scale(0.92); } to { opacity: 0; transform: scale(1.25); } }
@keyframes va-pop { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes va-glow { 50% { box-shadow: 0 0 0 2px rgba(70, 224, 138, 0.6), 0 0 40px -6px rgba(70, 224, 138, 0.8); } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .va-stage { grid-template-columns: minmax(0, 1fr); }
  .va-panel, .va-phone-col { min-width: 0; }
  .va-phone-col { position: static; }
  .va-panel { max-width: 640px; width: 100%; margin: 0 auto; }
}
@media (max-width: 760px) {
  .va-agents {
    display: flex;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .va-agents::-webkit-scrollbar { display: none; }
  .va-agent { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .va-does { grid-template-columns: 1fr; }
  .va-profile { align-items: flex-start; }
  .va-avatar { width: 60px; height: 60px; }
  .va-name { font-size: 1.3rem; }
  .va-steps p { font-size: 0.8125rem; }
}
