/* =========================================================================
   ESTILOS PERSONALIZADOS: CHEF & FIT (PWA)
   Paleta: Off-White (#FBFBFB), Terracota (#E07A5F), Verde Sálvia (#588157)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --bg-primary: #FBFBFB;
  --card-bg: #FFFFFF;
  --accent-terracotta: #E07A5F;
  --accent-terracotta-light: #F4D3C9;
  --accent-terracotta-dark: #C85D42;
  --accent-sage: #588157;
  --accent-sage-light: #DCE5DD;
  --text-main: #2B2D42;
  --text-muted: #6C757D;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.font-serif-heading {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Scrollbar sutil e elegante */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #E2E8F0;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #CBD5E1;
}

/* Copos de Água Interativos */
.water-cup {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.water-cup.filled {
  background-color: #E0F2FE !important;
  border-color: #38BDF8 !important;
  color: #0284C7 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}
.water-cup.filled svg {
  fill: #38BDF8;
  stroke: #0284C7;
}

/* Efeito de Pulso no Timer HIIT */
@keyframes pulse-ring {
  0% { transform: scale(0.97); opacity: 0.8; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(0.97); opacity: 0.8; }
}

.timer-active-work {
  animation: pulse-ring 2s infinite ease-in-out;
  border-color: var(--accent-terracotta) !important;
  color: var(--accent-terracotta) !important;
}

.timer-active-rest {
  animation: pulse-ring 2s infinite ease-in-out;
  border-color: var(--accent-sage) !important;
  color: var(--accent-sage) !important;
}

/* Animações suaves de transição de abas */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}
.tab-pane.active {
  display: block;
}

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

/* Badge de Check no Desafio 21 Dias */
.challenge-card {
  transition: all 0.2s ease;
}
.challenge-card.completed {
  border-color: var(--accent-sage);
  background-color: #F4F7F4;
}
.challenge-card.completed .check-indicator {
  background-color: var(--accent-sage);
  color: white;
}

/* =========================================================================
   TRAVA DE ACESSO: nada do app aparece antes da validação da assinatura
   ========================================================================= */
body.pvl-locked > *:not(#pvl-gate):not(#pvl-cookie-banner):not(script) {
  display: none !important;
}
body.pvl-locked { overflow: hidden; }

/* Estado desabilitado dos botões */
button:disabled { cursor: not-allowed; opacity: 0.6; }

/* Foco visível (acessibilidade / teclado) */
:focus-visible {
  outline: 2px solid var(--accent-terracotta);
  outline-offset: 2px;
}

/* Respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Páginas legais (Privacidade / Termos) */
.legal h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.25rem; }
.legal h2 { font-size: 1.05rem; font-weight: 800; margin-top: 1.75rem; margin-bottom: 0.5rem; color: #2B2D42; }
.legal p, .legal li, .legal td, .legal th { font-size: 0.875rem; line-height: 1.65; color: #475569; }
.legal p { margin-bottom: 0.75rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.75rem; }
.legal li { margin-bottom: 0.35rem; }
.legal a { color: var(--accent-terracotta); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.legal th, .legal td { border: 1px solid #e2e8f0; padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
.legal th { background: #f8fafc; color: #2B2D42; font-weight: 700; }
.legal-meta { font-size: 0.75rem !important; color: #94a3b8 !important; margin-bottom: 1.25rem !important; }
