/* ==========================================
   PWLI STICKY CTA WIDGET
   Multi-step conversion funnel
   ========================================== */

/* ─── TRIGGER BUTTON ──────────────────────── */
.pwli-cta-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--teal), #5bb8bc);
  color: var(--navy);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  box-shadow:
    0 4px 20px rgba(107, 201, 205, 0.4),
    0 8px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.pwli-cta-trigger:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 6px 28px rgba(107, 201, 205, 0.5),
    0 12px 48px rgba(0, 0, 0, 0.35);
}

.pwli-cta-trigger svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.pwli-cta-trigger-label {
  white-space: nowrap;
}

/* Pulse animation */
.pwli-cta-trigger-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 100px;
  border: 2px solid rgba(107, 201, 205, 0.5);
  animation: pwliPulse 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes pwliPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* Collapse to icon on small screens */
@media (max-width: 480px) {
  .pwli-cta-trigger {
    padding: 14px;
    bottom: 16px;
    right: 16px;
  }
  .pwli-cta-trigger-label { display: none; }
}

/* ─── OVERLAY ─────────────────────────────── */
.pwli-cta-overlay {
  position: fixed;
  inset: 0;
  z-index: 200001;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwli-cta-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── MODAL ───────────────────────────────── */
.pwli-cta-modal {
  position: relative;
  width: 90%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #141d2f, #0e1525);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s ease;
}

.pwli-cta-overlay.open .pwli-cta-modal {
  transform: translateY(0) scale(1);
}

/* Close button */
.pwli-cta-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  color: var(--white-50);
  transition: all 0.2s ease;
  z-index: 2;
}

.pwli-cta-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.pwli-cta-close svg {
  width: 16px;
  height: 16px;
}

/* ─── PROGRESS BAR ────────────────────────── */
.pwli-cta-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.pwli-cta-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--pink));
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ─── STEPS ───────────────────────────────── */
.pwli-cta-step {
  display: none;
  padding: 32px 28px 28px;
}

.pwli-cta-step.active {
  display: block;
  animation: pwliStepIn 0.3s ease;
}

@keyframes pwliStepIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Step header */
.pwli-cta-step-header {
  margin-bottom: 24px;
  position: relative;
}

.pwli-cta-step-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.3;
}

.pwli-cta-step-header p {
  font-size: 0.875rem;
  color: var(--white-50);
  margin: 0;
  line-height: 1.5;
}

/* Back button */
.pwli-cta-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  color: var(--white-50);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.pwli-cta-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.pwli-cta-back svg {
  width: 16px;
  height: 16px;
}

/* ─── PATH CARDS (Step 1 & 3) ─────────────── */
.pwli-cta-paths {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwli-cta-path {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--white);
  transition: all 0.2s ease;
}

.pwli-cta-path:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.pwli-cta-path-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(107, 201, 205, 0.12);
}

.pwli-cta-path-icon.teal { background: rgba(107, 201, 205, 0.12); }
.pwli-cta-path-icon.teal svg { color: var(--teal); }
.pwli-cta-path-icon.pink { background: rgba(237, 110, 160, 0.12); }
.pwli-cta-path-icon.pink svg { color: var(--pink); }

.pwli-cta-path-icon svg {
  width: 22px;
  height: 22px;
}

.pwli-cta-path-text {
  flex: 1;
  min-width: 0;
}

.pwli-cta-path-text strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.pwli-cta-path-text span {
  font-size: 0.8125rem;
  color: var(--white-50);
  line-height: 1.4;
}

.pwli-cta-path-arrow {
  width: 18px;
  height: 18px;
  color: var(--white-30);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pwli-cta-path:hover .pwli-cta-path-arrow {
  transform: translateX(3px);
  color: var(--white-50);
}

/* ─── FORM (Step 2) ───────────────────────── */
.pwli-cta-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pwli-cta-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white-50);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.pwli-cta-field input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--white);
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pwli-cta-field input::placeholder {
  color: var(--white-30);
}

.pwli-cta-field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(107, 201, 205, 0.15);
}

.pwli-cta-field input.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* Submit / Continue button */
.pwli-cta-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--teal), #5bb8bc);
  color: var(--navy);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.pwli-cta-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(107, 201, 205, 0.3);
}

.pwli-cta-submit svg {
  width: 18px;
  height: 18px;
}

.pwli-cta-submit.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-70);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pwli-cta-submit.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  box-shadow: none;
}

/* ─── CONFIRMATION (Step 4) ───────────────── */
.pwli-cta-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(107, 201, 205, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.pwli-cta-confirm-icon svg {
  width: 28px;
  height: 28px;
  color: var(--teal);
}

[data-step="4"] .pwli-cta-step-header {
  text-align: center;
}

.pwli-cta-confirm-detail {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.pwli-cta-confirm-item {
  font-size: 0.875rem;
  color: var(--white-70);
  padding: 6px 0;
}

.pwli-cta-confirm-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pwli-cta-confirm-item strong {
  color: var(--white-50);
  font-weight: 600;
  margin-right: 8px;
}

.pwli-cta-confirm-note {
  font-size: 0.8125rem;
  color: var(--white-40);
}

.pwli-cta-confirm-note a {
  color: var(--teal);
  text-decoration: underline;
}

/* ─── HIDE TRIGGER WHEN MODAL OPEN ─────────── */
.pwli-cta-overlay.open ~ .pwli-cta-trigger,
body:has(.pwli-cta-overlay.open) .pwli-cta-trigger {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

/* ==========================================
   CONSENT CHECKBOX
   ========================================== */
.pwli-cta-consent {
  margin: 8px 0 16px;
}

.pwli-cta-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.6875rem;
  color: var(--white-40);
  line-height: 1.5;
}

.pwli-cta-consent input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--white-20);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: all 0.2s;
}

.pwli-cta-consent input[type="checkbox"]:checked {
  background: var(--teal);
  border-color: var(--teal);
}

.pwli-cta-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--navy);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pwli-cta-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pwli-cta-submit:disabled:hover {
  transform: none;
  box-shadow: none;
}
