/* Floating live demo CTA — all prelogin pages */
.pl-live-demo {
  --pl-demo-accent: #6366f1;
  --pl-demo-accent2: #ec4899;
  --pl-demo-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 9000;
}

.pl-live-demo__fab {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100vw - 2rem);
  padding: 0.85rem 1.15rem 0.85rem 1rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 600 0.95rem/1.2 "Source Sans 3", system-ui, sans-serif;
  color: #fff;
  background: linear-gradient(135deg, var(--pl-demo-accent) 0%, var(--pl-demo-accent2) 100%);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45), 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pl-live-demo__fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.5), 0 6px 16px rgba(0, 0, 0, 0.18);
}

.pl-live-demo__fab-glow {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--pl-demo-accent), var(--pl-demo-accent2));
  opacity: 0.35;
  filter: blur(12px);
  z-index: -1;
  animation: pl-demo-pulse 2.4s ease-in-out infinite;
}

@keyframes pl-demo-pulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.06); }
}

.pl-live-demo__fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.65rem;
}

.pl-live-demo__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9001;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.pl-live-demo__backdrop[hidden],
.pl-live-demo__dialog[hidden] {
  display: none !important;
}

.pl-live-demo--open .pl-live-demo__backdrop {
  opacity: 1;
}

.pl-live-demo__dialog {
  position: fixed;
  inset: 0;
  z-index: 9002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
}

.pl-live-demo__dialog:not([hidden]) {
  display: flex;
  pointer-events: auto;
}

.pl-live-demo__panel {
  position: relative;
  width: min(100%, 42rem);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 1.65rem 1.75rem 1.5rem;
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: scale(0.92) translateY(1.25rem);
  transition:
    opacity 0.35s var(--pl-demo-ease),
    transform 0.4s var(--pl-demo-ease);
}

.pl-live-demo--open .pl-live-demo__panel {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pl-live-demo__backdrop,
  .pl-live-demo__panel {
    transition: none;
  }
  .pl-live-demo--open .pl-live-demo__panel {
    transform: none;
  }
}

.pl-live-demo__close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.65rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.pl-live-demo__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pl-demo-accent);
}

.pl-live-demo__head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
  color: #0f172a;
}

.pl-live-demo__lead {
  margin: 0 0 1.15rem;
  font-size: 0.95rem;
  color: #475569;
  max-width: 36rem;
}

.pl-live-demo__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.15rem;
}

.pl-live-demo__field {
  display: block;
  margin: 0;
  min-width: 0;
}

.pl-live-demo__field--full {
  grid-column: 1 / -1;
}

.pl-live-demo__field > span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.pl-live-demo__inline-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: #b91c1c;
}

.pl-live-demo__inline-error[hidden] {
  display: none !important;
}

.pl-live-demo__field input.pl-live-demo__input--invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.pl-live-demo__field input,
.pl-live-demo__field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font: inherit;
}

.pl-live-demo__field textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.pl-live-demo__req {
  color: #dc2626;
}

.pl-live-demo__submit {
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 0.55rem;
  font: 600 1rem/1.2 inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pl-demo-accent), var(--pl-demo-accent2));
}

.pl-live-demo__hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.pl-live-demo__success {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.92rem;
}

.pl-live-demo__error {
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .pl-live-demo__grid {
    grid-template-columns: 1fr;
  }
  .pl-live-demo__panel {
    width: min(100%, 26rem);
    padding: 1.35rem 1.15rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .pl-live-demo__fab {
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.75rem 0.95rem;
  }
  .pl-live-demo__fab-text {
    font-size: 0.88rem;
  }
}
