.toast-directive {
  position: fixed;
  z-index: 2147483645;
  background-color: rgba(21, 21, 21, 0.42);
  color: #f4f4f4;
  border-radius: var(--default-radius);
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
  transition: opacity 420ms ease;
  cursor: pointer;

  width: fit-content;
  max-width: calc(100% - 16px);
  min-width: 304px;
  font-size: 10pt;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);

  animation: fadein 420ms;

  /* Experimental */
  backdrop-filter: blur(15px);
  overflow: hidden;
}

.toast-directive.is-info {
  background-color: rgba(var(--color-info));
  color: rgba(var(--on-info-color));
  backdrop-filter: none;
}

.toast-directive.is-warning {
  background-color: rgba(var(--color-warn));
  color: rgba(var(--on-warn-color));
  backdrop-filter: none;
}

.toast-directive.is-error {
  background-color: rgba(var(--color-error));
  color: rgba(var(--on-error-color));
  backdrop-filter: none;
}

.toast-directive.is-success {
  background-color: rgba(var(--color-success));
  color: rgba(var(--on-success-color));
  backdrop-filter: none;
}

.toast-directive.fade-out {
  opacity: 0;
}

.toast-directive .toast-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

.toast-directive .toast-content .toast-actions {
  padding-left: 8px;
}

.toast-directive .toast-content .toast-actions .toast-action-button {
  font-size: 8pt;
  padding: 0;
  margin: 0;
  font-weight: normal;
  transition: font-weight 420ms ease;
}

.toast-directive .toast-content .toast-actions .toast-action-button:hover {
  font-weight: bold;
}

.toast-directive .toast-progress {
  width: calc(100% - 16px);
  position: absolute;
  bottom: 0;
}

@keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.toast-directive.position-bottom-center {
  bottom: calc(90px + env(safe-area-inset-bottom, 0));
  left: 50%;
  transform: translateX(-50%);
}

.toast-directive.position-bottom-left {
  bottom: calc(90px + env(safe-area-inset-bottom, 0));
  left: 0;
}

.toast-directive.position-bottom-right {
  bottom: calc(90px + env(safe-area-inset-bottom, 0));
  right: 0;
}

.toast-directive.position-top-center {
  top: calc(90px + env(safe-area-inset-top, 0));
  left: 50%;
  transform: translateX(-50%);
}

.toast-directive.position-top-left {
  top: calc(90px + env(safe-area-inset-top, 0));
  left: 0;
}

.toast-directive.position-top-right {
  top: calc(90px + env(safe-area-inset-top, 0));
  right: 0;
}

.toast-directive.position-center-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.toast-directive .toast-icon {
  color: #f4f4f4;
  margin: 0;
}

.toast-directive .toast-text-content {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.toast-directive .toast-text-content.has-icon {
  padding-left: 8px;
}

.toast-directive .toast-text-content:only-child {
  padding: 0 8px;
}
