/* Plain CSS, since customer layouts load neither tailwind.css nor admin.css. Every layout
   serves the --md-sys-color-* tokens; the shape, elevation and motion tokens are Tailwind-only. */
.snackbar-component {
  position: fixed;
  inset: auto auto 32px 32px;
  z-index: 2147483648; /* Above the support widget, for the <noscript> snackbar */
  display: flex;
  align-items: center;
  min-width: 200px;
  max-width: 400px;
  margin: 0;
  padding: 16px;
  border: none;
  border-radius: 10px;
  box-shadow: 4px 4px 8px color-mix(in srgb, var(--md-sys-color-shadow) 39%, transparent);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.snackbar-component[data-type="error"] {
  background: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
}

.snackbar-component[data-type="success"] {
  background: var(--md-sys-color-success);
  color: var(--md-sys-color-on-success);
}

/* Fade the live snackbar in and out */
.snackbar-component[popover] {
  transition: opacity 300ms, overlay 300ms allow-discrete, display 300ms allow-discrete;
}

.snackbar-component[popover]:not(:popover-open) {
  display: none;
  opacity: 0;
}

@starting-style {
  .snackbar-component:popover-open {
    opacity: 0;
  }
}
