.container-login {
  display: flex;
  flex-direction: column;
  padding: 0 15px;
  margin: 0 auto;

  @media (min-width: $grid-float-breakpoint) {
    padding: 0;
  }

  #advantages-wrapper {
    order: 2;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    container-type: inline-size;
    background-origin: content-box;

    .advantages-content {
      padding: 22px 22px 0;
    }

    .advantages-content {
      margin: 0 auto;
      border-top: 1px solid #dfdfdf;
    }

    .advantages-title {
      text-align: center;
      font-size: 22px;
      margin-bottom: 16px;
      line-height: 1.4;
    }

    .advantages-list {
      list-style: none;
      padding: 0;
      margin: 0;

      li {
        position: relative;
        padding-left: 28px;
        margin-bottom: 8px;
        font-size: 19px;
        line-height: 1.4;

        &::before {
          content: "";
          position: absolute;
          left: 0;
          top: 2px;
          width: 18px;
          height: 18px;
          background: url('/headers/img/login/ico-check.png') no-repeat center;
          background-size: contain;
        }
      }
    }
  }

  #advantages-wrapper::after {
    content: "";
    display: block;
    aspect-ratio: 381 / 130;
    background: url('/headers/img/login/login-bg.png') bottom center / contain no-repeat;
    margin-top: 24px;
  }

  /* when THIS wrapper is at least 700px wide, switch to cover */
  @container (min-width: 700px) {
    #advantages-wrapper::after { background-size: cover; }
  }

  .tab-content {
    order: 1;
    padding: 0;
  }

  /* Desktop layout: advantages on left, login on right */
  @media (min-width: 768px) {
    flex-direction: row;
    max-width: 100%;
    padding: 0;

    > .tab-content {
      order: 2;
      flex: 1 1 100%;
      max-width: 100%;
      margin: 0;
      padding: 0;
    }

    /* when has advantages → 50/50 */
    #advantages-wrapper {
      flex: 0 0 50%;
      max-width: 50%;
      border-right: 1px solid #dfdfdf;
      min-height: 100vh;
    }

    #advantages-wrapper .advantages-content {
      padding: 44px 45px 2px;
      border-top: 0;
    }

    #advantages-wrapper::after {
      margin-top: auto;
    }

    /* only if #advantages-wrapper exist */
    #advantages-wrapper + .tab-content {
      order: 2;
      flex: 0 0 50%;
      max-width: 50%;
      margin: 0;
      padding: 19px;
    }
  }

  a:not(.btn) {
    cursor: pointer;
    color: $interactive-color;
    &:hover, &:focus {
      color: $interactive-color-hover;
    }
  }

  .login-top {
    padding: 20px 15px 0;
    text-align: center;
    margin-bottom: 20px;
    .modal-title {
      font-size: 20px;
      margin-bottom: 0;
    }
  }

  .btn-block + .btn-block {
    margin-top: 10px;
  }

  .modal-text {
    margin-bottom: 30px;
    p {
      font-size: $font-size-large;
      color: $brand-copy-light;
      margin: 0;
    }
  }

  .confirm-message {
    padding: 0 15px;
  }

  &.container-login-promo {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    .promo-login-container {
      overflow: hidden;
      @media (min-width: $grid-float-breakpoint) {
        display: flex;
        flex-wrap: nowrap;
      }
      .promo-col.exclusiveprices-promo {
        background: $blue-grey-dark url('/headers/ilusion/img/promo/pattern_vip.png') repeat top left;
        background-size: 40%;
        padding: 15px;
        @media (min-width: $grid-float-breakpoint) {
          flex: 1 1 auto;
          max-width: 370px;
          padding: 30px;
          display: flex;
          flex-direction: column;
          justify-content: center;
        }
        p {
          text-align: center;
          color: #fff;
          font-size: 16px;
          strong {
            color: $brand-yellow;
          }
        }
        .promo-title {
          p {
            font-size: 20px;
          }
          &:before {
            content: '';
            display: block;
            width: 70px;
            height: 70px;
            vertical-align: middle;
            margin: 0 auto 15px;
            background: transparent url('/headers/ilusion/sunrise/dist/svg/icon-ownfill-deco-vip.svg') no-repeat top left;
            background-size: 100%;
          }
        }
      }
      .promo-col.rewards-promo {
        background: #000 url('/headers/ilusion/img/promo/bg_rewards_promo.jpg') no-repeat center;
        padding: 15px;
        background-size: cover;
        @media (min-width: $grid-float-breakpoint) {
          flex: 1 1 auto;
          max-width: 370px;
          padding: 30px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          background-size: auto 100%;
        }
        p {
          text-align: center;
          color: #fff;
          font-size: 16px;
          strong {
            color: #fff;
          }
          a {
            &, &:hover, &:focus {
              color: #fff;
              text-decoration: underline;
            }
          }
        }
        .promo-title {
          p {
            font-size: 20px;
          }
          &:before {
            content: '';
            display: block;
            width: 66px;
            height: 66px;
            vertical-align: middle;
            margin: 0 auto 15px;
            background: transparent url('/headers/svg/background/logo_rewards_register.svg') no-repeat top left;
            background-size: 100%;
          }
        }
      }
      .form-col {
        padding-bottom: 30px;
        @media (min-width: $grid-float-breakpoint) {
          flex: 1 0 auto;
          max-width: 400px;
        }
        .btn-block.social-login {
          display: inline-block;
          width: auto;
          padding: 12px;
          line-height: 1;
          .btn-text {
            display: none;
          }
          .icon {
            margin-right: 0;
          }
          & + .btn-block.social-login {
            margin-left: 15px;
            margin-top: 0;
          }
        }
        .options-option {
          text-align: center;
          form {
            text-align: left;
          }
        }
      }
    }
  }

  .close-button-multi_login {
    padding: 15px;
    overflow: hidden;
    &:after, &:before {
      display: table;
      content: " ";
    }
    @media (max-width: $grid-float-breakpoint-max) {
      .close {
        float: left;
        .icon {
          width: 14px;
          height: 14px;
          &, & * {
            fill: $brand-copy-light;
          }
        }
      }
    }
  }
}

.btn-block.fb-login {
  @include button-sunrise(#fff, #3a5a98, #3a5a98, #fff, darken(#3a5a98, 10%));
  .icon {
    &, & * {
      fill: #fff;
    }
  }
}
.btn-block.amazon-login {
  @include button-sunrise(#111, #f7dea1, #f7dea1, #111, darken(#f7dea1, 10%));
  .icon {
    &, & * {
      fill: #111;
    }
  }
}
.btn-block.apple-login {
  @include button-sunrise(#fff, #000, #000, #fff, darken(#000, 10%));
  .icon {
    &, & * {
      fill: #fff;
    }
  }
}
.btn-block.social-login {
  white-space: normal;
  .icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
  }
  .btn-text {
    vertical-align: middle;
  }
}

.separator {
  position: relative;
  overflow: hidden;
  margin: 10px 0;
  text-align: center;
  &:before {
    content: '';
    border-top: 1px solid $colorBordes;
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 1;
    height: 0;
  }
  span {
    color: $brand-copy-light;
    font-weight: $roboto-light;
    padding: 0 3px;
    display: inline-block;
    font-size: $font-size-base;
    line-height: 25px;
    background: $body-bg;
    position: relative;
    z-index: 2;
    .container-login & {
      background: $body-bg;
    }
  }
}

.backtologin {
  margin-top: 30px;
  border-top: 1px dashed $colorBordes;
  padding-top: 20px;
  .icon {
    width: 10px;
    height: 10px;
    vertical-align: middle;
    margin-right: 8px;
    &, & * {
      fill: $interactive-color;
    }
  }
  &:hover, &:focus {
    .icon {
      fill: $interactive-color-hover;
    }
  }
}

.icon-success {
  text-align: center;
  margin-bottom: 20px;
  .icon-anyfill-graph-satisfied {
    width: 40px;
    height: 40px;
    display: inline-block;
    &, & * {
      fill: $brand-green;
    }
  }
}

.social_layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 500;
}
.social_loader {
  text-align: center;
  position: fixed;
  z-index: 501;
  top: 40%;
  left: 50%;
  margin-left: -150px;
  margin-top: -35px;
}

.social_loader p {
  font-size: $font-size-base;
  @include medium-weight;
  color: $brand-grey-dark;
  margin-bottom: 20px;
}

.social_loader .loading_icon {
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  width: 300px;
  margin: 5px auto 10px auto;
  background-image: url('/headers/widgets/tools/loadingiconwidget/img/loading_gif.gif');
}

.modal-form .popover-container .popover {
  max-width: 450px;
  width: 450px;
  left: -55px !important;
  @media (max-width: $grid-float-breakpoint-max) {
    max-width: 300px;
    width: 300px;
    left: 0 !important;
    height: 400px;
    overflow-y: scroll;
  }
}

.popover-text {
  cursor: pointer;
}


// Tablet promo two-column fix
@media (min-width: 768px) and (max-width: 1279px) {
  .container-login .tab-content { margin: 0 !important; }

  .container-login.container-login-promo .promo-login-container {
    display: flex !important;
    width: 100%;
  }

  .container-login.container-login-promo .promo-login-container > .promo-col.rewards-promo,
  .container-login.container-login-promo .promo-login-container > .promo-col.exclusiveprices-promo,
  .container-login.container-login-promo .promo-login-container > .form-col {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
  }

  .container-login.container-login-promo .promo-login-container > .promo-col.rewards-promo {
    max-width: 370px;
  }

  .container-login.container-login-promo .promo-login-container > .form-col .modal-form {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}