$dialog-max-height: 420px;
$dialog-title-height: 56px;

.dialog {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 2rem);
  background: var(--background-color);
  border-radius: 8px;
  max-height: $dialog-max-height;

  @media only screen and (max-height: $dialog-max-height) {
    max-height: calc(100vh - 2rem);
  }
}

.dialog-title-bar {
  display: flex;
  border-bottom: 1px solid var(--secondary-color);
  height: $dialog-title-height;

  .button {
    border: 0;
  }
}

.dialog-title-side {
  display: flex;
  flex: none;
  width: 3.5em;

  button {
    width: 100%;
    margin: 0 auto;
  }
}

.dialog-title-text {
  color: var(--primary-color);
  flex: 1 1 auto;
  margin: 15px 0 0 16px;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  max-height: $dialog-max-height - $dialog-title-height;
  overflow: auto;

  @media only screen and (max-height: $dialog-max-height) {
    max-height: calc(100vh - 2rem - #{$dialog-title-height});
  }
}

.dialog-actions {
  margin: 1em 0 0;
  padding: 0;
  list-style: none;

  li + li {
    margin-top: 1em;
  }

  li:last-child {
    margin-top: 2.5em;
  }

  button {
    width: 100%;
  }
}
