/* Bella V2 — Sub-tabs estilo filing-tab (Scrapbook, Lovable 12/05/2026).
 * Cada tab é uma aba de fichário com tape stripe colorida + ícone + label handwritten.
 */

.subtab-nav-wrap {
  margin: 18px 0 0;
  overflow-x: hidden; /* 4 abas cabem na largura — sem scroll/deslize lateral */
  scrollbar-width: none;
}
.subtab-nav-wrap::-webkit-scrollbar { display: none; }

.subtab-nav {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 4px 8px 0;
  min-width: 0;
}

.subtab-pill {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  background: color-mix(in oklab, var(--card) 80%, var(--background));
  color: var(--muted-foreground);
  padding: 10px 5px 11px;
  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: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  opacity: 0.75;
  transform: translateY(4px) rotate(var(--tab-rot, 0deg));
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-ui);
  font-size: 12px;
}

/* Tape stripe (cor da porta) */
.subtab-pill::before {
  content: "";
  position: absolute;
  top: 3px; left: 6px; right: 6px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--porta-color, var(--sage));
  opacity: 0.85;
}

/* Sem ícone (decisão Fabio 08/06): mais espaço pro label → fonte maior, sem
   truncar nem desequilibrar a grade. O markup ainda traz o ícone; só escondemos. */
.subtab-pill .subtab-icon { display: none; }
.subtab-pill .subtab-label {
  font-family: var(--font-hand);
  font-size: 21px;
  line-height: 1;
  color: var(--bella-ink-muted, var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ativa — T5: fundo cream-card, label terra-deep 600, lingueta conectada */
.subtab-pill-active {
  background: var(--card);
  opacity: 1;
  transform: translateY(-4px) rotate(0deg);
  z-index: 2;                    /* senta sobre a borda do panel → lingueta fluída */
  padding-bottom: 15px;          /* avança ~4px a mais para cobrir o gap do translateY */
}
.subtab-pill-active .subtab-label {
  color: var(--c-hoje-deep);     /* --bella-terra-deep */
  font-weight: 600;
}
.subtab-pill-active .subtab-icon { color: var(--terracotta); }

.subtab-rule {
  height: 1px;
  margin: 0 8px;
  background-image: linear-gradient(
    to right,
    oklch(0.24 0.03 35 / 0.25) 0 6px,
    transparent 6px 12px
  );
  background-size: 12px 1px;
}

.subtab-panel { padding: 22px 0 0; }
.subtab-panel[hidden] { display: none; }
