/* ═══════════════════════════════════════════════════════
   SanCal — Popup Relatório SEO
   Fiel ao design system do tema: #07090e, cyan #00d4ff,
   purple #6c5ce7, Syne + DM Sans, orbs, grid
═══════════════════════════════════════════════════════ */

/* ─── OVERLAY ─── */
#sancalpop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#sancalpop-overlay.sancalpop-open {
  opacity: 1;
  visibility: visible;
}

/* ─── MODAL ─── */
#sancalpop-modal {
  position: relative;
  background: #0c0f18;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: 52px 48px 40px;
  max-width: 520px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.08),
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(108, 92, 231, 0.12);
  transform: translateY(32px) scale(0.97);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'DM Sans', sans-serif;
  color: #eef0f8;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,.2) transparent;
}

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

/* ─── DECORATIVOS ─── */
.sancalpop-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.sancalpop-orb1 {
  width: 360px; height: 360px;
  background: rgba(108, 92, 231, 0.18);
  top: -120px; left: -120px;
  animation: sancalpop-ob1 9s ease-in-out infinite;
}
.sancalpop-orb2 {
  width: 280px; height: 280px;
  background: rgba(0, 212, 255, 0.12);
  bottom: -100px; right: -80px;
  animation: sancalpop-ob2 11s ease-in-out infinite;
}
@keyframes sancalpop-ob1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(20px,20px)} }
@keyframes sancalpop-ob2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-15px,-15px)} }

.sancalpop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
  z-index: 0;
  border-radius: 24px;
}

/* Tudo dentro do modal acima dos orbs */
#sancalpop-modal > *:not(.sancalpop-orb):not(.sancalpop-grid) {
  position: relative;
  z-index: 1;
}

/* ─── FECHAR ─── */
#sancalpop-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #68718f;
  transition: all 0.25s ease;
  z-index: 10;
}
#sancalpop-close:hover {
  background: rgba(255,255,255,0.12);
  color: #eef0f8;
  transform: rotate(90deg);
}

/* ─── BADGE ─── */
.sancalpop-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #00d4ff;
  margin-bottom: 18px;
}

/* ─── PULSE DOT ─── */
.sancalpop-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  background: #00e676;
  border-radius: 50%;
  animation: sancalpop-blink 2s infinite;
}
@keyframes sancalpop-blink {
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.4;transform:scale(1.8)}
}

/* ─── ÍCONE ─── */
.sancalpop-icon-wrap {
  margin: 0 auto 20px;
  width: 72px; height: 72px;
}
.sancalpop-icon-svg {
  width: 72px; height: 72px;
  filter: drop-shadow(0 8px 24px rgba(108,92,231,.4));
}

/* ─── TÍTULOS ─── */
.sancalpop-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  background: linear-gradient(130deg, #00d4ff, #6c5ce7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px;
}

.sancalpop-subtitle {
  color: #68718f;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 24px;
  font-weight: 300;
}

/* ─── PROGRESS ─── */
.sancalpop-progress-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  margin-bottom: 6px;
  overflow: hidden;
}
.sancalpop-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6c5ce7, #00d4ff);
  border-radius: 100px;
  width: 25%;
  transition: width 0.4s ease;
}
.sancalpop-steps-label {
  font-size: 0.72rem;
  color: #68718f;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ─── STEPS ─── */
.sancalpop-step {
  display: none;
  text-align: left;
  animation: sancalpop-fadein 0.3s ease;
}
.sancalpop-step.active {
  display: block;
}
@keyframes sancalpop-fadein {
  from { opacity:0; transform: translateX(16px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ─── LABELS & INPUTS ─── */
.sancalpop-label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #eef0f8;
  margin-bottom: 10px;
}

.sancalpop-input {
  width: 100%;
  background: #111622;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: #eef0f8;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}
.sancalpop-input::placeholder { color: #68718f; }
.sancalpop-input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 0 3px rgba(0,212,255,.12);
}
.sancalpop-input.sancalpop-invalid {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255,71,87,.12);
}

.sancalpop-hint {
  font-size: 0.8rem;
  color: #68718f;
  margin: 8px 0 0;
}

/* ─── ERRO ─── */
.sancalpop-error {
  color: #ff4757;
  font-size: 0.85rem;
  margin: 8px 0 0;
  padding: 10px 14px;
  background: rgba(255,71,87,.08);
  border: 1px solid rgba(255,71,87,.2);
  border-radius: 8px;
}

/* ─── NAV BOTÕES ─── */
.sancalpop-nav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  align-items: center;
}

.sancalpop-btn-prev {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: #68718f;
  border-radius: 12px;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}
.sancalpop-btn-prev:hover {
  border-color: rgba(255,255,255,0.25);
  color: #eef0f8;
}

.sancalpop-btn-next,
.sancalpop-btn-submit {
  flex: 1;
  background: linear-gradient(130deg, #00d4ff, #6c5ce7);
  color: #07090e;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sancalpop-btn-next:hover,
.sancalpop-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,212,255,.28);
}
.sancalpop-btn-next:disabled,
.sancalpop-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─── SPINNER ─── */
.sancalpop-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(7,9,14,0.3);
  border-top-color: #07090e;
  border-radius: 50%;
  animation: sancalpop-spin 0.7s linear infinite;
}
@keyframes sancalpop-spin { to { transform: rotate(360deg); } }

/* ─── SUCESSO ─── */
#sancalpop-success {
  animation: sancalpop-fadein 0.4s ease;
}
.sancalpop-success-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: sancalpop-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sancalpop-pop {
  from { transform: scale(0.4); opacity:0; }
  to   { transform: scale(1);   opacity:1; }
}
.sancalpop-success-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #eef0f8;
  margin: 0 0 10px;
}
.sancalpop-success-msg {
  color: #68718f;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ─── BENEFÍCIOS ─── */
.sancalpop-benefits {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem;
  color: #68718f;
  font-weight: 500;
}
.sancalpop-benefits span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── RESPONSIVO ─── */
@media (max-width: 560px) {
  #sancalpop-modal {
    padding: 40px 24px 32px;
    border-radius: 20px;
  }
  .sancalpop-title {
    font-size: 1.3rem;
  }
  .sancalpop-benefits {
    gap: 10px;
    font-size: 0.72rem;
  }
  .sancalpop-nav {
    flex-direction: column;
  }
  .sancalpop-btn-prev {
    width: 100%;
    order: 2;
  }
}
