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


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


/**
 * @prop --mds-img-background: Public. The background color of the image container.
 * @prop --mds-img-color: Public. The foreground/text color used inside the image component.
 * @prop --mds-img-icon-color: The color applied to icons displayed within the image element.
 * @prop --mds-img-error-background: The background color shown when the image fails to load.
 * @prop --mds-img-error-color: The text or foreground color shown in the error state.
 * @prop --mds-img-error-icon-color: The icon color used in the error state.
 */

:host {
  --mds-img-background: rgb(var(--magma-accent-emphasis-hover, var(--variant-primary-03, 0 73 211)));
  --mds-img-color: rgb(var(--magma-accent-surface, var(--variant-primary-09, 213 224 245)));
  --mds-img-icon-color: rgb(var(--magma-accent-border, var(--variant-primary-06, 129 171 251)));
  --mds-img-error-background: rgb(var(--magma-danger-wash-base, var(--status-error-09, 255 214 211)));
  --mds-img-error-color: rgb(var(--magma-danger-text-default, var(--text-error-default, 89 0 0)));
  --mds-img-error-icon-color: rgb(var(--magma-danger-text-default, var(--text-error-default, 89 0 0)));

  display: flex;
  height: auto;
  object-fit: contain;
  overflow: hidden;
  position: relative;
  width: 100%;
}

img {
  height: inherit;
  object-fit: inherit;
  width: inherit;
}

.alt-text-container {
  align-items: center;
  background-color: var(--mds-img-background, rgb(var(--magma-accent-emphasis-hover, var(--variant-primary-03, 0 73 211))));
  color: var(--mds-img-color, rgb(var(--magma-accent-surface, var(--variant-primary-09, 213 224 245))));
  display: flex;
  flex-direction: column;
  gap: --spacing(600);
  justify-content: center;
  padding: --spacing(600);
  text-align: center;
}

.alt-text-container--absolute {
  cursor: pointer;
  inset: 0;
  position: absolute;
}

.alt-text-container--error {
  --mds-img-background: var(--mds-img-error-background, rgb(var(--magma-danger-wash-base, var(--status-error-09, 255 214 211))));
  --mds-img-color: var(--mds-img-error-color, rgb(var(--magma-danger-text-default, var(--text-error-default, 89 0 0))));
  --mds-img-icon-color: var(--mds-img-error-icon-color, rgb(var(--magma-danger-text-default, var(--text-error-default, 89 0 0))));

  cursor: not-allowed;
}

.alt-text-container--default-aspect-ratio {
  cursor: pointer;
  width: 100%;
}

.click-to-load {
  pointer-events: none;
}

.icon {
  fill: var(--mds-img-icon-color, rgb(var(--magma-accent-border, var(--variant-primary-06, 129 171 251))));
  width: --spacing(900);
}
