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


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


/**
 * @prop --mds-pref-theme-item-color-background: Public. Background color of a theme item: the wash of the theme it names.
 * @prop --mds-pref-theme-item-color-status-error: Color representing an error status for a theme item.
 * @prop --mds-pref-theme-item-color-status-success: Color representing a success status for a theme item.
 * @prop --mds-pref-theme-item-color-status-warning: Color representing a warning status for a theme item.
 * @prop --mds-pref-theme-item-color-variant-primary: Color for the primary variant item: the accent of the theme it names.
 */

/* the preview of the theme the item names (#692): the component sets --private-theme-wash and
   --private-theme-accent to that theme's --magma-preview-<name>-*; a theme that publishes none
   leaves them invalid, and the active theme shows instead */

:host {
  --mds-pref-theme-item-color-background: rgb(var(--private-theme-wash, var(--magma-wash-base, var(--tone-neutral-09, 225 225 225))));
  --mds-pref-theme-item-color-status-error: rgb(var(--magma-danger-emphasis, var(--status-error-04, 196 64 65)));
  --mds-pref-theme-item-color-status-success: rgb(var(--magma-success-emphasis, var(--status-success-04, 0 128 57)));
  --mds-pref-theme-item-color-status-warning: rgb(var(--magma-warning-emphasis, var(--status-warning-04, 142 106 0)));
  --mds-pref-theme-item-color-variant-primary: rgb(
    var(--private-theme-accent, var(--magma-accent-emphasis, var(--variant-primary-04, 11 96 255)))
  );

  align-items: center;
  cursor: pointer;
  display: flex;
  gap: --spacing(400);

  /* the previews line up at the end of the row, whatever the length of the labels */
  justify-content: space-between;
}

.theme-preview {
  background-color: var(--mds-pref-theme-item-color-background, rgb(var(--magma-wash-base, var(--tone-neutral-09, 225 225 225))));

  /* 12px on a 24px box was a circle: the pill, out of the corner axis */
  border-radius: var(--magma-radius-full, var(--radius-full, 1000px));
  box-shadow: var(--shadow-ring-weak, 0 0 0 1px rgb(var(--tone-neutral-01, 5 5 5) / 0.15));
  box-sizing: border-box;
  display: inline-flex;
  flex: none;
  flex-wrap: wrap;
  gap: --spacing(100);
  height: --spacing(600);
  margin: 1px;
  padding: --spacing(100);
  width: --spacing(600);
}

/* the wash of the theme the item names, under the colour of each dot; 16px on a 6px dot was a
   circle, the pill */

.theme-color {
  background-color: var(--mds-pref-theme-item-color-background, rgb(var(--magma-wash-base, var(--tone-neutral-09, 225 225 225))));
  border-radius: var(--magma-radius-full, var(--radius-full, 1000px));
  height: --spacing(150);
  position: relative;
  width: --spacing(150);
}

.theme-color::after {
  border-radius: inherit;
  box-shadow: var(--shadow-ring-weak, 0 0 0 1px rgb(var(--tone-neutral-01, 5 5 5) / 0.15)) inset;
  content: '';
  display: flex;
  inset: 0;
  position: absolute;
}

.theme-color--variant-primary {
  background-color: var(--mds-pref-theme-item-color-variant-primary, rgb(var(--magma-accent-emphasis, var(--variant-primary-04, 11 96 255))));
}

.theme-color--status-success {
  background-color: var(--mds-pref-theme-item-color-status-success, rgb(var(--magma-success-emphasis, var(--status-success-04, 0 128 57))));
}

.theme-color--status-warning {
  background-color: var(--mds-pref-theme-item-color-status-warning, rgb(var(--magma-warning-emphasis, var(--status-warning-04, 142 106 0))));
}

.theme-color--status-error {
  background-color: var(--mds-pref-theme-item-color-status-error, rgb(var(--magma-danger-emphasis, var(--status-error-04, 196 64 65))));
}
