$content-meter-mobile-breakpoint: 600px !default;

.content-meter {
  $self: &;
  .login-link-sent {
    & ~ #{ $self }__title,
    & ~ #{ $self }__call-to-action {
      display: none;
    }
  }
  &__overlay {
    z-index: 1499;
    position: fixed;
    background-color: rgba(0, 0, 0, .7);
    top: 0;
    bottom: 0;
    width: 100%;
    visibility: visible;
    transition: visibility 0s, opacity 0.5s linear;
  }
  &__bar {
    max-height: 66vh;
    overflow: scroll;
    #{ $self } {
      &__call-to-action {
        font-family: $theme-font-family-sans-serif;
        font-size: 18px;
        line-height: 1.25rem;
        display: none;
        @media (max-width: $content-meter-mobile-breakpoint) {
          text-align: left;
        }
        &--site-name {
          font-style: italic;
        }
      }
      &__body {
        display: none;
        #{ $self }__login-form {
          .form-group label {
            color: $white;
          }
          form > .form-group:first-child  {
            align-items: center;
            display: flex;
            flex-direction: column;
            input {
              max-width: 198px;
            }
            &:has( ~ fieldset) {
              input {
                max-width: calc(50% - 10px);
              }
            }
            label {
              display: none;
            }
          }
          @media (max-width: $content-meter-mobile-breakpoint) {
            width: 100%;
          }
          .btn {
            @media (max-width: $content-meter-mobile-breakpoint) {
              width: 100%;
            }
          }
        }
      }
    }
    padding: map-get($spacers, 3);
    position: fixed;
    bottom: 0px;
    width: 100%;
    text-align: center;
    color: $white;
    background: $black;
    z-index: 1501;
  }
  &__toggler {
    border: none;
    background: initial;
    &:focus {
      outline: none;

    }
    .marko-web-icon svg {
      fill: $white;
    };
    @media (max-width: $content-meter-mobile-breakpoint) {
      display: flex;
      width: 100%;
    }
    span:not(.marko-web-icon) {
      @media (max-width: $content-meter-mobile-breakpoint) {
        flex-grow: 2;
        text-align: left;
      }
      color: $white;
      font-family: $theme-font-family-sans-serif;
      font-weight: $font-weight-bold;
      font-size: 18px;
      line-height: 38px;
      letter-spacing: .3px;
      text-transform: none;
    }
  }

  &__login-form {
    max-width: 700px;
    p {
      font-family: $theme-font-family-sans-serif;
      font-weight: 500;
      margin-bottom: 0;
    }
    fieldset {
      display: flex;
      flex-direction: column;
      padding-bottom: map-get($spacers, block);
      .form-group {
        margin-top: map-get($spacers, 2);
        margin-bottom: 0;
        .col-md-6 {
          @include media-breakpoint-up(md) {
            width: 350px !important;
            max-width: 100% !important;
          }
        }
        label {
          margin-bottom: 0;
        }
        .form-group {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          height: 100%;
        }
      }
    }
  }

  @media (min-width: 600px) {
    &__login-form form:has(> :nth-child(-n+2):last-child) {
      display: flex;
      .form-group {
        margin-bottom: 0;
        margin-right: 1rem;
      }
    }
  }

  &--open {
    #{ $self } {
      &__bar {
        padding-bottom: map-get($spacers, 4);
      }
      &__toggler {
        span {
          font-family: $theme-font-family-sans-serif;
          font-size: 17px;
          font-weight: $font-weight-bold;
          color: $white;
          text-transform: uppercase;
          margin-bottom: map-get($spacers, block);
        }
      }
      &__call-to-action {
        display: block;
      }
      &__body {
        display: flex;
        min-height: 108px;
        @media (min-width: $content-meter-mobile-breakpoint) {
          justify-content: center;
          min-height: 48px;
        }
      }
    }
  }
  &--open .content-meter__toggler span {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1;
    margin-bottom: 24px;
    text-transform: none;
  }
}

.marko-web-gam-fixed-ad-bottom--visible ~ .content-meter {
  .content-meter__bar{
    padding-bottom: 120px;
    @media (max-width: $content-meter-mobile-breakpoint) {
      padding-bottom: 70px;
    }
  }
}

.content-meter--display-overlay~.document-container {
  height: calc(100vh - 165px);
  @media (max-width: $content-meter-mobile-breakpoint) {
    height: calc(100vh - 100px);
  }
  overflow: hidden;
}
.content-meter--display-overlay ~ .document-container ~ .site-footer {
  display: none;
}
