.dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: $dialog-z-index;
  padding: 1.75rem $half-padding;

  // Backdrop
  &:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: var(--color-brand-dark);
    opacity: 0.5;
  }
}

.dialog.closed{
  display: none;
}

.dialog-wrapper {
  @include flex();
  @include flex-column();
  max-width: 38rem;
  height: 100%;
  margin: 0 auto;
  border-radius: $default-border-radius;
  overflow: hidden;
  box-shadow: 0 0 0.5rem var(--color-shadow-30);
}

.dialog-header {
  background: var(--color-ui-3);
  border-bottom: var(--color-ui-2-50) solid $default-border-width-thin/2;
 
  padding: $half-padding;
  @include flex();
  @include flex-row();
  align-items: center;
  h3 {
    font-size: var(--font-size-base);
    margin: 0;
  }

  icon-button {
    svg {
      width: 0.875rem;
    }
  }
}

.dialog-container {
  background: var(--color-ui-4);
  @include flex-size(1);
  @include overflow-scroll(auto, touch)
}

.dialog-footer {
  background: var(--color-brand-dark);
  text-align: right;
  height: 3rem;
  width: 100%;
  padding: 0.25rem;
  box-sizing: border-box;

  button {
    height: 2rem;
    line-height: 2rem;
  }
  button.aux {
    color: var(--color-ui-4);
    &:hover {
      background-color: var(--color-shadow-10);
      box-shadow: none;
    }
  }
  button:hover {
    box-shadow: none;
  }
}

@media screen and (max-width: 812px) {
  .dialog {
    padding: $half-padding;
  }
}
