/* ---------------------------------
-----  dimension variables --------
---------------------------------- */
/* ------  standard elements padding & margin  ------- */
/* spacing */
/**
**  Official Font sizes
------------------------------- */
/**
** Line-heights
------------------------------- */
/*
  Mixin to progressively-enhance :focus-visible, keeping :focus where not supported
  Add an arbitrary list of selectors into the arguments, and the styling in the block.
  I you pass no selectors to the mixin the parent ("ampersand") operator is used instead.

  There are two mixins:
  - focus-visible: a generic focus-visible, giving you "slots" to decide what to render for :focus, :focus reset, and :focus-visible
  - focus-visible-outline: a focus-visible, which only resets the outline. If you don't need more custom resets, use this one!

  Use focus-visible:
  The key thing here is checking which slot is being rendered.
  For example, you can reset box-shadow here, or anything else.

  @include focus-visible using ($slot) {
      @if $slot == focus {
          outline: 2px solid transparent;
          box-shadow: 0 0 0 4px blue;
      }
      @if $slot == focusReset {
          box-shadow: none;
      }
      @if $slot == focusVisible {
          box-shadow: 0 0 0 4px blue;
      }
  }

  Use focus-visible-outline:
  @include focus-visible-outline("button", "a[href]") {
      outline: 2px solid blue;
  }

  Resulting CSS (compressed):

  button:focus,
  a[href]:focus {
      outline: 2px solid blue;
  }

  button:focus:not(:focus-visible),
  a[href]:focus:not(:focus-visible) {
      outline: none;
  }
  button:focus-visible,
  a[href]:focus-visible {
      outline: 2px solid blue;
  }
*/
:host {
  display: inline-block;
  width: 100%;
  position: relative;
}

img {
  display: block;
  width: 100%;
  height: auto;
}
img::before {
  content: "";
  width: 100%;
  height: 100%;
  background-color: var(--ux-image-placeholder-background-color);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
img::after {
  content: attr(alt);
  font-family: var(--ux-font);
  width: 100%;
  text-align: center;
  background-color: var(--ux-image-placeholder-background-color);
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: var(--ux-image-error-alt-text-color);
  font-size: var(--ux-font-size-medium);
}

.placeholder-container {
  position: relative;
  background-color: var(--ux-image-placeholder-background-color);
}

.placeholder-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.error-icon {
  color: var(--ux-image-error-color);
  font-size: var(--ux-image-error-icon-size);
}

.error-message {
  color: var(--ux-image-error-color);
  margin-top: 10px;
  font-size: var(--ux-font-size-medium);
}

.error-alt-text {
  color: var(--ux-image-error-alt-text-color);
  margin-top: 10px;
  font-size: var(--ux-font-size-medium);
}