.card-result-payment-single {
  position: sticky;
  top: 0;

  &__inner {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    background-color: var(--color-tertiary-brand);
    padding: 24px 32px 32px;
    position: relative;
  }

  &.scroll {
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: 12;

    .card-result-payment-single__inner {
      padding: 24px 20px;
    }
  }

  &__preloader {
    position: absolute;
    height: 100%;
    width: 100%;
    margin: -32px;
    z-index: 1;
    /* para que no lo tapen los tooltips  (CA. R.) */

    .preloader {
      background-color: var(--color-blanket-subtle);
      position: unset;
    }
  }

  &.error {
    .card-result-payment-single__inner {
      justify-content: center;
      text-align: center;
      padding: 56px 32px;
      align-items: center;
      gap: 32px;
    }
  }

  &__error-comparison {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 180px;

    @media (--viewport-ms-max) {
      margin-top: 0;
    }
  }

  &__scroll {
    display: flex;
    flex-direction: column;
    gap: 8px;

    .payment-scroll,
    .breakdown-scroll {
      display: flex;
      flex-direction: row;
      justify-content: space-between;

      .wrap {
        display: flex;
        align-items: baseline;
        gap: 4px;
      }
    }

    .link {
      width: fit-content;
      align-self: center;
      justify-content: center;
      margin-top: 8px;
      color: var(--color-text-link-secondary);

      .icon {
        fill: var(--color-icon-accent);
      }
    }
  }

  &__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    img {
      margin-bottom: 16px;
    }

    .bodycopy-m {
      color: var(--color-text-inverse);
      height: 48px;
      display: flex;
      align-items: center;
      text-align: center;

      @media (--viewport-ms-max) {
        height: 72px;
      }
    }
  }

  &__head {
    background-color: var(--color-background-accent-bold);
    margin: -24px -32px 24px;
    padding: 24px 32px;

    .title-l {
      color: var(--color-text-inverse);
    }

    .label {
      color: var(--color-text-inverse);
      margin-bottom: 0;
    }

    img {
      filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%)
        hue-rotate(309deg) brightness(107%) contrast(99%);
    }

    & + .bodycopy-s {
      text-align: center;
      min-height: 46px;
    }
  }

  &.comparison {
    &.product-unavailable {
      height: 100%;
    }
    .card-result-payment-single__inner {
      height: 100%;
      padding-top: 32px;
    }

    .card-result-payment-single__head {
      background-color: transparent;
      margin-bottom: 0;
      margin-top: 0;
      padding-top: 0;
      padding-bottom: 32px;

      .title-l {
        color: var(--color-text-accent);
      }

      img {
        filter: unset;
      }
    }

    .card-result-payment-single__additional {
      border-bottom: 0;
      padding-bottom: 0;
      margin-bottom: 0;

      &.no-spread {
        margin-bottom: 28px !important;
      }
    }
  }

  &__form-radio-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 48px;
    gap: 32px;
    margin-bottom: 32px;

    .radio-group ul {
      margin-bottom: 0;
    }

    @media (--viewport-sm-max) {
      height: 72px;
    }

    .bodycopy-s {
      text-align: center;
      height: 40px;
      display: flex;
      align-items: center;
    }

    .form-radio-group {
      display: flex;
      justify-content: center;
      margin-bottom: 0;

      .field-top {
        display: none;
      }

      ul {
        .radio-group__item {
          margin-right: 16px;

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

  &.comparison .card-result-payment-single__form-radio-group {
    height: 105px;

    @media (--viewport-sm-max) {
      height: auto;
    }

    .bodycopy-m {
      min-height: 48px;

      @media (--viewport-sm-max) {
        height: auto;
      }
    }
  }

  .item {
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;

    .pretitle-payment {
      margin-bottom: 4px;
    }

    li {
      margin-top: 0;
      width: auto;

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

    ul.breakdown {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: 4px;

      li {
        display: flex;
        width: 100%;
        justify-content: space-between;
        line-height: normal;

        .breakdown-text {
          display: flex;

          .tooltip {
            top: 4px;
            right: -8px;
          }
        }
      }
    }

    .card-result-payment-single__item-number {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      margin-bottom: 24px;

      li {
        padding: 0 3px;
        line-height: normal;

        .bodycopy-l {
          position: relative;
          top: -2px;
        }

        .title-l {
          color: var(--color-text);
        }
      }
    }

    .tooltip .msg-tooltip {
      text-align: left;
    }
  }

  &__additional {
    display: flex;
    flex-direction: column;
    border-bottom: solid 1px var(--color-border);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    row-gap: 4px;
    column-gap: 16px;

    ul {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      row-gap: unset;
      column-gap: 16px;

      li {
        /*margin-bottom: 12px;*/
        line-height: normal;

        &:last-of-type {
          white-space: nowrap;
        }

        /*@media (--viewport-xs-max) {
          &:first-of-type {
            max-width: 70%;
          }
        }*/

        .card-result-payment-single__additional-item {
          display: flex;

          .tooltip {
            top: 4px;
            right: -8px;
          }
        }
      }
    }
  }

  .wrap-img {
    height: 37px;
    display: flex;
    align-items: center;
  }

  &__item-clarification {
    display: flex;
    align-items: center;
    justify-content: center;

    li {
      padding: 0 3px;
      line-height: normal;

      .title-s {
        padding-bottom: -3px;
        color: var(--color-text-primary);
      }

      .bodycopy-xs {
        margin-bottom: -3px;
      }
    }
  }

  .wrap-btn {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;

    .btn {
      justify-content: center;
    }
  }

  .wrap-link {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 16px 0;
    padding-top: 16px;
    align-items: flex-start;
  }

  .link-comparison {
    border-top: solid 1px var(--color-border);
    margin-top: 16px;
    padding-top: 32px;

    .link {
      color: var(--color-text-error);

      .icon {
        fill: var(--color-icon-accent);
      }
    }
  }

  .wrap-fine {
    max-height: 5000px;
    /*overflow: hidden; tengo que quitarlo porque corta los tooltips (CA.R.)*/
    opacity: 1;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;

    &.collapsed {
      max-height: 0;
      opacity: 0;

      & + .link-comparison {
        border-top: 0;
        margin-top: 32px;
        padding-top: 0;
      }
    }
  }

  .wrap-dedicated-link {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
  }

  .wrap-alert {
    .alert.inline .alert__wrap {
      margin: 16px 0 0;
    }
  }

  .legal-text {
    margin-top: 40px;
  }

  /*&__nav {
          display: flex;
          max-width: 300px;
          margin-left: auto;
          margin-right: auto;
          margin-bottom: 40px;
          padding: 24px 20px 0;
          justify-content: center;
          align-items: center;
  
          @media (--viewport-ms-max) {
              display: flex;
          }
  
          &-tabs {
              .menu-tab {
                  margin: 40px 0;
  
                  &-scroller__scroll-content {
                      width: 100%;
  
                      .menu-tab-item {
                          width: 33.3%;
                      }
                  }
              }
  
              .title-m {
                  text-align: center;
                  display: block;
              }
          }
      }*/
}
