@use "sass:map";
@use "../base/var";
@use "../base/const";
@use "../base/color";

[part~="wy-toasts"] {
  background: none;
  border: none;
  padding: var.default(--wy-padding-lg);

  margin: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  //gap: var.default(--wy-gap-lg);

  align-content: flex-end;
  align-items: flex-end;
  justify-content: flex-end;

  pointer-events: none;

  &[popover] {
    position: fixed;
    inset: 0;
    z-index: const.$zindex-popover;
  }

  > ::slotted(*) {
    pointer-events: auto;
  }
}

[part~="wy-toast"] {
  --wy-component-background-color: #{color.token(--wy-surface-container-low)};
  --wy-color: #{color.token(--wy-on-surface)};
  background: var(--wy-component-background-color);
  color: var(--wy-component-color);
  gap: var.default(--wy-gap);
  margin-top: 0;
  margin-bottom: var.default(--wy-gap-lg);
  display: flex;
  cursor: pointer;
  border-radius: var.default(--wy-border-radius);
  padding: 0;
  user-select: none;
  box-shadow: var.default(--wy-shadow-level2);
  position: relative;
  overflow: hidden;
  min-height: var.wy-rem(3);
  max-width: var.wy-rem(32);

  &[part~=wy-fade] {
    transition-property: opacity, min-height, padding-top, padding-bottom, margin-top, margin-bottom, height;
    transition-duration: var.default(--wy-transition-duration);
    transition-timing-function: var.default(--wy-transition-curve);

    &:not([part~=wy-show]) {
      opacity: 0;
      min-height: 0;
      height: 0;
      padding-top: 0;
      padding-bottom: 0;
      margin-top: 0;
      margin-bottom: 0;
      pointer-events: none;
    }
  }
}

/*
[part~=wy-toast-action] {
  position: sticky;
  top: var.wy-rem(4.5);
  bottom: var.wy-rem(4.5);
  // TODO: check z-index - needs to be below dropdown z-index (1000) currently $zindex-toast is 1090
  z-index: const.$zindex-toast;
  background-color: color.token(--wy-primary);
  color: color.token(--wy-on-primary);
  padding: var.wy-rem(0.5) var.wy-rem(1);
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: var.wy-rem(0.5);
  border-radius: var.default(--wy-border-radius-pill);
  font-size: var.default(--wy-font-size-xs);
  width: max-content;
  min-height: min-content;
  max-width: calc(100% - var.wy-rem(3));
  height: auto;
  align-self: center;
  text-align: center;
  box-shadow: none;
}
*/