body:has(dialog[open]) {
  overflow: hidden;
}

.popup {
  border: none;
  outline: none;
  max-width: 1140px;
  // to mitigate default dialog behaviour, as we cannot change margins
  width: calc(90% - 30px);
  padding: 40px 15px;
  background-color: $light_green;
  border-radius: 50px;
  box-shadow: 0 20px 100px 0 rgba(54, 120, 69, 0.20);
  overflow: auto;
  max-height: 60vh;
  overflow-x: hidden;

  @media (min-width: $breakpoint_lg) {
    padding: 80px;
    width: calc(90% - 160px);
    border-radius: 100px;
  }

  @media (max-width: $breakpoint_lg - 1) {
    max-height: calc(90% - 30px);
  }

  .close {
    color: $light_grey;
    font-size: 24px;
    font-weight: bold;
    float: right;
    margin-top: -20px;
    cursor: pointer;

    @media (min-width: $breakpoint_lg) {
      margin-top: -30px;
      margin-right: -30px;
    }
  }

  .close:hover,
  .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }

  .team-dialog-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    z-index: 999;

    @media (min-width: $breakpoint_lg) {
      flex-direction: row;
    }

    .instructor-img {
      border-radius: 50px;
      width: 300px;
      height: 300px;
      background-size: cover;
      background-position: top;
      background-repeat: no-repeat;
      flex-shrink: 0;

      @media (min-width: $breakpoint_lg) {
        width: 390px;
        height: 450px;
      }
    }

    .dialog-text {
      display: flex;
      flex-direction: column;
      gap: 5px;
      color: $dark_green;
      white-space: normal;
    }
  }

  .newsletter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;

    .newsletter-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: $dark_green;
      gap: 20px;
    }

    #newsletter-popup-form {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
  }

  .course-list-element {
    color: black;
    background-color: white;
  }
}

.grecaptcha-badge {
  visibility: hidden;
}

.popup::backdrop {
  padding: 20px;
}
