.agent-pop-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: none;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #d32a00, #a62000);
  color: #fff;
  font: 900 0.95rem/1.1 Arial, sans-serif;
  box-shadow: 0 10px 0 #741700, 0 18px 34px rgba(21, 17, 13, 0.28);
  cursor: pointer;
  transform: translateY(18px);
  opacity: 0;
}

.agent-pop-launcher.is-visible {
  display: inline-flex;
  animation: agent-rise 0.65s ease forwards, agent-breathe 2.4s ease-in-out 0.8s infinite;
}

.agent-pop-launcher.is-reading {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.agent-pop-launcher .agent-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f5a524;
  box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.5);
  animation: agent-pulse 1.35s ease-out infinite;
}

.agent-pop-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 81;
  width: min(420px, calc(100vw - 28px));
  max-height: min(690px, calc(100vh - 112px));
  border-radius: 22px;
  overflow: hidden;
  background: #fffaf2;
  border: 1px solid rgba(223, 118, 0, 0.24);
  box-shadow: 0 28px 74px rgba(21, 17, 13, 0.32);
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.38s ease, opacity 0.38s ease;
}

.agent-pop-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.agent-pop-panel[aria-hidden="true"] iframe {
  visibility: hidden;
}

.agent-pop-head {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #15110d, #04766a);
  color: #fff;
}

.agent-pop-head strong {
  font-size: 1.05rem;
  line-height: 1.2;
}

.agent-pop-head span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.35;
}

.agent-pop-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.agent-pop-frame {
  min-height: 420px;
  background: #fff;
}

.agent-pop-frame iframe {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
}

.promo-video {
  width: 100%;
  min-height: 280px;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #15110d;
}

.video-slot.media-promo .promo-fallback {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: none;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(21, 17, 13, 0.76);
  color: #fff;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.video-slot.media-promo.is-mp4-pending .promo-fallback {
  display: block;
}

@keyframes agent-rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes agent-breathe {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes agent-pulse {
  100% {
    box-shadow: 0 0 0 13px rgba(245, 165, 36, 0);
  }
}

@media (max-width: 620px) {
  .agent-pop-launcher {
    left: auto;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 11px 13px;
    font-size: 0.88rem;
    box-shadow: 0 7px 0 #741700, 0 14px 28px rgba(21, 17, 13, 0.24);
  }

  .agent-pop-panel {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .agent-pop-frame,
  .agent-pop-frame iframe {
    height: min(460px, calc(100vh - 230px));
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-pop-launcher.is-visible,
  .agent-pop-launcher .agent-dot {
    animation: none;
    transform: none;
    opacity: 1;
  }
}
