/* stylelint-disable selector-no-qualifying-type */
/**
@prop --ux-toast-message-bg-color: Background color
@prop --ux-toast-message-border-width: Border width
@prop --ux-toast-message-color-error: Text and border color for messages of category error
@prop --ux-toast-message-color-info: Text and border color for messages of category info
@prop --ux-toast-message-color-warning: Text and border color for messages of category warning
@prop --ux-toast-message-font-size: Font size of the message
@prop --ux-toast-message-font-weight: Font weight of the message
@prop --ux-toast-message-gap-size: Gap size between icon and message
@prop --ux-toast-message-icon-size: Icon size
@prop --ux-toast-message-line-height: Icon height of the message
@prop --ux-toast-message-min-width: Minimum width
@prop --ux-toast-message-offset: Distance between toast messages
@prop --ux-toast-message-padding: Inner padding
@prop --ux-toast-message-remove-button-size: Size of the remove button
@prop --ux-toast-message-remove-icon-size: Size of the cross icon inside of the remove button
@prop --ux-toast-message-transition-duration: Duration of the appear/disappear transition
@prop --ux-toast-message-transition-transform: Transform style used for the appear/disappear transition
*/
:host {
  box-sizing: border-box;
  display: block;
  background-color: var(--ux-toast-message-bg-color);
  border: var(--ux-toast-message-border-width) solid;
  width: var(--ux-toast-message-min-width);
  font-family: var(--ux-font);
  font-size: var(--ux-toast-message-font-size);
  font-weight: var(--ux-toast-message-font-weight);
  line-height: var(--ux-toast-message-line-height);
  user-select: none;
}

:host(:not(:last-of-type)) {
  margin-bottom: var(--ux-toast-message-offset);
}

:host([category=info]) {
  border-color: var(--ux-toast-message-color-info);
  color: var(--ux-toast-message-color-info);
}

:host([category=warning]) {
  border-color: var(--ux-toast-message-color-warning);
  color: var(--ux-toast-message-color-warning);
}

:host([category=error]) {
  border-color: var(--ux-toast-message-color-error);
  color: var(--ux-toast-message-color-error);
}

:host([category=success]) {
  border-color: var(--ux-toast-message-color-success);
  color: var(--ux-toast-message-color-success);
}

:host([transition-phase=initial]),
:host([transition-phase=disappear]) {
  opacity: 0;
  transform: var(--ux-toast-message-transition-transform);
}

:host([transition-phase=appear]) {
  transition: opacity var(--ux-toast-message-transition-duration) ease-in-out, transform var(--ux-toast-message-transition-duration) ease-out;
}

:host([transition-phase=disappear]) {
  transition: opacity var(--ux-toast-message-transition-duration) ease-in-out, transform var(--ux-toast-message-transition-duration) ease-in;
}

.ux-toast-message__inner {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  padding: var(--ux-toast-message-padding);
  gap: var(--ux-toast-message-gap-size);
}
.ux-toast-message__icon {
  font-size: var(--ux-toast-message-icon-size);
  line-height: 1;
  fill: currentColor;
}
.ux-toast-message__remove {
  align-items: center;
  appearance: none;
  background: transparent;
  border-radius: 0;
  border: 0 none transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  fill: currentColor;
  font-size: var(--ux-toast-message-remove-icon-size);
  height: var(--ux-toast-message-remove-button-size);
  justify-content: center;
  position: absolute;
  right: 0;
  top: 0;
  width: var(--ux-toast-message-remove-button-size);
}