@import '~@angular/material/theming';
@import "../../../../scss/variables";
@import "../../../../scss/mixins";
@import "../../../../scss/palettes";
@import "../../../../../public/css/mixins";
@import "../../../../../public/css/variables";
@import "~material-components-web/material-components-web";

:host {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.discover-user {
  min-height: 175px;
  padding: 20px 20px;
  border-radius: 6px;
  @include ng-theming {
    background-color: theme-get('color-secondary');
  }
  box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.02);
  cursor: pointer;

  &__avatar-image {
    max-width: 66px;
    max-height: 66px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: contain;

    &--icon {
      font-size: 66px;
      @include ng-theming {
        color: theme-get('color-primary');
      }
    }
  }

  &__name {
    font-family: Roboto;
    font-size: 17px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.3;
    letter-spacing: normal;
    // color: #323c47;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__label {
    margin-bottom: 5px;
    opacity: 0.5;
    font-family: Roboto;
    font-size: 14px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    // color: #323c47;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }

    &--opaque {
      opacity: 1;
      color: #333333;
    }
  }

  &__followers {
    font-family: Roboto;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.3;
    letter-spacing: normal;
    color: #00baff;
  }

  &__raiting {
    font-family: Roboto;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.3;
    letter-spacing: normal;
    color: #00baff;
    text-transform: uppercase;
  }

  &--highlight {
    box-shadow: 0 0 9px 0 #6c66fb;
  }
}

.discover-knok {
  min-height: 175px;
  @include ng-theming {
    background-color: theme-get('color-secondary');
  }
  border-radius: 6px;
  box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.02);

  &__header {
    padding: 0 0 0 20px;
    @include ng-theming {
      border: solid 1px theme-get('color-list-item-spacer');
      background-color: theme-get('color-list-item-header');
    }
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    box-shadow: 0 2px 9px 0 rgba(0, 0, 0, 0.07);
    z-index: 22;
  }

  &__body {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    @include ng-theming {
      background-color: theme-get('color-list-item-body');
    }
  }

  &__tile {
    position: relative;
    margin: 0 20px;
    padding: 20px 0;

    &:after {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      right: 0;
      width: 1px;
      height: 100%;
      margin-right: -20px;
      @include ng-theming {
        border-right: solid 1px theme-get('color-filter-spacer');
      }
    }

    &--last:after,
    &:last-child:after {
      border-right: 0;
    }
  }

  &__label {
    margin-bottom: 15px;
    opacity: 0.5;
    font-family: Roboto;
    font-size: 13px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: 1px;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
    text-transform: uppercase;
    white-space: nowrap;
  }

  &__trading {
    font-family: Roboto;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    color: $knk-color-primary;
  }

  &__exchange {
    opacity: 0.25;
    font-family: Roboto;
    font-size: 20px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__touched {
    font-family: Roboto;
    font-size: 14px;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    color: $knk-color-primary;
  }

  &__mine {
    font-family: Roboto;
    font-size: 14px;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    color: $knk-color-primary;
  }

  &__tgl-favorite.mdc-icon-toggle,
  &__tgl-favorite {
    width: 15px;
    height: 15px;
    padding: 15px;
    opacity: 0.5;
    @include ng-theming {
      color: theme-get('color-font');
    }

    &:before,
    &:after {
      border-radius: 25%;
    }
  }

  &__tgl-favorite--on.mdc-icon-toggle,
  &__tgl-favorite--on {
    color: $knk-color-primary;
  }

  &__btn-menu.mdc-icon-toggle,
  &__btn-menu {
    /*width: 15px;
    height: 15px;
    padding: 15px;*/
    cursor: pointer;
    @include ng-theming {
      color: theme-get('color-font');
    }

    &:before,
    &:after {
      border-radius: 25%;
    }
  }

  &__profit {
    font-family: Roboto;
    font-size: 32px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__purchases {
    font-family: Roboto;
    font-size: 32px;
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__analysis {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 15px;
    @include ng-theming($if: default) {
      background-color: #e2e2e2;
    }
    @include ng-theming($if: night) {
      background-color: theme-get('color-background');
    }
    font-family: Roboto;
    font-size: 16px;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #ffffff;
    cursor: pointer;

    &--technical {
      background: linear-gradient(120deg, #4275ff, #82a3ff);
    }

    &--fundamental {
      background: linear-gradient(120deg, #3bb3eb, #70d1fe);
    }
  }

  &__time {
    font-family: Roboto;
    font-size: 12px;
    font-style: normal;
    font-stretch: normal;
    line-height: normal;
    letter-spacing: normal;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__time-icon {
    opacity: 0.75;
    vertical-align: middle;
    transform: scale(0.9);
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__time-label {
    padding: 0 5px;
    opacity: 0.5;
    vertical-align: middle;
    font-size: 12px;
    font-weight: normal;
    @include ng-theming {
      color: theme-get('color-ongoing-label');
    }
  }

  &__time-left {
    vertical-align: middle;
    font-size: 12px;
    font-weight: bold;
  }

  /* Tooltip */
  &__tooltip {
    position: relative;
    z-index: 40;
  }

  &__tooltip-float {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 11;
    visibility: hidden;
    width: 200px;
    margin-left: -100px;
    padding: 15px;
    border: solid 1px rgba(0, 186, 255, 0.16);
    border-radius: 3px;
    opacity: 0;
    transition: opacity 1s;
    box-shadow: 0 0 20px -9px rgba(0, 0, 0, 0.5);
    @include ng-theming {
      background-color: theme-get('color-secondary');
    }
    color: #000;
  }

  &__tooltip-float::after {
    content: " ";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    @include ng-theming {
      border-color: transparent transparent theme-get('color-secondary') transparent;
    }
  }

  &__tooltip:hover &__tooltip-float {
    visibility: visible;
    opacity: 1;
  }

  &__tooltiptext-info,
  &__tooltiptext-text,
  &__tooltiptext-link {
    display: inline-block;
    margin-bottom: 4px;
    text-align: left;
  }

  &__tooltiptext-info {
    opacity: 0.5;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;

    .material-icons {
      vertical-align: middle;
    }
  }

  &__tooltiptext-text {
    font-size: 16px;
    letter-spacing: normal;
  }

  &__tooltiptext-link {
    font-size: 16px;
    letter-spacing: normal;
    color: #9b9b9b;
  }

  &--highlight {
    box-shadow: 0 0 9px 0 #6c66fb;
  }

  &__save {
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;

    .knk-svg-icon.knk-svg-icon--save {
      position: absolute;
      top: -100%;
      left: -100%;
      pointer-events: none;
    }
  }
}

.knk-button {
  @include knk-button;

  &#{&}--buy,
  &#{&}--open {
    max-width: 180px;
    min-width: 125px;
    width: 100%;
    min-height: 30px;
    height: auto;
    letter-spacing: 1px;
    text-transform: capitalize;
  }
}

ng-button-distorted.ng-button-distorted--buy.ng-button-distorted,
ng-button-distorted.ng-button-distorted--open.ng-button-distorted {
  max-width: 180px;
  min-width: 125px;
  width: 100%;
  min-height: 30px;
  height: auto;

  &::ng-deep {
    .ng-button-distorted__label {
      letter-spacing: 1px;
      text-transform: capitalize;
    }

    .circle {
      width: 15px;
      height: 15px;

      &.top-left {
        top: 8px;
        left: 8px;
      }

      &.bottom-right {
        bottom: 8px;
        right: 8px;
      }
    }
  }
}
