.toast {
  font-family: var(--font-family);
}
.toast .repeat-count {
  margin-left: 10px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.toast__message {
  position: relative;
  box-sizing: border-box;
  padding: 26px 64px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: bold;
  cursor: default;
  box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
}

.toast__front-icon {
  position: absolute;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  font-size: 24px;
}

.toast__close {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  display: flex;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
}

.toast.error .toast__message,
.toast.negative .toast__message {
  background-color: var(--toast-error-bg-color);
  color: var(--toast-error-color);
}

.toast.success .toast__message,
.toast.positive .toast__message {
  background-color: var(--toast-success-bg-color);
  color: var(--toast-success-color);
}

.toast.info .toast__message {
  background-color: var(--toast-info-bg-color);
  color: var(--toast-info-color);
}

.toast.warning .toast__message {
  background-color: var(--toast-warning-bg-color);
  color: var(--toast-warning-color);
}

/**
 * The stack owns the fixed bottom-centre anchor, so the depth shells and the
 * backlog counter can be positioned relative to the front toast.
 */
.toast-stack {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  font-family: var(--font-family);
}
.toast-stack .toast {
  position: relative;
  z-index: 2;
}

.toast-stack__queue {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background-color: var(--white);
  border: 1px solid var(--medium-grey);
  box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12);
  font-size: 13px;
  color: var(--text-color);
  white-space: nowrap;
}
.toast-stack__queue button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: underline;
  cursor: pointer;
}

.toast-stack__cards {
  position: relative;
}

/**
 * Purely decorative depth cards. `inset: 0` inherits the front toast's exact
 * box, so they stay aligned however the message wraps.
 */
.toast-stack__shell {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background-color: var(--medium-grey);
  box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12);
  pointer-events: none;
}

.toast-stack__shell--mid {
  transform: translateY(-8px) scale(0.96);
  z-index: 1;
}

.toast-stack__shell--back {
  transform: translateY(-16px) scale(0.92);
  z-index: 0;
}