/* *****************************************************************************
*
*  Item Channel
*
* ***************************************************************************** */

.item-channel {
  .form-selection-input-card-btn__input {
    &:after {
      z-index: 5;
    }
  }

  &__bundle-pseudo-link {
    @include size(100%);
    display: none;
    position: absolute;

    &:before,
    &:after {
      @include size(10px, 2px);
      content: "";
      background: $gray-200;
    }

    &:before {
      @extend .position-absolute--center-left;
      transform: translate(-100%, -50%);
    }

    &:after {
      @extend .position-absolute--center-right;
      transform: translate(100%, -50%);
    }
  }

  &__a-la-carte-price {
    display: none;
    pointer-events: none;
  }

  &--state-cant-unselect {
    &:not(.item-channel--mini-cart){
      .form-selection-input-card-btn {
        @extend .selection-state--active;
        cursor: inherit !important;

        &:after {
          background-image: url('/images/icons/svg-atoms/hourglass.svg');
          max-width: 20%;
          max-height: 15%;
        }

        .form-selection-input-card-btn__label {
          @extend .vui--desactivated;
        }
      }
    }
  }

  &--state-locked {
    .form-selection-input-card-btn {
      @extend .selection-state;
      cursor: inherit !important;

      &:before {
        opacity: 1;
        border-color: $border-color;
      }

      &:after {
        background-image: url('/images/icons/svg-atoms/lock.svg');
        opacity: 1;
        z-index: 5;
        max-width: 20%;
        max-height: 15%;
        left: 12%;
        top: 12%;
        transform: scale(1);
      }

      .form-selection-input-card-btn__label {
        @extend .vui--desactivated;
      }
    }
  }

  &--bundle {
    position: relative;

    .item-channel__bundle-pseudo-link {
      display: block;
    }

    &.bundle-first .item-channel__bundle-pseudo-link:before {
      display: none;
    }
    &.bundle-last .item-channel__bundle-pseudo-link:after {
      display: none;
    }

    &:after {
      @include size(2rem);
      content: "";
      background-image: url('/images/icons/svg-atoms/link.svg');
      background-size: contain;
      background-repeat: no-repeat;
      position: absolute;
      z-index: 5;
      max-width: 20%;
      max-height: 15%;
      left: 1rem;
      top: 1rem;
      pointer-events: none;
    }

    .form-selection-input-card-btn__label {
      &:after {
        left: 11%;
        top: 10%;
      }
    }

    .form-selection-input-card-btn__input {
      &:checked + .form-selection-input-card-btn__label {
        .item-channel__bundle-pseudo-link:before,
        .item-channel__bundle-pseudo-link:after {
          height: 4px;
          background: $primary;
        }
      }
    }
  }

  &--a-la-carte {
    .item-channel__a-la-carte-price {
      display: block;
    }
  }

  &--hd-basic {
    .form-selection-input-card-btn {
      cursor: inherit !important;

      .form-selection-input-card-btn__label {
        pointer-events: none !important;

        .card {
          @extend .bg--none;
          @extend .border-color--transparent;
        }
      }
    }
  }


  // Adjustemnt for the size of the checkbox
  &:not(.item-channel--mini-cart){
    .form-selection-input-card-btn__label {
      &:after {
        max-width: 1.6rem;
        max-height: 1.6rem;
        left: .8rem!important;
        top: 0.8rem!important;
      }
    }
  }
}
