/**
 * Demo RCS: chamada (incoming → ativa, mutado até alto-falante) → notif → ao fim do áudio mostra catálogo/carrossel.
 */

.voz-rcs-demo-window {
  position: relative;
}

.voz-rcs-demo-window .voz-channel-chat-header {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .voz-rcs-demo-window .voz-channel-chat-header {
  background: #0b1220;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.voz-rcs-demo-window .voz-channel-chat-header-name,
.voz-rcs-demo-window .voz-channel-chat-header-icon {
  color: #0b1220;
}

[data-theme="dark"] .voz-rcs-demo-window .voz-channel-chat-header-name,
[data-theme="dark"] .voz-rcs-demo-window .voz-channel-chat-header-icon {
  color: rgba(255, 255, 255, 0.92);
}

.voz-rcs-demo-window .voz-channel-chat-header-avatar {
  background: #0b1220;
}

[data-theme="dark"] .voz-rcs-demo-window .voz-channel-chat-header-avatar {
  background: #000000;
}

.voz-rcs-demo-verified {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230ea5e9' d='M12 2 3 7v7c0 5 9 8 9 8s9-3 9-8V7l-9-5Z'/%3E%3Cpath fill='white' d='M10.6 15.3 7.9 12.6 9 11.5l1.6 1.6L15 8.7l1.1 1.1-5.5 5.5Z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.voz-rcs-demo-body {
  position: relative;
}

.voz-rcs-demo-placeholder {
  cursor: default;
}

/* Overlay da chamada */
.voz-rcs-demo-call {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #e8f4f8 0%, #ffffff 45%, #f0f7fc 100%);
  display: none;
  flex-direction: column;
  z-index: 10;
}

[data-theme="dark"] .voz-rcs-demo-call {
  background: var(--voz-call-screen-dark, #1c1b1f);
}

.voz-rcs-demo-call.is-visible {
  display: flex;
}

.voz-rcs-demo-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: linear-gradient(180deg, #e8f4f8 0%, #ffffff 45%, #f0f7fc 100%);
}

[data-theme="dark"] .voz-rcs-demo-screen {
  background:
    radial-gradient(120% 70% at 15% 15%, var(--wall-1-dark), transparent 60%),
    radial-gradient(120% 80% at 85% 35%, var(--wall-2-dark), transparent 62%),
    radial-gradient(90% 70% at 50% 95%, var(--wall-3-dark), transparent 60%),
    linear-gradient(180deg,
      var(--wall-base-1-dark),
      var(--wall-base-2-dark) 55%,
      var(--wall-base-2-dark) 100%);
}

.voz-rcs-demo-screen.is-visible {
  display: flex;
}

.voz-rcs-demo-screen--incoming {
  justify-content: flex-start;
  padding-top: 24px;
}

.voz-rcs-demo-incoming-header {
  text-align: center;
  margin-bottom: 16px;
}

.voz-rcs-demo-call-label {
  font-size: 12px;
  font-weight: 400;
  color: #5a6b78;
  display: block;
  margin-bottom: 4px;
}

[data-theme="dark"] .voz-rcs-demo-call-label {
  color: rgba(255, 255, 255, 0.6);
}

.voz-rcs-demo-caller-name {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

[data-theme="dark"] .voz-rcs-demo-caller-name {
  color: #fff;
}

.voz-rcs-demo-incoming-actions {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 18px;
}

/* Slide igual ao hero (reutiliza estrutura do WA demo) */
.voz-rcs-demo-call .voz-slide-container {
  position: relative;
  width: 100%;
  max-width: 248px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voz-rcs-demo-call .voz-slide-track {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 68px;
  border-radius: 36px;
  padding: 5px;
  display: flex;
  align-items: center;
  overflow: visible;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    0 2px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .voz-rcs-demo-call .voz-slide-track {
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.12) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.15),
    0 2px 20px rgba(0, 0, 0, 0.4);
}

.voz-rcs-demo-call .voz-slide-track>div:not(.voz-slide-knob):not(.voz-slide-hint-arrow) {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  padding-right: 20px;
}

[data-theme="dark"] .voz-rcs-demo-call .voz-slide-track>div:not(.voz-slide-knob):not(.voz-slide-hint-arrow) {
  color: rgba(255, 255, 255, 0.9);
}

.voz-rcs-demo-call .voz-slide-knob {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease;
  animation: voz-rcs-demo-knob-hint 2.2s ease-in-out infinite;
}

.voz-rcs-demo-call .voz-slide-knob svg {
  width: 28px;
  height: 28px;
  fill: #34c759;
}

[data-theme="dark"] .voz-rcs-demo-call .voz-slide-knob {
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 100%);
  box-shadow:
    0 2px 0 0 rgba(255, 255, 255, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .voz-rcs-demo-call .voz-slide-knob svg {
  fill: #30d158;
}

@keyframes voz-rcs-demo-knob-hint {

  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(6px);
  }

  70% {
    transform: translateX(0);
  }
}

.voz-rcs-demo-call .voz-slide-hint-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: rgba(0, 0, 0, 0.55);
  animation: voz-rcs-demo-arrow-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.voz-rcs-demo-call .voz-slide-hint-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

[data-theme="dark"] .voz-rcs-demo-call .voz-slide-hint-arrow {
  color: rgba(255, 255, 255, 0.75);
}

@keyframes voz-rcs-demo-arrow-pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateY(-50%) translateX(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
  }
}

/* Tela ativa */
.voz-rcs-demo-screen--active {
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 10px;
}

.voz-rcs-demo-active-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.voz-rcs-demo-active-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

[data-theme="dark"] .voz-rcs-demo-active-name {
  color: #fff;
}

.voz-rcs-demo-active-timer {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.voz-rcs-demo-active-timer.voz-rcs-demo-timer-waiting {
  color: #30d158;
  opacity: 0.95;
}

.voz-rcs-demo-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
  margin: 0 auto;
  max-width: 220px;
}

.voz-rcs-demo-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.95);
  cursor: default;
}

.voz-rcs-demo-opt-btn--speaker {
  cursor: pointer;
}

.voz-rcs-demo-opt-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.voz-rcs-demo-opt-circle--speaker .voz-rcs-demo-speaker-icon--on {
  display: none;
}

.voz-rcs-demo-opt-btn--speaker.is-unmuted .voz-rcs-demo-speaker-icon--muted {
  display: none;
}

.voz-rcs-demo-opt-btn--speaker.is-unmuted .voz-rcs-demo-speaker-icon--on {
  display: block;
}

.voz-rcs-demo-opt-label {
  font-size: 10px;
  font-weight: 500;
}

.voz-rcs-demo-active-hangup {
  margin-top: auto;
}

.voz-rcs-demo-btn-hangup {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background-color: #e11d48;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.4);
}

.voz-rcs-demo-btn-hangup:hover {
  background: #be123c;
}

/* Notificação RCS */
.voz-rcs-demo-notif {
  position: absolute;
  top: -100px;
  left: 8px;
  right: 8px;
  z-index: 20;
  min-height: 56px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #1c1c1e;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.12);
  transition: top 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.voz-rcs-demo-notif.is-visible {
  top: 8px;
}

[data-theme="dark"] .voz-rcs-demo-notif {
  background: rgba(44, 42, 48, 0.95);
  color: #f5f5f7;
}

.voz-rcs-demo-notif-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voz-rcs-demo-notif-icon.bg-rcs {
  background: linear-gradient(135deg, #5e35b1 0%, #1e88e5 100%);
}

.voz-rcs-demo-notif-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: none;
}

.voz-rcs-demo-notif-details {
  flex: 1;
  min-width: 0;
}

.voz-rcs-demo-notif-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.voz-rcs-demo-notif-app {
  font-size: 12px;
  font-weight: 600;
  color: #000000;
}

[data-theme="dark"] .voz-rcs-demo-notif-app {
  color: #ffffff;
}

.voz-rcs-demo-notif-time {
  font-size: 11px;
  color: #666;
}

.voz-rcs-demo-notif-title {
  font-size: 14px;
  font-weight: 700;
  display: block;
}

.voz-rcs-demo-notif-body {
  font-size: 12px;
  color: #555;
  margin: 0;
  line-height: 1.3;
}

[data-theme="dark"] .voz-rcs-demo-notif-body {
  color: #f5f5f5;
}

/* Carrossel / catálogo RCS */
.voz-rcs-demo-carousel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0px 0 8px;
}

.voz-rcs-demo-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 4px 0;
}

.voz-rcs-demo-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 10px 4px;
  gap: 8px;
}

.voz-rcs-demo-hero-logoWrap {
  position: relative;
  width: 68px;
  height: 68px;
}

.voz-rcs-demo-hero-logo {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: #0b0b0c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .voz-rcs-demo-hero-logo {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.voz-rcs-demo-hero-logo img {
  width: 40px;
  height: 40px;
}

.voz-rcs-demo-hero-verified {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .voz-rcs-demo-hero-verified {
  background: #0b1220;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.voz-rcs-demo-hero-verified::before {
  content: "";
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230ea5e9' d='M12 2 3 7v7c0 5 9 8 9 8s9-3 9-8V7l-9-5Z'/%3E%3Cpath fill='white' d='M10.6 15.3 7.9 12.6 9 11.5l1.6 1.6L15 8.7l1.1 1.1-5.5 5.5Z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.voz-rcs-demo-hero-text {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(17, 24, 39, 0.72);
  max-width: 210px;
}

[data-theme="dark"] .voz-rcs-demo-hero-text {
  color: rgba(255, 255, 255, 0.78);
}

.voz-rcs-demo-bubble {
  max-width: 92%;
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  color: rgba(17, 24, 39, 0.92);
  font-size: 12px;
  line-height: 1.35;
}

[data-theme="dark"] .voz-rcs-demo-bubble {
  background-color: #111827;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.voz-rcs-demo-time {
  align-self: center;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #111827;
  background-color: #e5e7eb;
}

[data-theme="dark"] .voz-rcs-demo-time {
  color: rgba(255, 255, 255, 0.82);
  background-color: #0b1220;
}

.voz-rcs-demo-carousel-title {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  padding: 0 4px;
}

[data-theme="dark"] .voz-rcs-demo-carousel-title {
  color: #f5f5f7;
}

.voz-rcs-demo-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: auto;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.voz-rcs-demo-carousel-track:active {
  cursor: grabbing;
}

.voz-rcs-demo-carousel-track.is-dragging {
  cursor: grabbing;
}

.voz-rcs-demo-carousel-track.is-autoplay {
  scroll-behavior: auto;
}

.voz-rcs-demo-carousel-track::-webkit-scrollbar {
  display: none;
}

.voz-rcs-demo-card {
  flex: 0 0 196px;
  width: 196px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

[data-theme="dark"] .voz-rcs-demo-card {
  background: #2c2a30;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.voz-rcs-demo-card:active {
  transform: scale(0.98);
}

.voz-rcs-demo-card-image {
  height: 100px;
  background-color: #0b1220;
  background-image: linear-gradient(135deg, #0ea5e9 0%, #1365a9 55%, #0b1220 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  position: relative;
}

.voz-rcs-demo-card-image img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25));
}

.voz-rcs-demo-card-body {
  padding: 8px 10px 10px;
}

.voz-rcs-demo-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 2px 0;
  line-height: 1.2;
}

[data-theme="dark"] .voz-rcs-demo-card-title {
  color: #f5f5f7;
}

.voz-rcs-demo-card-desc {
  font-size: 10.5px;
  color: #666;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

[data-theme="dark"] .voz-rcs-demo-card-desc {
  color: rgba(255, 255, 255, 0.7);
}

.voz-rcs-demo-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}

.voz-rcs-demo-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: #eef2f7;
  color: #0b1220;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
}

[data-theme="dark"] .voz-rcs-demo-card-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background-color: #111827;
  color: rgba(255, 255, 255, 0.92);
}

.voz-rcs-demo-card-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.voz-rcs-demo-card-cta {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #5e35b1;
}

[data-theme="dark"] .voz-rcs-demo-card-cta {
  color: #7c4dff;
}