:host {
  /* scw element */
  position: relative;
  box-sizing: border-box;
  --margin-right: initial;
  --margin-bottom: initial;
  --gap-h-int: initial;
  --gap-v-int: initial;
  margin-right: var(--margin-right, var(--gap-h-int, initial));
  margin-bottom: var(--margin-bottom, var(--gap-v-int, initial));
  display: block;
}

:host([warning]) {
  outline: 2px solid red !important;
}
:host {
  z-index: -1;
  visibility: hidden;
  pointer-events: none;
  /* delay hiding until after modal fades out */
  transition: all 0s linear var(--fade-duration);
}

:host([open]) {
  z-index: 20;
  visibility: visible;
  pointer-events: auto;
  /* visibile immediately on open to allow fade-in */
  transition: all 0s linear 0s;
}

.modal-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.modal-background {
  height: 100%;
  width: 100%;
  position: relative;
  background: transparent;
  transition: background var(--fade-duration) ease;
}

.modal {
  background-color: var(--scw-color-grey-10);
  border-radius: 20px 20px 20px 20px;
  box-shadow: 0px 2px 26px 0px rgba(0, 0, 0, 0.11);
  align-self: stretch;
  flex: 1;
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  padding-left: var(--scw-spacing-2);
  padding-right: var(--scw-spacing-2);
  padding-top: var(--scw-spacing-2);
  padding-bottom: var(--scw-spacing-2);
  width: var(--modal-width);
  max-width: 90%;
  height: var(--modal-height);
  max-height: 90%;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 40px));
  opacity: 0;
  transition: all var(--fade-duration) ease-out;
}
.modal > *:not(:last-child) {
  margin-bottom: 0px;
  --margin-bottom: 0px;
}

.modal-wrapper.open .modal-background {
  background: rgba(0, 0, 0, 0.3);
}
.modal-wrapper.open .modal {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.modal-header {
  background-color: rgba(0, 0, 0, 0);
  align-self: stretch;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
}
.modal-header > *:not(:last-child) {
  margin-right: 0px;
  --margin-right: 0px;
}
.modal-header .label-left {
  text-align: LEFT;
  font: var(--scw-type-text-semibold-font);
  color: var(--scw-color-grey-02);
  flex: 1;
}
.modal-header .heading {
  text-align: CENTER;
  font: var(--scw-type-text-bold-06-font);
  color: var(--scw-color-grey-02);
}
.modal-header .label-right {
  text-align: RIGHT;
  font: var(--scw-type-text-semibold-font);
  color: var(--scw-color-grey-02);
  flex: 1;
}

.modal-header.left-align .label-left {
  padding-right: var(--scw-spacing-1);
  flex: 0;
}

.content {
  background-color: rgb(255, 255, 255);
  align-self: stretch;
  flex: 1;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: var(--scw-spacing-2);
  text-align: LEFT;
  font: var(--scw-type-text-04-font);
  color: var(--scw-color-grey-03);
  flex: 1;
  overflow-y: auto;
}
.content > *:not(:last-child) {
  margin-right: 0px;
  --margin-right: 0px;
}

.modal-footer {
  background-color: rgba(0, 0, 0, 0);
  align-self: stretch;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  gap: var(--scw-spacing-1);
}
.modal-footer > *:not(:last-child) {
  margin-right: 0px;
  --margin-right: 0px;
}
.modal-footer ::slotted(:first-child) {
  background-color: rgba(0, 0, 0, 0);
  flex: 1;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: center;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  gap: var(--scw-spacing-1);
}
.modal-footer ::slotted(:first-child) > *:not(:last-child) {
  margin-right: var(--scw-spacing-1);
  --margin-right: var( --scw-spacing-1 );
}
.modal-footer ::slotted(:last-child) {
  background-color: rgba(0, 0, 0, 0);
  flex: 1;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-end;
  align-items: center;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  padding-bottom: 0px;
  gap: var(--scw-spacing-1);
}
.modal-footer ::slotted(:last-child) > *:not(:last-child) {
  margin-right: var(--scw-spacing-1);
  --margin-right: var( --scw-spacing-1 );
}

@media (max-width: 576px) {
  .modal-footer {
    flex-direction: column;
  }
  .modal-footer ::slotted(*) {
    width: 100%;
    justify-content: center !important;
  }
}