@import "~moda-themes";
@import '../../shared/constants/breakpoints.scss';

.MiniCartContainer {
  position: absolute;
  max-height: 680px;
  width: 400px;
  display: block;
  top: 56px;
  right: 0;
  bottom: auto;
  z-index: 10;
  border: 1px solid color('nokia');
  border-radius: 0px;
  background-color: color('white');
  overflow-y: visible;
  overflow-x: hidden;
  box-shadow: 0 7px 11px 0 rgba(black, 0.1);
  cursor: default;

  @media screen and (max-width: $small) {
    position: fixed;
    z-index: 999999;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(34, 34, 34, 0.3);
    top: 48px;
    width: 100%;
    border-left: none;
    border-right: none;
    max-height: unset;
  }

  &.just-added {
    &:after,
    &:before {
      border-bottom: 8px solid color('white');
    }
  }
}

.MiniCartJustAddedModal {
  $self: &;
  overflow: hidden;

  @media screen and (max-width: $small) {
    z-index: 10000001;
    left: 0;
    right: 0;
    background-color: color('white');
  }

  &__header-container {
    display: flex;
    justify-content: center;
    margin: 4px 0;
  }

  &__header {
    width: auto;
    padding-left: 10px;
    color: color('black');
    font-family: font-family('serif');
    font-size: 16px;
    line-height: 1.2;
    align-self: center;
  }

  &__checkmark {
    color: color('money-good');
    align-self: center;
  }

  &__image-container {
    width: 38px;
    height: 60px;
    margin-right: 12px;
  }

  @media screen and (min-width: $large) {
    &__tooltip-help-message {
      bottom: 35px;
      margin-left: -3px;
    }
  }

  .summary {
    padding: 0 16px 16px 16px;
    position: relative;
    border-top: 1px solid color('cashmere');
    cursor: default;
    .subtotal {
      display: flex;
      justify-content: space-between;
      color: color('nokia');
      font-size: 14px;
      font-family: font-family('sans');
      letter-spacing: 0.09px;
      line-height: 1.67;
      margin-bottom: 8px;
      .amount {
        font-family: font-family('sans');
        letter-spacing: 0.09px;
        line-height: 1.67;
        text-align: right;
      }
    }
    .pay-today {
      display: flex;
      justify-content: space-between;
      color: color('cement');
      font-family: font-family('sans');
      font-size: 16px;
      letter-spacing: 0.12px;
      line-height: 1.43;
      .text {
        @media screen and (min-width: 1280px) {
          .tooltip-help-message {
            bottom: 35px;
            margin-left: -3px;
          }
        }
      }
      .amount {
        font-family: font-family('sans');
        letter-spacing: 0.12px;
        line-height: 1.43;
      }
    }
    .button-container {
      display: flex;
      width: 100%;
      .first,
      .second {
        flex: 1;
      }
    }
    .go-to-shopping-bag,
    .go-to-checkout,
    .view-bag {
      flex: 1;
      height: 44px;
      background-color: color('black');
      box-shadow: 0 2px 2px 0 rgba(black, 0.05);
      color: color('white');
      font-family: font-family('sans');
      font-size: 12px;
      line-height: 3.67;
      display: block;
      padding: 0 30px;
      margin-top: 14px;
      text-align: center;
      cursor: pointer;
      text-decoration: none;
      &:hover {
        background-color: color('cement');
      }
    }
    .go-to-checkout {
      margin: 20px 0 0 5px;
    }
    .proceed-to-checkout {
      padding: 0 !important;
    }
    .view-bag {
      margin: 20px 5px 0 0;
    }
    .go-to-shopping-bag {
      width: 100%;
    }
  }

  @media screen and (max-width: $small) {
    .summary {
      border-top: none;
      &:before {
        content: '';
        display: block;
        margin: 0 auto;
        margin-bottom: 5px;
        width: 100%;
        border-bottom: 1px solid color('cashmere');
      }
    }
  }
}

