// See COPYRIGHT.md for copyright information

.dialog {
  z-index: 15;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: solid 1px #000;
  background-color: var(--colour-bg);
  display: none;
  padding: 0;
  margin: 0;

  &.full-screen {
    width: calc(100vw - 5em);
    height: calc(100vh - 5em);
  }

  &.full-width {
    width: calc(100vw - 5em);
  }

  &.message-box {
    max-width: 800px;
    width: 100%;
  }

  .contents {
    padding: 2rem;
    position: relative;
    box-sizing: border-box;
    height: 100%;
    width: 100%;

    & > h2:first-child {
      margin-top: 0;
    }
  }

  .close {
    border: none;
    position: absolute;
    top: 1rem;
    right: 1.4rem;
    padding: 0.3rem;
    font-size: 2.6rem;
    z-index: 20;
    cursor: pointer;
    line-height: 2.2rem;
    color: var(--colour-border-grey);

    &::before {
      content: "\00d7";
    }

    &:hover {
      opacity: 1;
    }
  }

  .buttons {
    button {
      border-radius: 0;
      min-width: 10rem;
      margin-right: 1.5rem;
      border: solid 0.1rem var(--colour-border-grey);
      color: var(--colour-text);
      background-color: var(--colour-button-bg);
      cursor: pointer;

      &.dialog-button-primary {
        color: var(--colour-bg);
        background-color: var(--colour-primary);
        border: none;
      }
    }
  }
}
