
.tabs{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* garante sobreposição correta */
.tabs__list{
  position: relative;
  z-index: 2;

  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border-soft);
}

.tabs__panels{
  position: relative;
  z-index: 1;
  padding: 12px;
}

.tabs__panel[hidden]{ display: none; }


.tabs__tab{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-600);
  font: inherit;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background .12s ease, color .12s ease;
}

.tabs__tab:hover{
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.tabs__tab:active{ transform: translateY(1px); }

.tabs__tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500) 35%, transparent);
}


/* ========== ATIVO (tabs normais) ========== */
.tabs__tab.is-active{
  background: color-mix(in srgb, var(--primary-600) 5%, var(--surface));
  color: var(--primary-600);
  font-weight: 700;
  border-bottom: 0;
  position: relative;
  z-index: 3;

  /* sombra só topo + lados */
  box-shadow:
    0 -2px 8px rgba(15,23,42,0.08),
    -2px 0 8px rgba(15,23,42,0.06),
     2px 0 8px rgba(15,23,42,0.06);
}


/* ========== UNDERLINE (mantido como gostas) ========== */
.tabs--underline .tabs__list{
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 12px;
  gap: 16px;
}

.tabs--underline .tabs__tab{
  border-radius: 6px;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  position: relative;
}

.tabs--underline .tabs__tab:hover{
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

.tabs--underline .tabs__tab.is-active{
  background: transparent;
  box-shadow: none;
  color: var(--primary-600);
  font-weight: 700;
  border-bottom: 0;
}

.tabs--underline .tabs__tab.is-active::after{
  content:"";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -11px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary-600);
}


/* ========== SEGMENTED ========== */
.tabs--segmented .tabs__list{
  padding: 10px 12px;
  background: transparent;
  border-bottom: 0;
}

.tabs--segmented .tabs__list{
  background: color-mix(in srgb, var(--surface-soft) 75%, transparent);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 6px;
  gap: 6px;
}

.tabs--segmented .tabs__tab{
  flex: 1;
  justify-content: center;
  padding: 10px 10px;
  border-radius: 10px;
}

/* ativo no segmented: mesma lógica (topo + lados) */
.tabs--segmented .tabs__tab.is-active{
  background: var(--surface);
  color: var(--primary-600);
  font-weight: 700;
  border-bottom: 0;
  position: relative;
  z-index: 3;

  box-shadow:
    0 -2px 8px rgba(15,23,42,0.08),
    -2px 0 8px rgba(15,23,42,0.06),
     2px 0 8px rgba(15,23,42,0.06);
}


/* ========== SCROLL ========== */
.tabs--scroll .tabs__list{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 10px;
}

.tabs--scroll .tabs__tab{
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
}

.tabs--scroll .tabs__list::-webkit-scrollbar{ height: 0; }


/* micro tipografia */
.tabs__tab{ letter-spacing: .1px; }
.tabs__tab:not(.is-active){ opacity: .85; }
.tabs__tab.is-active{ opacity: 1; }
