:host {
  /**
   * @prop --background: Background of the toast
   * @prop --color: Color of the toast text
   *
   * @prop --border-color: Border color of the toast
   * @prop --border-radius: Border radius of the toast
   * @prop --border-width: Border width of the toast
   * @prop --border-style: Border style of the toast
   *
   * @prop --white-space: White space of the toast message
   *
   * @prop --box-shadow: Box shadow of the toast
   *
   * @prop --min-width: Minimum width of the toast
   * @prop --width: Width of the toast
   * @prop --max-width: Maximum width of the toast
   *
   * @prop --min-height: Minimum height of the toast
   * @prop --height: Height of the toast
   * @prop --max-height: Maximum height of the toast
   *
   * @prop --button-color: Color of the button text
   *
   * @prop --start: Position from the left if direction is left-to-right, and from the right
   *                if direction is right-to-left
   * @prop --end: Position from the right if direction is left-to-right, and from the left
   *              if direction is right-to-left
   */
  --border-width: 0;
  --border-style: none;
  --border-color: initial;
  --box-shadow: 0 15px 25px 0 rgba(var(--box-shadow-color, 0, 0, 0), 0.1), 0 6px 20px 0 rgba(var(--box-shadow-color, 0, 0, 0), 0.12), 0 13.2px 40px 0 rgba(var(--box-shadow-color, 0, 0, 0), 0.08);
  --min-width: auto;
  --width: auto;
  --min-height: auto;
  --height: auto;
  --max-height: auto;
  --white-space: normal;
  --background: var(--bkkr-overlay-background, var(--bkkr-background-color, #fff));
  --border-radius: 32px;
  --button-color: color-get(primary, base);
  --color: var(--bkkr-text-color, #000);
  --max-width: 700px;
  --start: calc(var(--bkkr-spacer, 16px) * 0.5);
  --end: var(--start);
  left: 0;
  top: 0;
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  outline: none;
  color: var(--color);
  font-family: var(--bkkr-font-family);
  font-size: 0.85rem;
  contain: strict;
  touch-action: none;
  user-select: none;
  z-index: 1001;
  pointer-events: none;
}
:host-context([dir=rtl]) {
  left: unset;
  right: unset;
  right: 0;
}

:host(.overlay-hidden) {
  display: none;
}

.toast-wrapper {
  border-radius: var(--border-radius);
  left: var(--start);
  right: var(--end);
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: auto;
  display: block;
  position: absolute;
  width: var(--width);
  min-width: var(--min-width);
  max-width: var(--max-width);
  height: var(--height);
  min-height: var(--min-height);
  max-height: var(--max-height);
  border-width: var(--border-width);
  border-style: var(--border-style);
  border-color: var(--border-color);
  background: var(--background);
  box-shadow: var(--box-shadow);
}
[dir=rtl] .toast-wrapper, :host-context([dir=rtl]) .toast-wrapper {
  left: unset;
  right: unset;
  left: var(--end);
  right: var(--start);
}

@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  .toast-wrapper {
    margin-left: unset;
    margin-right: unset;
    -webkit-margin-start: auto;
    margin-inline-start: auto;
    -webkit-margin-end: auto;
    margin-inline-end: auto;
  }
}

.toast-container {
  display: flex;
  align-items: center;
  height: inherit;
  min-height: inherit;
  max-height: inherit;
  pointer-events: auto;
  contain: content;
}

.toast-content {
  padding-left: 15px;
  padding-right: 15px;
  padding-top: 15px;
  padding-bottom: 15px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
@supports (margin-inline-start: 0) or (-webkit-margin-start: 0) {
  .toast-content {
    padding-left: unset;
    padding-right: unset;
    -webkit-padding-start: 15px;
    padding-inline-start: 15px;
    -webkit-padding-end: 15px;
    padding-inline-end: 15px;
  }
}

.toast-header {
  margin-bottom: 2px;
  font-weight: 700;
}

.toast-message {
  flex: 1;
  white-space: var(--white-space);
}

.toast-button-group {
  display: flex;
}

.toast-button {
  border: 0;
  outline: none;
  color: var(--button-color);
  z-index: 0;
}

.toast-icon {
  font-size: 1.4em;
}

.toast-button-inner {
  display: flex;
  align-items: center;
}

.toast-wrapper.toast-top {
  top: 0;
  transform: translate3d(0, -200%, 0);
}

.toast-wrapper.toast-middle {
  opacity: 0.01;
}

.toast-wrapper.toast-bottom {
  bottom: 0;
  transform: translate3d(0, 200%, 0);
}

:host(.bkkr-color) {
  --button-color: inherit;
  color: current-color(contrast);
}

:host(.bkkr-color) .toast-button-cancel {
  color: inherit;
}

:host(.bkkr-color) .toast-wrapper {
  background: current-color(base);
}