@import 'moda-themes/themes';

.mini-cart-summary {
  &.tooltip-help-icon {
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: -2px;
    padding: 0 5px;
    font-size: 15px;
    color: color('nokia');
    &:hover {
      .mo-web-icon-question {
        color: color('cashmere');
      }
    }

    .mo-web-icon-question {
      margin-left: 3px;
      font-size: 15px;
      color: color('nokia');
    }

    .tooltip-help-message {
      font-family: font-family('sans');
      position: absolute;
      z-index: 10000;
      bottom: 35px;
      transform: translateX(-48%);
      width: 220px;
      padding: 15px;
      color: color('cement');
      background-color: color('noise');
      font-size: 11px;
      border: 1px solid color('nokia');
      margin-left: -3px;
      line-height: 1.64;

      &:before {
        content: '';
        position: absolute;
        display: block;
        left: 0;
        right: 0;
        bottom: -10px;
        width: 100%;
        height: 10px;
      }

      &:after {
        content: '';
        border-right: 1px solid color('nokia');
        border-bottom: 1px solid color('nokia');
        position: absolute;
        left: 50%;
        bottom: -6px;
        width: 10px;
        height: 10px;
        margin-left: -5px;
        background-color: color('noise');
        transform: rotate(45deg);
      }

      .tooltip-help-link {
        display: inline-block;
        font-family: font-family('sans');
        color: color('cement');

        &:hover,
        &:focus,
        &:active,
        &:visited {
          color: color('cement');
        }
      }

      .mo-web-icon-close {
        display: none;
      }

      .mo-web-icon-question-filled {
        display: none;
      }
    }
  }
}

@media screen and (max-width: 992px) {
  .deposit_price {
    &.deposit_price--with-help {
      text-decoration: underline;
    }
  }

  @media screen and (max-width: 992px) {
    .mini-cart-summary {
      &.tooltip-help-icon {
        .tooltip-help-overlay {
          position: fixed;
          z-index: 10000000;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background-color: rgba(black, 0.3);
        }

        .tooltip-help-message {
          position: fixed;
          z-index: 10000001;
          left: 20px;
          right: 20px;
          top: 100px;
          bottom: auto;
          width: auto;
          height: auto;
          transform: none;
          padding: 40px 30px;
          text-align: center;
          background-color: white;
          border-radius: 6px;
          font-size: 13px;
          line-height: 1.38;

          &:before,
          &:after {
            display: none;
          }

          .tooltip-help-link {
            display: block;
            margin-top: 25px;
            text-decoration: underline;

            &:hover,
            &:focus,
            &:active,
            &:visited {
              text-decoration: underline;
            }
          }

          .mo-web-icon-close {
            display: block;
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 20px;
            color: color('nokia');
          }

          .mo-web-icon-question-filled {
            display: block;
            position: relative;
            margin-bottom: 25px;
            font-size: 22px;
            color: color('cement');
          }
        }
      }
    }
  }
}
