/* ==========================================================================
   ESTILO APPLE - REDIRECIONAMENTO WHATSAPP
   Design Limpo, Fundo Branco, Mobile-First & Alta Conversão
   ========================================================================== */

:root {
  --apple-bg: #f5f5f7;
  --card-bg: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-disclaimer: #515154;
  --wpp-green: #25d366;
  --wpp-green-hover: #20bd5a;
  --wpp-green-glow: rgba(37, 211, 102, 0.35);
  --apple-blue: #0071e3;
  --apple-border: rgba(0, 0, 0, 0.08);
  --danger-color: #ff3b30;
  --danger-bg: rgba(255, 59, 48, 0.08);
  
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-stack);
  background-color: var(--apple-bg);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  overflow-x: hidden;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  width: 100%;
}

/* Fundo Iluminado Sutil Estilo Apple */
.background-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.07) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Container Principal */
.page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* Card Apple Minimalista */
.card {
  background: var(--card-bg);
  border-radius: 28px;
  padding: 40px 28px 32px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08),
              0 1px 3px rgba(0, 0, 0, 0.04),
              0 0 0 1px var(--apple-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition-smooth);
}

/* Ícone de Destaque */
.icon-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.icon-bubble {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(145deg, #2ae06d, #20bd5a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px -6px var(--wpp-green-glow),
              0 2px 6px rgba(0, 0, 0, 0.04);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.card:hover .icon-bubble {
  transform: translateY(-2px) scale(1.02);
}

.wpp-icon {
  width: 44px;
  height: 44px;
  color: #ffffff;
}

/* Badge de Status Ativo */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  background: rgba(37, 211, 102, 0.12);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #128c40;
  letter-spacing: -0.01em;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--wpp-green);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.3);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Tipografia */
.content-header {
  margin-bottom: 28px;
}

.main-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 320px;
  margin: 0 auto;
}

/* Área de Ação */
.action-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Botão de Ação CTA Apple */
.cta-button {
  width: 100%;
  height: 58px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, #27dc6a 0%, #1fbe5b 100%);
  color: #ffffff;
  font-family: var(--font-stack);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 10px 24px -4px var(--wpp-green-glow),
              0 2px 4px rgba(0, 0, 0, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: var(--transition-smooth);
  user-select: none;
  outline: none;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-text {
  letter-spacing: 0.02em;
}

.btn-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.cta-button:hover .btn-arrow {
  transform: translateX(3px);
}

.cta-button:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px -2px var(--wpp-green-glow);
}

/* Estado do Botão quando Desabilitado / Bloqueado */
.cta-button.is-locked {
  background: linear-gradient(180deg, #27dc6a 0%, #1fbe5b 100%);
  opacity: 0.72;
  filter: grayscale(15%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cta-button.is-locked:hover {
  opacity: 0.85;
}

/* Estado Ativo/Brilhante */
.cta-button.is-ready {
  opacity: 1;
  filter: none;
  box-shadow: 0 12px 28px -4px var(--wpp-green-glow),
              0 0 0 2px rgba(37, 211, 102, 0.25);
  animation: subtle-pulse 3s infinite ease-in-out;
}

@keyframes subtle-pulse {
  0%, 100% {
    box-shadow: 0 12px 28px -4px var(--wpp-green-glow), 0 0 0 2px rgba(37, 211, 102, 0.2);
  }
  50% {
    box-shadow: 0 16px 36px -2px rgba(37, 211, 102, 0.5), 0 0 0 4px rgba(37, 211, 102, 0.35);
  }
}

/* Spinner de Carregamento */
.btn-loader {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Checkbox de Consentimento */
.consent-container {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.consent-container.shake {
  animation: apple-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: var(--danger-color);
  background: var(--danger-bg);
}

@keyframes apple-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  user-select: none;
}

.custom-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Visual do Checkbox Apple */
.checkbox-visual {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 1.5px solid #c7c7cc;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: var(--transition-smooth);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.check-icon {
  width: 13px;
  height: 13px;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Estado Marcado */
.custom-checkbox:checked + .checkbox-visual {
  background: var(--wpp-green);
  border-color: var(--wpp-green);
}

.custom-checkbox:checked + .checkbox-visual .check-icon {
  opacity: 1;
  transform: scale(1);
}

/* Texto do Consentimento - Pequeno, mas perfeitamente legível */
.consent-text {
  font-size: 0.8125rem; /* ~13px */
  line-height: 1.4;
  color: var(--text-disclaimer);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Mensagem de Aviso */
.warning-msg {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--danger-bg);
  border-radius: 10px;
  color: var(--danger-color);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  animation: fadeIn 0.25s ease;
}

.warning-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.warning-msg.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Rodapé do Card */
.card-footer {
  margin-top: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lock-icon {
  width: 13px;
  height: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   OTIMIZAÇÕES MOBILE & RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 480px) {
  body {
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  }

  .card {
    padding: 32px 20px 24px;
    border-radius: 24px;
  }

  .icon-bubble {
    width: 68px;
    height: 68px;
    border-radius: 20px;
  }

  .wpp-icon {
    width: 38px;
    height: 38px;
  }

  .main-title {
    font-size: 1.45rem;
  }

  .subtitle {
    font-size: 0.88rem;
  }

  .cta-button {
    height: 54px;
    font-size: 0.98rem;
  }

  .consent-text {
    font-size: 0.78rem;
  }
}
