:host {
  display: block;
}

  :host * {
    box-sizing: border-box;
  }

.dialog {
  position: fixed;
  z-index: var(--s-z-40);
  display: flex;
  justify-content: center;
  align-items: center;
  inset: 0;

  /* Reset default dialog styles */
  border: none;
  padding: 0;
  width: auto;
  background: transparent;
  max-width: none;
  max-height: none;
  overflow: visible;
}

.dialog::backdrop {
    display: none;
  }

.dialog:not([open]) {
    display: none;
  }

.dialog:not(.dialog--closing) .dialog__backdrop {
    animation: 0.15s dialog-backdrop-fade-in;
  }

@media (prefers-reduced-motion) {

.dialog:not(.dialog--closing) .dialog__backdrop {
      animation: none
  }
    }

.dialog:not(.dialog--closing) .dialog__body {
    animation: 0.15s dialog-scale-in;
  }

@media (prefers-reduced-motion) {

.dialog:not(.dialog--closing) .dialog__body {
      animation: none
  }
    }

.dialog--closing {
  animation: 0.15s dialog-fade-out;
  animation-fill-mode: forwards;
}

@media (prefers-reduced-motion) {

.dialog--closing {
    animation: none
}
  }

.dialog__backdrop {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.2);
  inset: 0;
}

.dialog__body {
  z-index: var(--s-z-40);
  overflow-x: hidden;
  overflow-y: auto;
  width: 18.5rem;
  max-height: 90vh;
  padding-top: var(--s-space-24);
  padding-right: var(--s-space-16);
  padding-bottom: var(--s-space-16);
  padding-left: var(--s-space-16);
  border-radius: var(--s-border-radius-l);
  background-color: var(--s-surface-overlay-default);
  text-align: center;
  box-shadow: var(--s-shadow-level-3);
}

@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {

.dialog__body {
    width: 25rem;
    border-radius: var(--s-border-radius-base)
}
  }

@media (min-width: 992px) {

.dialog__body {
    text-align: start
}
  }

.dialog__heading {
  margin: 0;
  margin-bottom: var(--s-space-8);
  padding-right: var(--s-space-8);
  padding-left: var(--s-space-8);
  font-size: var(--s-font-size-lg);
  font-weight: var(--s-font-weight-semibold);
  line-height: var(--s-line-height-lg);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {

.dialog__heading {
    line-height: var(--s-line-height-base)
}
  }

.dialog__content {
  margin-bottom: var(--s-space-20);
  padding-right: var(--s-space-8);
  padding-left: var(--s-space-8);
  line-height: var(--s-line-height-base);
  overflow-wrap: break-word;
}

.dialog__content ::slotted(*) {
    margin: 0;
  }

@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {

.dialog__content {
    font-size: var(--s-font-size-sm);
    line-height: var(--s-line-height-sm)
}
  }

@media (min-width: 992px) {

.dialog__content {
    margin-bottom: var(--s-space-24)
}
  }

.dialog__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--s-space-8);
  min-width: 0;
  width: 100%;
}

@media (min-width: 992px) {

.dialog__controls {
    flex-wrap: nowrap;
    justify-content: flex-end
}
  }

.dialog__actions {
  display: grid;
  gap: var(--s-space-8);
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
}

.dialog__actions:has(> :only-child) {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
}

.dialog__actions:has(> :only-child) > swirl-button {
  min-width: 0;
  max-width: 100%;
}

.dialog__actions:has(> :nth-child(2)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

@media (min-width: 992px) {

.dialog__actions:has(> :nth-child(2)) {
    width: auto
}
  }

.dialog__left_controls {
  display: flex;
  align-items: center;
  flex-grow: 1;
  padding-left: var(--s-space-8);
  width: 100%;
  min-width: 0;
}

@media (min-width: 992px) {

.dialog__left_controls {
    width: auto
}
  }

@keyframes dialog-scale-in {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes dialog-backdrop-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dialog-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
