/* ══════════════════════════════════════════════════════════════
   EDUCAFUTURO PRO — Quota Popup v4.0.0
   Design: Hero message + compact quotas + animated PRO CTA
══════════════════════════════════════════════════════════════ */

/* ── Overlay ────────────────────────────────────────────────── */
#gpa-quota-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
#gpa-quota-overlay.gpa-qp-visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal ──────────────────────────────────────────────────── */
#gpa-quota-modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
#gpa-quota-overlay.gpa-qp-visible #gpa-quota-modal {
  transform: translateY(0) scale(1);
}

/* ── Close button ──────────────────────────────────────────── */
.gpa-qp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.06);
  border: none;
  border-radius: 50%;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  z-index: 2;
  padding: 0;
}
.gpa-qp-close:hover { background: rgba(0,0,0,0.1); color: #374151; }

/* ── Hero Section (frase principal GRANDE e CENTRALIZADA) ──── */
.gpa-qp-hero {
  text-align: center;
  padding: 36px 24px 20px;
}
.gpa-qp-hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: gpa-qp-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gpa-qp-hero-text {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

@keyframes gpa-qp-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Quotas (linhas simples e discretas) ────────────────────── */
.gpa-qp-quotas {
  padding: 0 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gpa-qp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.gpa-qp-row:last-child { border-bottom: none; }

.gpa-qp-row-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.gpa-qp-row-count {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.gpa-qp-row-count.gpa-qp-ok      { color: #16a34a; background: #f0fdf4; }
.gpa-qp-row-count.gpa-qp-warning  { color: #d97706; background: #fffbeb; }
.gpa-qp-row-count.gpa-qp-danger   { color: #dc2626; background: #fef2f2; }

/* Row ativa (cota usada agora) */
.gpa-qp-row-active {
  background: #f0f9ff;
  margin: 0 -24px;
  padding: 8px 24px;
  border-bottom-color: #bfdbfe;
}
.gpa-qp-row-active .gpa-qp-row-label {
  color: #1e40af;
  font-weight: 600;
}

/* ── Actions (botões) ──────────────────────────────────────── */
.gpa-qp-actions {
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Botão PRO — destaque com animação de brilho */
.gpa-qp-btn-pro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: -0.2px;
}
.gpa-qp-btn-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.45);
}

/* Shine animation no botão PRO */
.gpa-qp-btn-pro-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: gpa-qp-shine 2.5s ease-in-out infinite;
}

@keyframes gpa-qp-shine {
  0%   { left: -100%; }
  50%  { left: 120%; }
  100% { left: 120%; }
}

/* Botão continuar grátis — discreto */
.gpa-qp-btn-free {
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  color: #94a3b8;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}
.gpa-qp-btn-free:hover {
  color: #64748b;
}

/* ── Loading ───────────────────────────────────────────────── */
.gpa-qp-loading {
  text-align: center;
  padding: 16px;
  color: #94a3b8;
  font-size: 13px;
}
.gpa-qp-loading::after {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid #e5e7eb;
  border-top-color: #6d28d9;
  border-radius: 50%;
  animation: gpa-qp-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

@keyframes gpa-qp-spin {
  to { transform: rotate(360deg); }
}

/* ── Shake ──────────────────────────────────────────────────── */
@keyframes gpa-qp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.gpa-qp-shake { animation: gpa-qp-shake 0.4s ease; }

/* ── Mobile: bottom sheet ──────────────────────────────────── */
@media (max-width: 480px) {
  #gpa-quota-overlay {
    align-items: flex-end;
    padding: 0;
  }
  #gpa-quota-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  #gpa-quota-overlay.gpa-qp-visible #gpa-quota-modal {
    transform: translateY(0);
  }
}
