section.simulators.hero-wrapper {
  background: #fff !important;
}

.simulators.simulators-wrapper {
  background-color: #f5f6fa;

  &.transparent-bg {
    background-color: transparent !important;
  }

  .roi-section-header {
    .section-description {
      color: $color-secondary-dark;
    }
  }

  // Reduce section-wrapper vertical padding on mobile inside ROI tabs
  section.section-wrapper {
    @include responsive-max($breakpoint-medium) {
      padding: 40px 0;
    }

    @include responsive-max($breakpoint-small) {
      padding: 24px 0;
    }
  }
}

// ROI section header: responsive h1 for all 4 tabs
.roi-section-header {
  h1 {
    @include responsive-max($breakpoint-medium) {
      font-size: rem-calc(24px);
      line-height: 1.3;
    }

    @include responsive-max($breakpoint-small) {
      font-size: rem-calc(20px);
      line-height: 1.3;
    }
  }
}


.roi-calculator {
  display: grid;
  grid-template-columns: 1fr;
  background-color: #fff;
  padding: 0;

  @include border-radius(10px);
  @include box-shadow(-2px 2px 6px 0 rgba(0, 0, 0, 0.1));

  @include responsive($breakpoint-xmedium) {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .investment {
    border-bottom: 1px solid $color-secondary-light;
    padding: 20px 40px;

    @include border-top-radius(10px);

    @include responsive($breakpoint-xmedium) {
      grid-column: 1 / 3;
      grid-row: 1;
    }

    @include responsive-max($breakpoint-medium) {
      padding: 16px 20px;
    }

    @include responsive-max($breakpoint-small) {
      padding: 14px 16px;
    }
  }

  .loan {
    border-right: 1px solid $color-secondary-light;
    padding: 20px 40px;

    @include responsive($breakpoint-xmedium) {
      grid-column: 1;
      grid-row: 2;
    }

    @include responsive-max($breakpoint-medium) {
      padding: 16px 20px;
      border-right: none;
      border-bottom: 1px solid $color-secondary-light;
    }

    @include responsive-max($breakpoint-small) {
      padding: 14px 16px;
    }
  }

  .roi {
    padding: 20px 40px;
    background-color: rgba($color-secondary-light, 0.1);

    @include border-bottom-right-radius(10px);

    @include responsive($breakpoint-xmedium) {
      grid-column: 2;
      grid-row: 2;
    }

    @include responsive-max($breakpoint-medium) {
      padding: 16px 20px;
    }

    @include responsive-max($breakpoint-small) {
      padding: 14px 16px;
    }
  }

  // Override global float-based layout for results-table inside roi-calculator
  ul.results-table {
    li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 4px;
    }
  }

  span.results-table-item-title {
    float: none !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  span.results-table-item-value {
    float: none !important;
    flex: 0 1 auto;
    text-align: right;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: 100%;
  }
}

ul.results-table {
  list-style: none;
  margin: 0;
  padding: 0;

  li {
    margin: 0 0 7px;
    position: relative;

    @include pie-clearfix;

    &:last-child {
      margin: 0;
    }
  }

  .table-separator {
    border-top: 1px solid $color-secondary-light;
    padding-top: 10px;
  }

  .table-total {
    span {
      font-size: rem-calc(22px);
    }

    span.results-table-item-value {
      &.positive {
        color: $color-success;
      }

      &.negative {
        color: $color-alert;
      }
    }

    img.icon.question-sign {
      margin-bottom: 0;
    }
  }

  // SMALL RESULTS
  &.small {
    span {
      font-size: rem-calc(14px);
    }
  }
}

ul.results-table, label {
  img.icon.question-sign {
    display: inline-block;
    width: 16px;
    margin-bottom: -2px;
  }
}

span.results-table-item-title {
  font-size: rem-calc(16px);
  font-weight: 900;

  @include float(left);
}

span.results-table-item-value {
  font-size: rem-calc(16px);
  font-weight: 900;

  @include float(right);
}

.calculator-wrapper {
  padding: 20px 40px;
  background-color: rgb(255 255 255 / 100%);
  border-radius: 5px;
  box-shadow: rgb(50 50 93 / 25%) 0 13px 27px -5px, rgb(0 0 0 / 30%) 0 8px 16px -8px;
  opacity: 0.9;

  @include responsive-max($breakpoint-xlarge) {
    margin-right: 40px;
  }

  @include responsive-max($breakpoint-xmedium) {
    display: none;
  }

  header {
    margin: 0 0 20px;

    h1 {
      color: $color-primary;
      font-size: rem-calc(26px);
      font-weight: 900;
      line-height: 36px;
      margin: 0 0 10px;

      // @include responsive($breakpoint-medium) {
      //   font-size: rem-calc(40px);
      //   line-height: 46px;
      // }
    }

    p {
      font-size: rem-calc(16px);
      opacity: 0.5;
      margin: 0;
    }
  }

  .calc-inputs {
    .grid {
      column-gap: 20px;
    }
  }

  .calc-results {
    a.to-simulator {
      display: block;
      font-size: rem-calc(14px);
      margin-top: 20px;
    }
  }

  .calc-cta {
    padding: 25px 0 5px;
  }

  .footer {
    border-top: 1px solid $color-secondary-light;
    font-size: rem-calc(12px);
    padding-top: 20px;
  }
}
