/* ==========================================================
   ThinkAIQ — Voice Studio (Voice AI Calling)
   Dark premium UI. Mobile-first.
   Accent gradient: cyan -> purple
   ========================================================== */

.voice-section {
  --vs-bg: #0a0d14;
  --vs-card: #11151f;
  --vs-border: rgba(255, 255, 255, 0.08);
  --vs-text: #e7ecf5;
  --vs-muted: #8b93a7;
  --vs-cyan: #6ee7ff;
  --vs-purple: #a78bfa;
  position: relative;
  background: var(--vs-bg);
  overflow: hidden;
  color: var(--vs-text);
}

.voice-bg-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 130vw);
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    closest-side,
    rgba(110, 231, 255, 0.16),
    rgba(167, 139, 250, 0.1) 55%,
    transparent 78%
  );
  filter: blur(20px);
}

.voice-section > .container {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
.voice-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 0 16px;
}

.voice-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 255, 0.25);
  background: rgba(110, 231, 255, 0.08);
  color: var(--vs-cyan);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.voice-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--vs-text);
  line-height: 1.25;
  margin: 0 0 12px;
}

.voice-subtitle {
  font-size: 15px;
  color: var(--vs-muted);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Studio stage ---------- */
.voice-studio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ---------- Player card ---------- */
.voice-player {
  position: relative;
  background: var(--vs-card);
  border-radius: 20px;
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* gradient border (mask-composite) */
.voice-player::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(110, 231, 255, 0.65),
    rgba(167, 139, 250, 0.4) 45%,
    rgba(255, 255, 255, 0.06)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.voice-player-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.voice-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--vs-cyan);
}

.voice-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vs-cyan);
  box-shadow: 0 0 0 0 rgba(110, 231, 255, 0.5);
  animation: vsPulse 2s ease-out infinite;
}

@keyframes vsPulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 255, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(110, 231, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 255, 0); }
}

.voice-player-langs {
  font-size: 12px;
  color: var(--vs-muted);
  white-space: nowrap;
}

.voice-player-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #06121a;
  background: linear-gradient(135deg, var(--vs-cyan), var(--vs-purple));
  box-shadow: 0 12px 34px rgba(110, 231, 255, 0.28);
  margin-bottom: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.voice-player-avatar.is-male {
  background: linear-gradient(135deg, #34d399, var(--vs-cyan));
  box-shadow: 0 12px 34px rgba(52, 211, 153, 0.26);
}

.voice-player.is-playing .voice-player-avatar {
  transform: scale(1.04);
}

.voice-player-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--vs-text);
  margin: 0 0 20px;
  line-height: 1.2;
}

.voice-player-badge {
  display: inline-block;
  margin: -10px 0 18px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #3a2500;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.28);
}

.voice-player-badge[hidden] {
  display: none;
}

/* ---------- Waveform ---------- */
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  margin-bottom: 24px;
  width: 100%;
}

.voice-wave-bar {
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--vs-cyan), var(--vs-purple));
  opacity: 0.5;
  transform: scaleY(0.6);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.voice-wave.is-playing .voice-wave-bar {
  opacity: 1;
  animation: vsWave 0.9s ease-in-out infinite;
}

@keyframes vsWave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

/* ---------- Player buttons ---------- */
.voice-player-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.voice-play-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 12px;
  border-radius: 12px;
  border: 1px solid var(--vs-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--vs-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-play-btn:hover {
  border-color: rgba(110, 231, 255, 0.5);
  color: var(--vs-cyan);
}

.voice-play-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--vs-border);
  color: var(--vs-text);
}

.voice-play-btn:disabled:hover {
  border-color: var(--vs-border);
  color: var(--vs-text);
}

.voice-play-btn .icon-pause {
  display: none;
}

.voice-play-btn.is-active {
  background: linear-gradient(135deg, var(--vs-cyan), var(--vs-purple));
  border-color: transparent;
  color: #06121a;
}

.voice-play-btn.is-active .icon-play {
  display: none;
}

.voice-play-btn.is-active .icon-pause {
  display: inline-flex;
}

.voice-player-progress {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 18px;
  overflow: hidden;
}

.voice-player-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--vs-cyan), var(--vs-purple));
  transition: width 0.1s linear;
}

/* ---------- List panel ---------- */
.voice-list-panel {
  min-width: 0;
}

.voice-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.voice-filter {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--vs-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--vs-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-filter:hover {
  border-color: rgba(110, 231, 255, 0.4);
  color: var(--vs-cyan);
}

.voice-filter.is-active {
  background: linear-gradient(135deg, var(--vs-cyan), var(--vs-purple));
  border-color: transparent;
  color: #06121a;
}

.voice-filter--star {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}

.voice-filter--star:hover {
  border-color: rgba(251, 191, 36, 0.85);
  color: #fcd34d;
}

.voice-filter--star.is-active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: transparent;
  color: #3a2500;
}

.voice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 231, 255, 0.35) transparent;
}

.voice-list::-webkit-scrollbar {
  width: 6px;
}

.voice-list::-webkit-scrollbar-track {
  background: transparent;
}

.voice-list::-webkit-scrollbar-thumb {
  background: rgba(110, 231, 255, 0.35);
  border-radius: 999px;
}

.voice-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--vs-border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  min-width: 0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.voice-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(110, 231, 255, 0.3);
}

.voice-item.is-selected {
  border-color: rgba(110, 231, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(110, 231, 255, 0.35), 0 0 22px rgba(110, 231, 255, 0.16);
}

/* Recommended (top picks) */
.voice-item[data-recommended="true"] {
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.07), rgba(255, 255, 255, 0.02));
}

.voice-item[data-recommended="true"]:hover {
  border-color: rgba(251, 191, 36, 0.8);
}

.voice-item-star {
  color: #fbbf24;
  font-size: 11px;
  margin-right: 4px;
}

.voice-item-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #06121a;
  background: linear-gradient(135deg, var(--vs-cyan), var(--vs-purple));
}

.voice-item[data-gender="male"] .voice-item-avatar {
  background: linear-gradient(135deg, #34d399, var(--vs-cyan));
}

.voice-item-body {
  flex: 1;
  min-width: 0;
}

.voice-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--vs-text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-item-meta {
  display: block;
  font-size: 10px;
  color: var(--vs-muted);
  line-height: 1.3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-item-play {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--vs-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vs-muted);
  transition: all 0.2s ease;
}

.voice-item-play svg {
  width: 11px;
  height: 11px;
  margin-left: 1px;
}

.voice-item.is-selected .voice-item-play {
  color: var(--vs-cyan);
  border-color: rgba(110, 231, 255, 0.5);
}

.voice-item.is-playing .voice-item-play {
  color: #06121a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--vs-cyan), var(--vs-purple));
}

.voice-item.is-playing .voice-item-play .icon-play {
  display: none;
}

.voice-item.is-playing .voice-item-play .icon-pause {
  display: inline-flex;
  margin-left: 0;
}

.voice-item-play .icon-pause {
  display: none;
}

/* ---------- Feature pills ---------- */
.voice-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 52px;
}

.voice-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--vs-border);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.voice-pill:hover {
  border-color: rgba(110, 231, 255, 0.35);
  background: rgba(110, 231, 255, 0.05);
}

.voice-pill-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--vs-text);
  line-height: 1.3;
  white-space: nowrap;
}

.voice-pill-sub {
  font-size: 11px;
  color: var(--vs-muted);
  line-height: 1.3;
  white-space: nowrap;
}

/* ---------- CTA banner ---------- */
.voice-cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  padding: 30px 22px;
  border-radius: 20px;
  border: 1px solid var(--vs-border);
  background: linear-gradient(
    135deg,
    rgba(110, 231, 255, 0.09),
    rgba(167, 139, 250, 0.07)
  );
}

.voice-cta-text h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--vs-text);
  margin: 0 0 8px;
}

.voice-cta-text p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--vs-muted);
  margin: 0;
  max-width: 520px;
}

.voice-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
}

.voice-btn-primary {
  background: linear-gradient(135deg, var(--vs-cyan), var(--vs-purple));
  color: #06121a;
  box-shadow: 0 10px 26px rgba(110, 231, 255, 0.22);
}

.voice-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(110, 231, 255, 0.3);
}

.voice-btn-ghost {
  background: transparent;
  color: var(--vs-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.voice-btn-ghost:hover {
  border-color: rgba(110, 231, 255, 0.6);
  color: var(--vs-cyan);
}

/* ═══════════════════════════════════════════
   TABLET (≥ 768px)
═══════════════════════════════════════════ */
@media (min-width: 768px) {
  .voice-title {
    font-size: 32px;
  }

  .voice-subtitle {
    font-size: 16px;
  }

  .voice-studio {
    grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  .voice-cta {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 34px 36px;
  }

  .voice-cta-text h3 {
    font-size: 24px;
  }

  .voice-cta-actions {
    flex-direction: row;
    width: auto;
    flex-shrink: 0;
  }
}

/* ═══════════════════════════════════════════
   DESKTOP (≥ 1024px)
═══════════════════════════════════════════ */
@media (min-width: 1024px) {
  .voice-title {
    font-size: 36px;
  }

  .voice-studio {
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 30px;
  }

  .voice-player {
    padding: 26px 24px 28px;
  }

  .voice-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Feature pills — mobile: neat 2-column grid ---------- */
@media (max-width: 767px) {
  .voice-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 36px;
    max-width: 520px;
    margin-inline: auto;
  }

  .voice-pill {
    width: 100%;
    align-items: flex-start;
    border-radius: 14px;
    padding: 12px 14px;
  }

  .voice-pill-label,
  .voice-pill-sub {
    white-space: normal;
  }

  .voice-pill-label {
    font-size: 13px;
  }

  .voice-pill-sub {
    font-size: 11px;
  }

  /* The long "Auto-Switch Mid-Call" pill spans the full row */
  .voice-pill:nth-child(5) {
    grid-column: 1 / -1;
  }
}

/* ═══════════════════════════════════════════
   EXTRA SMALL (< 360px)
═══════════════════════════════════════════ */
@media (max-width: 359px) {
  .voice-list {
    grid-template-columns: 1fr;
  }

  .voice-item-meta {
    display: none;
  }

  .voice-pill {
    padding: 8px 12px;
  }

  .voice-pill-label {
    font-size: 12px;
  }

  .voice-pill-sub {
    font-size: 10px;
  }
}

/* ═══════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .voice-live-dot,
  .voice-wave.is-playing .voice-wave-bar {
    animation: none;
  }

  .voice-wave-bar {
    transform: scaleY(0.8);
  }

  .voice-player-avatar,
  .voice-btn,
  .voice-btn-primary:hover {
    transition: none;
    transform: none;
  }
}
