.pav-widget,
.pav-widget * {
  box-sizing: border-box;
}

.pav-widget {
  --pav-primary: #2563eb;
  bottom: 22px;
  color: #172033;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  z-index: 2147483000;
}

.pav-position-right { right: 22px; }
.pav-position-left { left: 22px; }

.pav-launcher {
  align-items: center;
  background: var(--pav-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.26);
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  gap: 9px;
  min-height: 56px;
  padding: 11px 18px 11px 13px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.pav-launcher:hover {
  box-shadow: 0 15px 38px rgba(15, 23, 42, 0.34);
  transform: translateY(-2px);
}

.pav-launcher:focus-visible,
.pav-close:focus-visible,
.pav-connect:focus-visible,
.pav-end:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.pav-launcher-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.pav-launcher svg {
  fill: currentColor;
  height: 21px;
  width: 21px;
}

.pav-panel {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  bottom: 70px;
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  position: absolute;
  width: min(360px, calc(100vw - 28px));
}

.pav-position-right .pav-panel { right: 0; }
.pav-position-left .pav-panel { left: 0; }

.pav-panel-header {
  align-items: center;
  background: var(--pav-primary);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 15px 16px 15px 20px;
}

.pav-panel-header strong,
.pav-panel-header span {
  display: block;
}

.pav-panel-header strong { font-size: 16px; }
.pav-panel-header span { font-size: 12px; margin-top: 2px; opacity: 0.85; }

.pav-close {
  background: rgba(255, 255, 255, 0.13);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font: 26px/1 sans-serif;
  height: 38px;
  width: 38px;
}

.pav-panel-body {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 28px 25px 24px;
  text-align: center;
}

.pav-orb {
  align-items: center;
  background: #eff6ff;
  background: color-mix(in srgb, var(--pav-primary) 12%, white);
  border-radius: 50%;
  display: flex;
  gap: 4px;
  height: 82px;
  justify-content: center;
  margin-bottom: 18px;
  width: 82px;
}

.pav-orb span {
  background: var(--pav-primary);
  border-radius: 999px;
  height: 18px;
  opacity: 0.7;
  width: 5px;
}

.pav-orb.is-speaking span,
.pav-orb.is-listening span,
.pav-orb.is-connecting span {
  animation: pav-wave 800ms ease-in-out infinite alternate;
}

.pav-orb span:nth-child(2) { animation-delay: 180ms; height: 30px; }
.pav-orb span:nth-child(3) { animation-delay: 360ms; }
.pav-orb.is-error { background: #fee2e2; }
.pav-orb.is-error span { background: #dc2626; }

@keyframes pav-wave {
  from { transform: scaleY(0.55); }
  to { transform: scaleY(1.35); }
}

.pav-status-text {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 9px;
}

.pav-transcript {
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  max-height: 72px;
  overflow: auto;
}

.pav-transcript:empty { display: none; }

.pav-privacy {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
  margin: 13px 0 18px;
}

.pav-connect,
.pav-end {
  background: var(--pav-primary);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 18px;
}

.pav-end {
  background: #eef2f7;
  color: #334155;
}

.pav-panel footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  padding: 10px 16px;
  text-align: center;
}

@media (max-width: 520px) {
  .pav-widget { bottom: 14px; }
  .pav-position-right { right: 14px; }
  .pav-position-left { left: 14px; }
  .pav-launcher-text { display: none; }
  .pav-launcher { padding: 11px; }
  .pav-panel { bottom: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  .pav-orb span,
  .pav-launcher { animation: none !important; transition: none !important; }
}
