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

[part~="wy-banner"] {
  background-color: #{color.token(--wy-surface-container-low)};
  color: #{color.token(--wy-on-surface)};

  position: relative;
  user-select: none;
  overflow: hidden;
  display: flex;
  align-self: center;
  text-align: center;

  width: max-content;
  min-height: min-content;
  max-width: calc(100% - var.wy-rem(3));
  height: auto;

  gap: var.default(--wy-gap);
  margin-top: 0;
  margin-bottom: var.default(--wy-gap-lg);
  padding: var.wy-rem(0.5) var.wy-rem(1);
  border-radius: var.default(--wy-border-radius-pill);

  font-size: var.default(--wy-font-size-xs);

  &[part~="wy-transition"] {
    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-banner-action"] {
  position: sticky;
  top: var.wy-rem(4.5);
  bottom: var.wy-rem(4.5);
  z-index: const.$zindex-toast;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: var.wy-rem(0.5);
  cursor: pointer;

  background-color: color.token(--wy-primary);
  color: color.token(--wy-on-primary);
}
