/* Bella V2 — Container das 4 portas + componentes comuns.
 * Cada porta é uma rota própria (router.js). Só a strip .active fica visível.
 */

.strips {
  display: block;
  height: 100%;
  width: 100%;
  position: relative;
}

.strip {
  position: absolute;
  inset: 0;
  display: none;
  -webkit-tap-highlight-color: transparent;
}
.strip.active {
  display: block;
  background: transparent; /* mostra paper-texture do body */
  z-index: 5;
}
.strip.active .strip-content {
  color: var(--foreground);
}

/* ─── Conteúdo da strip ativa ─── */
.strip-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* padding-bottom = nav fichário (~130px com safe-bottom). */
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 130px) 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--foreground);
}
.strip-content::-webkit-scrollbar { display: none; }
/* Quando porta-header presente: ele gerencia o safe-area via padding-top próprio. */
.strip-content:has(.porta-header) { padding-top: 0; }

/* ─── Porta tabs (estilo fichário — Lovable, 12/05/2026).
       Fade do papel acima + bg sólido atrás das abas. Cada aba é uma "filing-tab"
       com tape stripe colorida (cor da porta) e label handwritten. */
.porta-tabs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  pointer-events: none;
}

/* Fade superior — papel craft difumina antes da nav começar */
.porta-tabs-fade {
  height: 40px;
  margin-bottom: -1px;
  background: linear-gradient(to bottom, transparent, var(--background) 65%);
}

/* Container sólido — esconde o que tá por trás das abas */
.porta-tabs-bg {
  background: var(--background);
  padding: 4px 12px calc(8px + var(--safe-bottom));
  pointer-events: auto;
}

/* Lombada do caderno — linha tracejada acima das abas */
.porta-tabs-lombada {
  height: 6px;
  margin: 0 8px 0;
  border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(
    90deg,
    oklch(0.24 0.03 35 / 0.12) 0 6px,
    transparent 6px 12px
  );
}

.porta-tabs-list {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.porta-tab {
  flex: 1;
  position: relative;
  background: color-mix(in oklab, var(--card) 80%, var(--background));
  padding: 12px 6px 12px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border: 1px solid oklch(0.24 0.03 35 / 0.08);
  border-bottom: none;
  box-shadow: 0 -2px 6px oklch(0.24 0.03 35 / 0.08), 1px 0 0 oklch(0.24 0.03 35 / 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0.8;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  color: var(--muted-foreground);
  min-height: 56px;
}

/* Tape stripe colorida no topo de cada aba (cor da porta) */
.porta-tab::before {
  content: "";
  position: absolute;
  top: 4px; left: 8px; right: 8px;
  height: 3px;
  border-radius: 2px;
  opacity: 0.85;
  background: var(--terracotta);
}
.porta-tab[data-screen="hoje"]::before     { background: var(--terracotta); }
.porta-tab[data-screen="saude"]::before    { background: var(--sage); }
.porta-tab[data-screen="evolucao"]::before { background: var(--peach); }
.porta-tab[data-screen="mais"]::before     { background: var(--wine); }

.porta-tab .porta-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: var(--muted-foreground);
}
.porta-tab .porta-tab-label {
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1;
  color: var(--muted-foreground);
}

.porta-tab:not(.active):active { transform: translateY(2px) scale(0.985); }

/* Ativa: card cream + ícone colorido (cor da porta) + label escuro, sobe um pouco */
.porta-tab.active {
  background: var(--card);
  opacity: 1;
  transform: translateY(-6px);
  cursor: default;
  box-shadow: 0 -4px 10px oklch(0.24 0.03 35 / 0.10), 1px 0 0 oklch(0.24 0.03 35 / 0.05);
}
.porta-tab.active .porta-tab-label {
  color: var(--foreground);
  font-weight: 600;
}
.porta-tab[data-screen="hoje"].active     .porta-tab-icon { color: var(--terracotta); }
.porta-tab[data-screen="saude"].active    .porta-tab-icon { color: var(--sage); }
.porta-tab[data-screen="evolucao"].active .porta-tab-icon { color: var(--peach); }
.porta-tab[data-screen="mais"].active     .porta-tab-icon { color: var(--wine); }

/* ─── Conteúdo dentro da strip ativa: estilos editoriais ─── */
.sc-eyebrow {
  font-family: var(--font-script);
  font-size: 20px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 2px;
  line-height: 1;
}
.sc-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--cream);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}
.sc-title em { font-style: italic; opacity: 0.9; }

.sc-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin: 20px 0 10px;
}

/* Card translúcido sobre cor sólida da porta */
.sc-card {
  background: rgba(255, 250, 235, 0.16);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  margin-bottom: 8px;
  color: var(--cream);
  transition: transform 0.08s, background 0.2s;
}
.sc-card:active { transform: scale(0.985); background: rgba(255,250,235,0.22); }
.sc-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* CTA primário Scrapbook: pill terracota, lowercase, sem letter-spacing forçado */
.sc-cta {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.sc-cta:active { transform: scale(0.96); }

/* CTA outline: card cream com borda sutil, texto foreground italic */
.sc-cta-outline {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid oklch(0.24 0.03 35 / 0.12);
  box-shadow: var(--bella-shadow-card);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.sc-cta-outline:active { transform: translateY(1px); }

/* CTA ghost: link discreto italic muted */
.sc-cta-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sc-cta-ghost:hover { color: var(--foreground); }
.sc-cta-ghost.cuidando-danger { color: var(--destructive); }

/* Baby pill (chip do bebê no topo do conteúdo, alinhado à direita) */
.baby-pill-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.baby-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,250,235,0.22);
  padding: 7px 14px 7px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.baby-photo {
  width: 36px; height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, rgba(255,238,210,0.92) 0%, transparent 50%),
    linear-gradient(135deg, #C99B7E, #A87858);
  border: 1.5px solid var(--cream);
  flex-shrink: 0;
}
.baby-pill-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}
.baby-pill-text small {
  display: block;
  font-weight: 400;
  opacity: 0.78;
  font-size: 12px;
  margin-top: 2px;
}

/* ─── Bella FAB (Assistente IA) ───
 * Pill dentro do porta-header (flex item). Sem position:fixed. */
.bella-fab {
  height: 40px;
  padding: 3px 14px 3px 4px;
  border-radius: 100px;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid color-mix(in oklab, var(--terracotta) 22%, var(--card));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,92,53,0.16);
  transition: transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.bella-fab:active { transform: scale(0.95); }
.bella-fab-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}
.bella-fab-label {
  font-family: var(--font-hand);
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  padding-right: 2px;
}

/* Time slot (horário dentro de card) */
.sc-time {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}
.sc-name {
  font-size: 15px;
  font-weight: 600;
  margin-top: 3px;
}
.sc-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  margin-top: 2px;
}

/* Empty/loading states dentro da strip */
.sc-empty {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  padding: 16px 0;
  text-align: center;
  font-style: italic;
}

/* ─── Tour de boas-vindas (coach-marks) — features/tour.js ─────────────────── */
.v2-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 800; /* acima do app, abaixo dos modais (~1000) */
  pointer-events: auto; /* bloqueia toques no app durante o tour */
}
.v2-tour-spot {
  position: absolute;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px oklch(0.18 0.03 35 / 0.62);
  transition: left 0.28s ease, top 0.28s ease, width 0.28s ease, height 0.28s ease, opacity 0.2s;
  pointer-events: none;
}
.v2-tour-balloon {
  position: absolute;
  width: min(280px, calc(100vw - 24px));
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-note);
  padding: 16px 16px 14px;
  transition: left 0.24s ease, top 0.24s ease;
}
.v2-tour-skip {
  position: absolute;
  top: 10px; right: 12px;
  border: none; background: transparent;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted-foreground);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.v2-tour-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--terracotta);
  margin: 0 36px 6px 0;
  line-height: 1.2;
}
.v2-tour-text {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.45;
  color: var(--foreground);
  margin: 0;
}
.v2-tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.v2-tour-dots { display: flex; gap: 6px; }
.v2-tour-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in oklab, var(--muted-foreground) 40%, transparent);
}
.v2-tour-dot.is-on { background: var(--terracotta); }
.v2-tour-next {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--terracotta-foreground);
  background: var(--terracotta);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: transform 0.12s;
}
.v2-tour-next:active { transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  .v2-tour-spot, .v2-tour-balloon { transition: none; }
}
