@import "variables";

.backdrop {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 4;
}

.modal {
  position: fixed;
  display: flex;
  flex-direction: column;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  color: $textbg;
  background-color: rgba($bg7, 0.9);
  backdrop-filter: blur(5px);
  z-index: 4;
  overflow: hidden;

  .modalForm {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    flex: 1;

    padding-bottom: 25px;
    overflow: hidden;

    .formCancelSubmitButtonGroup {
      display: flex;
      align-self: flex-end;
      justify-content: flex-end;

      min-height: 45px;
      margin: auto 25px 0 auto;

      button:last-of-type {
        margin-left: 20px;
      }
    }
  }
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 80px;
  border-radius: 7px 7px 0 0;
  background-color: $bg1;
  border-bottom: 1px $borderAccent solid;
  padding: 0 25px;

  .modalTitle {
    font-size: 20px;
    font-weight: 600;
    color: $smallSubHeader;
  }
}

@media (min-width: 800px) {
  .modal {
    background-color: $bg7;
    max-height: 70vh;
    height: auto;
    width: 500px;

    top: 40vh;
    left: 50%;
    margin-top: -25vh;
    margin-left: -250px;

    border-radius: 7px;

    .modalForm {
      .formCancelSubmitButtonGroup {
        margin: auto 25px 0 auto;
      }
    }
  }
}
