/* custom-styles.css */

:root {
  /* Redefinindo variáveis HSL de base para algo super limpo, sério e elegante (spa/clínica de luxo) */
  /* Fundo de linho marfim muito sofisticado */
  --background: 34 25% 98%; 
  --foreground: 220 15% 15%; /* Cinza-grafite escuro para máximo contraste e seriedade */
  
  --card: 0 0% 100%;
  --card-foreground: 220 15% 15%;
  
  /* Cor primária: Tom Ameixa/Vinho de autoridade, sofisticado e maduro */
  --primary: 343 45% 42%; 
  --primary-foreground: 0 0% 100%;
  
  --muted: 220 14% 95%;
  --muted-foreground: 220 9% 45%;
  
  --border: 220 10% 90%;
  --ring: 343 45% 42%;
  --radius: 1rem; /* Bordas arredondadas e limpas na medida certa */
}

/* Fundo com efeito de spa de alto padrão (soft marfim com gradiente radial sutil) */
body {
  background-color: #faf8f6 !important;
  background-image: 
    radial-gradient(circle at 0% 0%, #ffffff 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, #f7f3ee 0%, transparent 60%),
    radial-gradient(circle at 50% 100%, #f3ece4 0%, transparent 50%) !important;
  background-attachment: fixed !important;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  font-family: 'Inter', sans-serif !important;
  overflow-x: hidden !important;
}

/* Tipografia de Marca Séria (Editorial de Saúde) */
h1, h2, h3, .brand-title, .hdr-logo {
  font-family: 'Playfair Display', serif !important;
  font-weight: 700 !important;
}

body, p, span, button, input, label, li {
  font-family: 'Inter', sans-serif !important;
}

/* Efeito Glassmorphism nos cards de perguntas e no container principal */
main, .container, .min-h-screen {
  background: transparent !important;
}

/* Transições elegantes globais */
* {
  transition: background-color 0.2s ease-in-out,
              border-color 0.25s ease-in-out,
              box-shadow 0.25s ease-in-out,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Injetar o selo dinâmico de marca clínica acima de cada H1 de pergunta */
h1::before {
  content: "ATLAS METHOD • AVALIAÇÃO DE SAÚDE" !important;
  display: block !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
  color: hsl(var(--primary)) !important;
  margin-bottom: 0.75rem !important;
  text-transform: uppercase !important;
  text-align: center !important;
}

/* Exceção para o H1 da página de vendas para não conflitar com outros selos */
main h1[class*="text-2xl"]::before,
main h1[class*="text-3xl"]::before {
  content: "PROTOCOLO PERSONALIZADO" !important;
}

/* Injetar nota de rodapé de segurança e ética de dados */
main::after {
  content: "🔒 Protocolo em conformidade com as diretrizes de proteção de dados. Suas respostas são sigilosas e usadas apenas para modelagem do seu plano de calistenia." !important;
  display: block !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important;
  color: #787a82 !important;
  text-align: center !important;
  margin-top: 2rem !important;
  line-height: 1.5 !important;
  max-width: 380px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 1rem !important;
}

/* Sobrescrever botões de opção do Quiz */
button[class*="bg-[#f5f5f5]"], 
.option-btn, 
button.w-full[class*="rounded-xl"] {
  background-color: #ffffff !important;
  border: 1px solid rgba(125, 46, 64, 0.08) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.015) !important;
  border-radius: 0.75rem !important;
  color: #1e2025 !important;
  font-weight: 500 !important;
  position: relative !important;
  overflow: hidden !important;
  padding: 1.1rem 1.5rem !important;
}

/* Hover e interações nos botões de opções */
button[class*="bg-[#f5f5f5]"]:hover, 
.option-btn:hover,
button.w-full[class*="rounded-xl"]:hover {
  background-color: #ffffff !important;
  border-color: hsl(var(--primary)) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 16px rgba(125, 46, 64, 0.06) !important;
}

button[class*="bg-[#f5f5f5]"]:active,
.option-btn:active,
button.w-full[class*="rounded-xl"]:active {
  transform: translateY(0) scale(0.99) !important;
}

/* Ícone de seta dentro dos botões */
button[class*="bg-[#f5f5f5]"] svg,
button.w-full[class*="rounded-xl"] svg {
  color: hsl(var(--primary)) !important;
  transition: transform 0.2s ease !important;
}

button[class*="bg-[#f5f5f5]"]:hover svg,
button.w-full[class*="rounded-xl"]:hover svg {
  transform: translateX(4px) !important;
}

/* Botões Principais ("Continuar", "Acessar meu plano", etc.) */
button.bg-primary, 
.main-btn, 
button[class*="bg-primary"],
a[class*="bg-primary"] {
  background: linear-gradient(135deg, hsl(343, 45%, 45%) 0%, hsl(330, 45%, 35%) 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 0.75rem !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(125, 46, 64, 0.2) !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  font-size: 0.95rem !important;
  padding: 1.1rem 2rem !important;
}

button.bg-primary:hover,
.main-btn:hover,
button[class*="bg-primary"]:hover,
a[class*="bg-primary"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 25px rgba(125, 46, 64, 0.3) !important;
  filter: brightness(1.08) !important;
}

/* Barra de Progresso Customizada e Estilizada */
div[class*="h-1.5 bg-muted"], 
.progress-bar-container,
div[class*="bg-progress-bg"] {
  background-color: rgba(125, 46, 64, 0.08) !important;
  height: 6px !important;
  border-radius: 999px !important;
}

div[class*="bg-primary"][style*="width"], 
.progress-bar,
div[class*="bg-progress-fill"] {
  background: linear-gradient(90deg, hsl(343, 45%, 45%) 0%, hsl(330, 45%, 35%) 100%) !important;
  height: 100% !important;
  border-radius: 999px !important;
  position: relative !important;
  box-shadow: 0 0 10px rgba(125, 46, 64, 0.3) !important;
}

/* Efeito de brilho pulsar na ponta da barra de progresso */
div[class*="bg-primary"][style*="width"]::after,
div[class*="bg-progress-fill"]::after {
  content: "" !important;
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translate(50%, -50%) !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background-color: #ffffff !important;
  border: 3px solid hsl(var(--primary)) !important;
  box-shadow: 0 0 8px rgba(125, 46, 64, 0.6) !important;
  animation: pulse-glow 1.5s infinite alternate !important;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 4px rgba(125, 46, 64, 0.4); }
  100% { box-shadow: 0 0 12px rgba(125, 46, 64, 0.8); }
}

/* Header estilizado */
header.hdr, header[class*="border-b"] {
  background: rgba(250, 248, 246, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(125, 46, 64, 0.08) !important;
  padding: 1rem !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01) !important;
}

.hdr-logo {
  font-size: 1.6rem !important;
  color: hsl(var(--primary)) !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(135deg, hsl(343, 45%, 42%) 0%, hsl(330, 45%, 30%) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.hdr-badge {
  background-color: rgba(125, 46, 64, 0.05) !important;
  color: hsl(var(--primary)) !important;
  font-weight: 700 !important;
  border: 1px solid rgba(125, 46, 64, 0.08) !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.05em !important;
  border-radius: 4px !important;
}

/* Layout das Páginas e Imagens */
.hero-img, img[src*="asian-woman-fitness.webp"] {
  filter: drop-shadow(0 15px 35px rgba(125, 46, 64, 0.12)) !important;
  animation: float-img 6s ease-in-out infinite !important;
}

@keyframes float-img {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(0.5deg); }
}

/* Efeito de cards informativos elegantes */
div[class*="bg-card"], 
div[class*="rounded-2xl"][class*="border"] {
  background: #ffffff !important;
  border: 1px solid rgba(125, 46, 64, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015) !important;
  border-radius: 1rem !important;
}

/* Ajustes nos Títulos e Subtítulos */
h1 {
  letter-spacing: -0.01em !important;
  color: #1e2025 !important;
  line-height: 1.3 !important;
}

.title h1 span.hl, h1 span.text-primary, span[class*="text-primary"] {
  color: hsl(var(--primary)) !important;
}

/* Loader customizado */
.spinner, div[class*="animate-spin"] {
  border: 3px solid rgba(125, 46, 64, 0.08) !important;
  border-top: 3px solid hsl(var(--primary)) !important;
  border-radius: 50% !important;
  width: 55px !important;
  height: 55px !important;
  animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite !important;
}

/* ========================================== */
/* CORREÇÃO DO SWITCH DE RADIX (PASSO 7)      */
/* ========================================== */

/* Botão do Switch Radix inativo */
button[role="switch"] {
  background-color: #cbd5e1 !important; /* Cinza para inativo */
  position: relative !important;
  width: 44px !important;
  height: 24px !important;
  border-radius: 9999px !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  padding: 0 !important;
  outline: none !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Botão do Switch Radix ativo (checked) */
button[role="switch"][data-state="checked"] {
  background-color: hsl(var(--primary)) !important; /* Cor Vinho/Ameixa ativa */
}

/* A bolinha deslizante interna (knob/thumb) */
button[role="switch"] span {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background-color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  position: absolute !important;
  left: 2px !important;
  top: 2px !important;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1) !important;
  transform: translateX(0) !important;
}

/* Deslocar a bolinha quando ativo */
button[role="switch"][data-state="checked"] span {
  transform: translateX(20px) !important;
}

/* Correção de tamanho de texto de "Melhorar o corpo inteiro" */
span[class*="text-foreground"] {
  color: #1e2025 !important;
}

/* ============================================================ */
/* PLANOS DE PREÇO LADO A LADO – Destaque no Plano Premium      */
/* ============================================================ */

/* Container dos dois planos: de vertical para horizontal */
.space-y-4.mb-6.text-left {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.875rem !important;
  align-items: stretch !important;
  space-y: 0 !important;
  padding-top: 1.2rem !important; /* Espaço para o badge flutuante */
}

/* Cada card de plano: ocupa metade do espaço, flex col */
.space-y-4.mb-6.text-left > div {
  flex: 1 1 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  /* Transição suave para transform e box-shadow */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease !important;
  cursor: pointer !important;
}

/* ==== PLANO ESSENCIAL (R$37,90) – visual base limpo e discreto ==== */
.space-y-4.mb-6.text-left > div:first-child {
  background: #ffffff !important;
  border: 1.5px solid rgba(125, 46, 64, 0.18) !important;
  border-radius: 1rem !important;
  padding: 1rem !important;
  opacity: 0.88 !important;
  transform: scale(1) !important;
}

/* ==== PLANO VIP (R$77,00) – destaque base: ligeiramente maior ==== */
.space-y-4.mb-6.text-left > div:last-child {
  background: linear-gradient(145deg, #f9f2f4 0%, #fff5f7 100%) !important;
  border: 2.5px solid hsl(343, 45%, 42%) !important;
  border-radius: 1rem !important;
  padding: 1rem !important;
  box-shadow: 
    0 6px 20px rgba(125, 46, 64, 0.14),
    0 2px 6px rgba(125, 46, 64, 0.08) !important;
  transform: scale(1.02) !important;
  z-index: 2 !important;
  opacity: 1 !important;
}

/* ==== ESTADO SELECIONADO: qualquer card com shadow-md (classe React ativa) ==== */
/* Zoom + Glow border pulsante na cor vinho */
@keyframes plan-glow-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(125, 46, 64, 0), 0 8px 28px rgba(125, 46, 64, 0.22), 0 0 16px rgba(125, 46, 64, 0.28); }
  50%  { box-shadow: 0 0 0 4px rgba(125, 46, 64, 0.18), 0 10px 32px rgba(125, 46, 64, 0.28), 0 0 24px rgba(125, 46, 64, 0.42); }
  100% { box-shadow: 0 0 0 0 rgba(125, 46, 64, 0), 0 8px 28px rgba(125, 46, 64, 0.22), 0 0 16px rgba(125, 46, 64, 0.28); }
}

.space-y-4.mb-6.text-left > div[class*="shadow-md"] {
  transform: scale(1.07) !important;
  z-index: 5 !important;
  border-color: hsl(343, 45%, 42%) !important;
  border-width: 2.5px !important;
  opacity: 1 !important;
  animation: plan-glow-pulse 1.8s ease-in-out infinite !important;
  /* Override da transition global para não bloquear a animação */
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease !important;
}

/* O Essencial selecionado: glow vinho claro */
.space-y-4.mb-6.text-left > div:first-child[class*="shadow-md"] {
  background: linear-gradient(145deg, #fff8f9 0%, #fff 100%) !important;
}

/* O VIP selecionado: glow mais intenso e escala maior */
.space-y-4.mb-6.text-left > div:last-child[class*="shadow-md"] {
  transform: scale(1.08) !important;
}

/* Pseudo-badge "MAIS POPULAR" acima do card VIP */
.space-y-4.mb-6.text-left > div:last-child::before {
  content: "⭐ MAIS POPULAR" !important;
  position: absolute !important;
  top: -14px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: linear-gradient(135deg, hsl(343, 45%, 42%) 0%, hsl(330, 50%, 30%) 100%) !important;
  color: #ffffff !important;
  font-size: 0.6rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 8px rgba(125, 46, 64, 0.3) !important;
  z-index: 10 !important;
  font-family: 'Inter', sans-serif !important;
}

/* Preço do plano VIP mais destacado */
.space-y-4.mb-6.text-left > div:last-child span[class*="font-black"] {
  font-size: 1.4rem !important;
  color: hsl(343, 45%, 42%) !important;
}

/* Nome do plano VIP em destaque */
.space-y-4.mb-6.text-left > div:last-child span[class*="font-bold text-base"] {
  color: hsl(343, 45%, 42%) !important;
  font-size: 0.9rem !important;
}

/* Nome do plano Essencial menor */
.space-y-4.mb-6.text-left > div:first-child span[class*="font-bold text-base"] {
  font-size: 0.9rem !important;
}

/* Items da lista do plano VIP - mais visíveis */
.space-y-4.mb-6.text-left > div:last-child ul li {
  color: #2d1a20 !important;
  font-weight: 600 !important;
}

/* Badge RECOMENDADO dentro do card VIP */
.space-y-4.mb-6.text-left > div:last-child span[class*="bg-primary/10"] {
  background: hsl(343, 45%, 42%) !important;
  color: white !important;
  font-size: 0.55rem !important;
}

/* Adaptação para mobile: volta para coluna em telas muito pequenas */
@media (max-width: 380px) {
  .space-y-4.mb-6.text-left {
    flex-direction: column !important;
  }
  .space-y-4.mb-6.text-left > div:last-child {
    transform: scale(1) !important;
    margin-top: 1.5rem !important;
  }
}
