:host(:not(:is([hydrated], .hydrated))) {
  @apply not-hydrated;
}


mds-tab,
mds-tab-item,
mds-text {
  &:not(:is([hydrated], .hydrated)) {
    @apply not-hydrated;
  }
}


:host {
  display: grid;
  gap: --spacing(200);
}

.item {
  --mds-tab-item-default-color: rgb(var(--magma-text-disabled, var(--text-neutral-disabled, 119 119 119)));

  flex-basis: 0;
  flex-grow: 1;
}

.item--default,
.item--more,
.item--system {
  --mds-tab-item-selected-color: rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73)));
}

/* Contrast preference. The component reflects the resolved mode from <html> onto
 * its host as pref-contrast (see subscribePreference in @common/preference); these
 * plain shadow selectors refine for high contrast. `more` is the explicit choice;
 * `system` and no controller follow the OS via @media. Cross-browser, no :host-context. */

:host([pref-contrast='more']) .item {
  --mds-tab-item-default-color: rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)));
}

@media (prefers-contrast: more) {
  :host([pref-contrast='system']),
  :host(:not([pref-contrast])) {
    .item {
      --mds-tab-item-default-color: rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)));
    }
  }
}

