@import '../helpers/helpers';
@import '../components/my-account/consignment-info';
@import '../components/my-account/shipment';
@import '../components/my-account/menu';
@import '../components/my-account/contacts';
@import '../components/my-account/mobile-nav';
@import '../components/my-account/active-orders';
@import '../components/my-account/saving-totaliser';
@import '../components/my-account/barcode';
@import '../components/my-account/discount';
@import '../components/my-account/clipboard-code';
@import '../components/my-account/cards-swap';
@import '../components/my-account/payment-status';
@import '../libs/font-awesome-icons';
@import '../components/my-account/payment-status';

.my-account {
  margin: 0;
  display: block;
  padding: 0;

  .container .col-12 {
    min-height: auto;
  }

  .notification {
    &_general {
      margin-bottom: 8px;
      margin-top: 8px;
    }

    &_reminder {
      margin: 0 0 1.5rem;
    }

    &_link {
      color: $white;
      text-decoration: none;
      padding: 0 5px;

      &:hover {
        text-decoration: none;
        color: $white;
      }
    }

    &_info-message {
      border: 0;
      text-align: center;
      margin: 0;
      background: $virid-darker;
      color: $white;
      padding: 4px 5px;
      font-size: 0.875rem;
    }
  }

  .account-actions {
    background: $gray-bg;
    padding: 24px 0;

    &__list {
      list-style-type: none;
      display: flex;
      flex-direction: column;
      background: $white;
      padding: 16px;
      margin-bottom: 0;
    }

    &__item {
      & + .account-actions__item {
        margin-top: 16px;
      }
    }

    &__link {
      text-decoration: none;
      font-weight: 500;
      color: $blue;
      display: flex;
      align-items: center;
      transition: all 0.3s;

      &:hover {
        opacity: 0.7;
        text-decoration: underline;
      }

      .icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 8px;
        font-size: 1rem;
      }
    }
  }

  .account-summary {
    background: $ma-white;
    padding: 24px 0;

    &__wrapper {
      background: $blue-dark;
      border-radius: 4px;
      color: $white;
      padding: 16px;
      width: 100%;

      &--secondary {
        background: $gray-wait;
      }
    }
  }

  .discount {
    margin-top: 16px;
    padding-bottom: 26px;
  }

  .clipboard-code {
    display: flex;
    margin-top: 16px;
  }

  .greetings {
    word-break: break-all;

    &--secondary {
      color: $black;
    }

    .title {
      font-weight: 500;
      font-size: 1.625rem;
      line-height: 2.25rem;
      margin-bottom: 0;
      text-align: left;
    }

    .subtitle {
      margin-top: 5px;
      margin-bottom: 0;
    }
  }

  &__banner-wrapper {
    padding-top: 16px;

    &--background {
      background-color: $ma-white;
    }

    .notification {
      margin: 0;

      &.notification_general {
        margin: 0;
      }

      &_link {
        color: $white;
        text-decoration: none;
      }
    }
  }
}

.tooltip {
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.12));
  position: absolute;

  .tooltip-inner {
    background: $white;
    color: $gray-dark;
    padding: 8px 16px !important;
    border-radius: 4px;
    font-weight: 400;
    font-size: 0.75rem;
    line-height: 1rem;
  }

  .arrow:before {
    border-top-color: $white;
  }
}

@include media-breakpoint-up(sm) {
  .d-sm-grid {
    display: grid !important;
  }

  .my-account {
    .account-actions {
      padding-top: 32px;
      padding-bottom: 32px;

      &__list {
        margin-top: 0;
        margin-left: 10px;
        padding: 0 0 0 16px;
        background: transparent;
        border-left: 1px solid $white;
        justify-content: center;
      }

      &__link {
        color: $white;
        white-space: nowrap;
      }
    }

    .account-summary {
      padding-top: 32px;
      padding-bottom: 32px;

      &__wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 3fr;
        grid-gap: 16px;

        .greetings {
          grid-column: span 2;
          display: flex;
          justify-content: space-between;
        }

        .discount,
        .clipboard-code {
          margin-top: 0;
        }

        .discount {
          grid-row: span 2;
          padding-bottom: 16px;

          &__content {
            align-items: center;
          }
        }

        .clipboard-code {
          align-items: center;
        }

        &--double {
          .discount {
            grid-row: auto;
          }
        }
      }
    }

    &__banner-wrapper {
      padding-top: 24px;
    }
  }

  .my-account {
    .cards-swap {
      .account-summary {
        &__wrapper {
          grid-template-rows: auto;
        }
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .my-account {
    .account-actions {
      padding-top: 40px;
      padding-bottom: 70px;
    }

    .account-summary__wrapper {
      padding: 24px;
    }

    .notification_general {
      margin-top: 16px;
      margin-bottom: 16px;
    }

    &__banner-wrapper {
      padding-top: 40px;
    }
  }
}

@include media-breakpoint-up(lg) {
  .my-account {
    .account-summary {
      &__wrapper {
        grid-template-columns: minmax(auto, 502px) repeat(2, minmax(auto, 223px));

        &--double {
          grid-template-columns: repeat(2, 1fr);
        }

        .clipboard-code,
        .discount {
          padding-top: 20px;
          padding-bottom: 20px;
        }

        .greetings {
          grid-column: span 3;
        }

        .discount {
          grid-row: initial;
          flex-direction: row;
          display: flex;
          justify-content: space-between;
          align-items: center;

          .subtitle {
            font-size: 1rem;
          }
        }

        .barcode {
          max-width: 155px;
          height: auto;
          margin-left: 24px;
          padding: 12px;
          margin-top: -4px;
          margin-bottom: -4px;

          &__content,
          &__code {
            display: none;
          }

          &__discount {
            top: -12px;
            right: -12px;
          }
        }
      }
    }

    .clipboard-code.discount-code {
      padding-right: 14px;
    }
  }
}

@include media-breakpoint-up(xl) {
  .my-account {
    .account-summary {
      &__wrapper {
        grid-template-columns: minmax(auto, 502px) 1fr 1fr;

        &--double {
          grid-template-columns: repeat(2, 1fr);
        }

        .icon-wrap {
          width: 48px;
          height: 48px;
        }

        .discount {
          .icon {
            font-size: 1.75rem;
            height: 28px;
            margin: auto 6px;
          }
        }

        .clipboard-code {
          .icon {
            font-size: 2rem;
          }

          .custom-icon {
            width: 36px;
            height: auto;
          }
        }
      }
    }
  }
}
