@linkColor: #fff;
@whiteColor: #fff;
@headerColor: #000000b3;
@backgroundColor: #0000;

.environment-theme-bg {
  position: absolute !important;
  z-index: -1;
  height: 100%;
  max-height: 464px;
  margin-top: -296px;
  background-size: cover;

  @media only screen and (min-width: 859px) and (max-width: 1012px) {
    max-height: 470px;
  }

  @media only screen and (min-width: 768px) and (max-width: 859px) {
    max-height: 518px;
  }

  @media only screen and (max-width: 768px) {
    max-height: 386px;
  }
}

.environment-theme-header {
  position: relative;
  max-width: 960px;
  padding: 2.5rem 4.5rem;
  padding-bottom: 0;
  margin: 7rem auto !important;
  background-color: @headerColor;
  color: @whiteColor;

  .slate-editor-link,
  a,
  .citation-item,
  .footnote-edit-node {
    border-bottom: 1px solid @linkColor;
    background: @backgroundColor;
    color: @linkColor;
    font-weight: normal !important;

    &:visited {
      color: @linkColor;
    }

    &::after {
      color: @linkColor;
    }

    &:hover {
      border-bottom: none;
      color: @whiteColor;
    }
  }

  .block.group.selected::before,
  .block.group:hover::before {
    border-style: dashed;
  }

  .ui.divider:not(.vertical):not(.horizontal) {
    border-top: 2px solid #fff !important;
  }

  .block .block.selected::before,
  .block .block.selected:hover::before {
    z-index: 0;
  }

  .block-editor-group {
    .block-toolbar {
      border-bottom: none;
      background: none;

      button {
        color: #fff !important;
      }
    }

    fieldset {
      legend {
        background-color: #000000b3;
      }
    }

    .counter {
      &.info {
        color: gray;
      }

      &.warning {
        color: orange;
      }

      &.danger {
        color: pink;
      }
    }
  }

  @media only screen and (max-width: 768px) {
    left: 51%;
    width: 100%;
    padding: 1rem 1.2rem 1rem 1rem;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }

  .documentFirstHeading {
    border-bottom: none;
    margin: 0.5rem 0 3rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;

    @media only screen and (min-width: 502px) and (max-width: 768px) {
      font-size: 1.8rem;
    }

    @media only screen and (max-width: 502px) {
      font-size: 1.5rem;
    }

    &::before {
      border-bottom: none;
    }
  }

  p {
    font-size: 1.25rem;
    line-height: 1.6;
  }
}

.is-authenticated,
.section-edit {
  .environment-theme-header {
    @media only screen and (max-width: 768px) {
      left: 50%;
    }
  }
}

.is-authenticated .environment-theme-bg {
  @media only screen and (min-width: 859px) and (max-width: 939px) {
    max-height: 518px !important;
  }
}

.section-edit {
  .environment-theme-bg {
    margin-top: -275px;

    @media only screen and (min-width: 1031px) and (max-width: 1092px) {
      max-height: 470px !important;
    }
    @media only screen and (min-width: 768px) and (max-width: 1031px) {
      max-height: 522px !important;
    }
  }

  .documentFirstHeading {
    margin-top: -1rem !important;
    margin-bottom: 3rem !important;
  }
}
