@import "variables.scss";

.modal {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, .65);
  z-index: 20;

  .modal-inner {
    position: relative;
    height: 100%;
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .modal-content {
    background-color: white;
    max-width: 80vw;
    max-height: 80%;
    padding: 1em 1.5em;
    position: relative;
    margin: 1em;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .35);

    @media (#{$wide-viewport}) {
      max-width: 35em;
    }

    .modal-close-icon {
      position: absolute;
      right: 1.5em;

      a {
        text-decoration: none;
        color: #888;
      }
    }

    .modal-content-inner {
      h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.25em;
      }

      h4 {
        font-size: 2.5rem;
      }
    }

    form {
      margin: 0;
      margin-bottom: 12px;
    }

    .modal-buttons-seperator {
      margin-top: .5em;
      margin-bottom: 1em;
    }

    .modal-buttons {
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      align-items: center;
      flex-wrap: wrap;

      button,
      a.button {
        margin-left: 1em;

        &:first-child {
          margin-left: 0;
        }
      }
    }
  }

  div.error {
    margin-bottom: 1rem;

    span.message {
      color: #f00;
    }
  }
}
