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


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


/**
 * @prop --mds-pref-mode-overlay-fadeout-duration: Sets the fadeout duration of the overlay which hides UI color flash on theme change
 * @prop --mds-pref-mode-overlay-show-duration: Sets the show duration of the overlay which hides UI color flash on theme change
 * @prop --mds-pref-mode-overlay-z-index: Public. Sets the z-index of the overlay which hides UI color flash on theme change
 */

:host {
  --mds-pref-mode-overlay-fadeout-duration: var(--duration-200, 200ms);
  --mds-pref-mode-overlay-show-duration: var(--duration-300, 300ms);
  --mds-pref-mode-overlay-z-index: var(--magma-theme-overlay-z-index, 7000);

  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--system {
  --mds-tab-item-selected-color: rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73)));
}

.item--light {
  --mds-tab-item-selected-color: rgb(var(--label-yellow-06, 214 163 15));
}

.item--dark {
  --mds-tab-item-selected-color: rgb(var(--label-sky-06, 82 180 238));
}

:host([pref-mode='dark']:not([pref-theme-scheme='light'])),
:host([pref-theme-scheme='dark']) {
  .item {
    --mds-tab-item-default-color: rgb(var(--magma-text-default, var(--text-neutral-default, 5 5 5)));
  }

  .item--light {
    --mds-tab-item-selected-color: rgb(var(--label-yellow-03, 111 85 22));
  }

  .item--dark {
    --mds-tab-item-selected-color: rgb(var(--label-sky-03, 4 95 136));
  }
}

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

    .item--light {
      --mds-tab-item-selected-color: rgb(var(--label-yellow-03, 111 85 22));
    }

    .item--dark {
      --mds-tab-item-selected-color: rgb(var(--label-sky-03, 4 95 136));
    }
  }
}

