body {
  padding-top: 6.5rem;
  @media (max-width: 500px) {
    padding-top: 11rem;
  }
  @media (max-width: 412px) {
    padding-top: 12rem;
  }
}

input:-moz-placeholder,
textarea:-moz-placeholder {
  color: $color-light-grey-2;
  opacity: 1;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: $color-light-grey-2;
  opacity: 1;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: $color-light-grey-2;
  opacity: 1;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: $color-light-grey-2;
  opacity: 1;
}

#main {
  .inside {
    margin: 0 auto;
    width: 80vw;
    max-width: 1280px;
    padding: 3rem 0;
    min-height: calc(100vh - 68px - 104px);
    @media (max-width: 1600px) {
      width: 90vw;
    }
    @media (max-width: 1423px) {
      width: 90vw;
    }
  }

  h1 {
    font-size: 2rem;
    line-height: 2.5rem;
    padding: 0 0 2rem 0;
    @media (max-width: 767px) {
      font-size: 1.25rem;
      line-height: 1.5rem;
    }

    span {
      font-size: 1rem;
      @media (max-width: 767px) {
        font-size: 0.875rem;
      }
    }
  }

  h2, h3 {
    font-size: 1.5rem;
    line-height: 2rem;
    padding: 0 0 1.5rem 0;
    @media (max-width: 767px) {
      font-size: 1rem;
      line-height: 1.25rem;
    }
  }

  h3 {
    font-weight: bold;
    text-transform: uppercase;
  }

  h4 {
    font-size: 1.25rem;
    line-height: 1.5rem;
    padding: 0 0 0.5rem 0;
    font-weight: bold;
  }

  h5, h6 {
    font-size: 1rem;
    line-height: 1.25rem;
    padding: 0 0 0.5rem 0;
    @media (max-width: 767px) {
      font-size: 0.875rem;
      line-height: 1rem;
    }
  }

  p, ul, ol, table {
    margin: 0 0 1.5rem 0;
  }

  p {
    &.img {
      img {
        float: left;
        margin: 0 20px 20px 0;
        width: 200px;
        height: auto;
      }
    }
  }

  .mini-nav {
    padding: 0 0 1.5rem 0;

    a {
      color: $color-bim-100;

      &:before {
        content: "<< ";
      }

      &:hover {
        text-decoration: none;
      }
    }
  }

  .container {
    padding: 0 0 1.5rem 0;
  }

  .logo-bar {
    li {
      overflow: hidden;
      padding: 0 0 10px 0;
      display: flex;
      align-items: center;

      img {
        //width: 120px;
        float: left;
        margin-right: 40px;
        height: 100px;
        @media (max-width: 767px) {
          float: none;
          margin-bottom: 20px;
        }
      }

      p {
        //margin-left: 150px;
        @media (max-width: 767px) {
          margin-left: 0;
        }
      }
    }
  }
}

.btn {
  border: 1px solid $color-bim-100;
  background: $color-bim-100;
  color: $color-white;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  @include transition;

  &:hover {
    background: $color-bim-80;
    border-color: $color-bim-80;
    color: $color-white;
  }

  &[disabled] {
    opacity: 0.5;
    background: $color-black;
    border-color: $color-black;
    cursor: default;
  }

  &--inverse {
    background: $color-white;
    color: $color-bim-100;
  }

  &--correct {
    border-color: $color-bim-green;
    background: $color-bim-green;
    color: $color-white;

    &:hover {
      background: $color-white;
      border-color: $color-bim-green;
      color: $color-bim-green;
    }
  }
}

.form {
  &--row {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;

    #header & {
      @media (max-width: 500px) {
        padding-top: 20px;
      }
    }

    &.form--row-right {
      justify-content: flex-end;
      margin-right: 5%;
    }
  }

  &--wrapper {
    width: 270px;
    padding: 0 0 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;

    #header & {
      padding-bottom: 0;
      width: 200px;

      &.fw--no-width {
        width: auto;
        @media (max-width: 412px) {
          margin-top: 10px;
        }
      }

      @media (max-width: 768px) {
        width: 120px;
      }
      @media (max-width: 412px) {
        width: 110px;
      }
    }

    &.mandatory {
      label {
        font-weight: 700;
      }
    }

    label {
      display: block;
      padding: 0 0 0.25rem 0;
      font-size: 0.875rem;
      line-height: 1.5rem;
      width: 100%;
    }

    input {
      display: block;
      font-size: 1rem;
      line-height: 1.5rem;
      width: 90%;

      &[type='checkbox'] {
        width: auto;
      }
    }

    textarea {
      display: block;
      font-size: 1rem;
      line-height: 1.5rem;
      padding: 1rem;
      width: 100%;
      height: 10rem;
      @media (max-width: 1048px) {
        width: 60%;
      }
      @media (max-width: 768px) {
        width: 100%;
      }
    }
  }

  &--legal {
    padding: 0 0 1.5rem 0;

    .form--wrapper {
      width: auto;
      max-width: 80%;
      @media (max-width: 1048px) {
        max-width: none;
      }
    }

    .form-wrapper--container {
      display: flex;
      flex-wrap: nowrap;
      justify-content: flex-start;
      align-items: start;
      @media (max-width: 1048px) {
        display: block;
      }
    }

    .form--checkbox {
      input {
        float: left;
        margin: 5px 8px 0 0;
      }
    }
  }

  &--catalogue {
    border-top: 2px solid $color-black;
    padding: 0 0 1.5rem 0;

    .form-wrapper--container {
      display: flex;
      flex-wrap: nowrap;
      justify-content: flex-start;
      align-items: start;
      @media (max-width: 1048px) {
        display: block;
      }
    }

    h3 {
      text-align: center;
      width: 100%;
    }

    .question-count {
      padding: 1.5rem 0;
      position: relative;

      p {
        padding: 0;
      }

      .progressbar {
        position: absolute;
        left: 0;
        bottom: 0;
        height: 12px;
        width: 100%;
        background: #ddd;

        div {
          position: absolute;
          left: 0;
          bottom: 0;
          height: 12px;
          width: 0;
          background: green;
        }
      }
    }

    .catalogue-nav {
      display: flex;
      justify-content: space-between;
      padding: 0 0 1.5rem 0;
      @media (max-width: 1024px) {
        flex-wrap: wrap;
        justify-content: center;
        .save {
          width: 100%;
          text-align: center;
        }
        span:not(.btn) {
          order: 3;
          justify-content: center;
          display: flex;
          flex-wrap: wrap;

          &:first-of-type {
            order: 2;
          }
        }
        .btn {
          order: 1;
          margin: 10px 10px 0 10px;
        }
      }
    }

    .form--wrapper {
      width: auto;
      justify-content: center;

      .btn {
        float: right;
      }

      &.left {
        justify-content: flex-start;
      }
    }

    h2 {
      font-size: 2rem;
      line-height: 3rem;
    }

    label {
      font-size: 1.5rem;
      line-height: 2rem;
      @media (max-width: 767px) {
        font-size: 1rem;
        line-height: 1.25rem;
      }
    }

    .form--checkbox {
      label {
        display: flex;

        input {
          display: inline;
          width: auto;
          margin: 9px 10px 0 0;
          @-moz-document url-prefix() {
            margin-top: 0;
          }
        }
      }
    }
  }

  &--question {
    border-top: 2px solid $color-black;
    padding-top: 1.5rem;
  }

  .alert {
    font-size: 0.75rem;
    line-height: 1rem;
  }
}

.alert {
  color: $color-bim-100 !important;
}

#message {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 3000;
  display: none;
  color: $color-white;
  font-size: 1.5rem;

  &.success {
    background: green;
  }

  &.failure {
    background: $color-bim-100;
  }

  p {
    padding: 1.5rem;
  }
}

/* New MPP */

.row-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: end;
  &-up {
    align-items: flex-start;
  }

  .col-box {
    width: 60%;
    @media (max-width: 1024px) {
      width: 50%;
    }
    @media (max-width: 850px) {
      width: 40%;
    }
    @media (max-width: 650px) {
      width: 100%;
    }

    &:nth-child(2) {
      width: 30%;
      @media (max-width: 1024px) {
        width: 40%;
      }
      @media (max-width: 850px) {
        width: 50%;
      }
      @media (max-width: 650px) {
        width: 100%;
      }
    }

    .col-box {
      width: 48%;
      @media (max-width: 850px) {
        width: 100%;
      }
    }
  }
  .row-box {
    @media (max-width: 850px) {

    }
  }
}

#main {
  .form--catalogue {
    padding-top: 20px;

    h2 {
      padding-bottom: 10px;
    }
  }
}

.form-fields {
  padding: 0 0 30px 0;

  label {
    display: block;
    font-size: 16px;
    line-height: 1.5rem;
    padding-bottom: 10px;
  }

  input, select {
    display: block;
    width: 100%;
    max-width: 350px;
    background: #fff;
    border: 1px solid #000;
    padding: 10px 10px;
    border-radius: 0;
    @media (max-width: 650px) {
      max-width: none;
    }
    &#asset {
      max-width: 550px;
      @media (max-width: 1350px) {
        max-width: none;
      }
    }
  }

  select {
    box-shadow:none;
    outline:none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSdibGFjaycgaGVpZ2h0PScyNCcgdmlld0JveD0nMCAwIDI0IDI0JyB3aWR0aD0nMjQnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PHBhdGggZD0nTTcgMTBsNSA1IDUtNXonLz48cGF0aCBkPSdNMCAwaDI0djI0SDB6JyBmaWxsPSdub25lJy8+PC9zdmc+) no-repeat calc(100% - 6px) 3px;
  }
}

.result-box {
  background: rgba(118, 127, 134, .3);
  padding: 30px 20px;

  dl {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 0 20px 0;

    dt, dd {
      padding: 0 0 10px 0;
      margin: 0 0 10px 0;
      border-bottom: 1px solid #000;

      &:last-of-type {
        border-bottom: none;
      }
    }

    dt {
      flex-basis: 75%;
      font-weight: normal;
    }

    dd {
      flex-basis: 25%;
      font-weight: bold;
      text-align: right;
    }
  }

  h3 {
    text-align: left;
  }

  .btn {
    margin: 0 auto;
  }

  .result-existing {
    display: none;
    p {
      padding: 1.25rem;
    }
  }

  .result-not-existing {
    display: block;
  }

  &.result-existing {
    .result-existing {
      display: block;
    }

    .result-not-existing {
      display: none;
    }
  }
}

ol.worksheets {
  li {
    padding-bottom: 10px;
    strong {
      padding-right: 10px;
    }
  }

  a {
    text-decoration: none;

    &:hover {
      color: #e2003c;
      text-decoration: underline;
    }
  }
}

#main {
  table.mini-table {
    width: 50%;
    margin: 0 0 4rem 0;
    border-collapse: collapse;
    @media (max-width: 1200px) {
      width: 75%;
    }
    @media (max-width: 768px) {
      width: 100%;
    }

    td {
      vertical-align: top;
      padding: 10px 0;
      border-bottom: 1px solid #000;

      &:last-child {
        text-align: right;
        font-weight: bold;
      }
      span {
        display: block;
        padding: 0 10px 0 0;
      }
    }

    &.fifty-fifty {
      td {
        width: 50%;
      }
    }
  }

  .worksheet-table {
    overflow: auto;
    height: 500px;
    margin-bottom: 30px;

    table {
      width: 100%;
      min-width: 1200px;
      padding: 0;
      margin: 0 0 4rem 0;
      border-collapse: collapse;
    }

    .ins {
      border-right: 1px solid rgba(118, 127, 134, .3);
    }
    .ins-2 {
      background: rgb(230, 230, 230);
    }

    th {
      padding: 0 0 20px 0;
      background: #d5d8da;
      vertical-align: bottom;
      font-weight: bold;
      height: 200px;
      position: sticky;
      top: 0;

      span {
        display: block;
        transform: rotate(-90deg);
        transform-origin: left center;
        position: absolute;
        left: 50%;
        bottom: 0;
      }

      &:last-child,
      &:nth-child(2),
      &:nth-child(3) {
        span {
          transform: none;
          transform-origin: inherit;
          position: static;
          left: auto;
          bottom: auto;
        }
      }
    }

    td {
      vertical-align: top;
      border-bottom: 1px solid rgba(118, 127, 134, .3);
      padding: 15px 0;
      text-align: center;

      &:nth-child(2) {
        width: 30%;
      }

      &:last-child {
        width: 20%;
      }

      &:last-child,
      &:nth-child(2),
      &:nth-child(3) {
        text-align: left;
      }
      img {
        margin: 0 8px;
      }
    }
  }
}
#calculate-first {
  width: 100%;
  padding-bottom: 20px;
}

#no-benchmark-data,
#benchmark-data,
#calculate-first {
  display: block;
}

#create-worksheet {
  display: none;
}
