@import "neat";
@import "coin_transactions/_form";

$dashboard: (
  columns: 1,
  gutter: 0
);

$dashboard--md: (
  columns: 3,
  media: $media-md
);

.dashboard {
  @include grid-container;
&__main { @include grid-column(1, $dashboard);
    @include grid-media($dashboard--md) {
      @include grid-column(2);
    }
  }

  &__sidebar {
    @include grid-column(1, $dashboard);
    @include grid-media($dashboard--md) {
      @include grid-column(1);
    }
  }
}

.dashboard-portfolios {
  max-width: 100%;
  overflow: auto;
  white-space: nowrap;

  h3 {
    display: inline-block;
    padding-right: 1.5rem;
    font-size: 1.5rem;
  }

  &__portfolio--active {
    font-size: 3rem;
  }

  &__portfolio-action {
    position: absolute;
  }

  &__portfolio-new {
    font-size: .8rem;
    height: 2.8rem;
    line-height: 2.8rem;
    padding: 0 1.5rem;
  }
}

$dashboard-header-grid: (
  columns: 1,
  gutter: 0
);

$dashboard-header-grid--md: (
  columns: 3,
  gutter: 0,
  media: $media-md
);

.dashboard-header {
  @include grid-container;

  &__portfolio {
    @include grid-column(1, $dashboard-header-grid);
    @include grid-media($dashboard-header-grid--md) {
      @include grid-column(2);
    }
  }

  &__cta {
    @include grid-column(1, $dashboard-header-grid);
    @include grid-media($dashboard-header-grid--md) {
      @include grid-column(1);
    }

    .button {
      width: 100%;

      @include grid-media((media: $media-md)) {
        width: auto;
      }
    }
  }
}

.portfolio-header {
  width: auto;

  &, td, tr {
    border: none;
    border-collapse: collapse;
    border-spacing: 0;
  }

  &__item {
    margin-bottom: 1.5rem;
    @include grid-media($dashboard-header-grid--md) {
      display: inline-block;
      padding-right: 1rem;
    }
  }

  &__title {
    padding: 0 4px 0 0;
    font-size: 14px;
    margin-bottom: 0;
  }

  &__values {
    td {
      padding: 0 28px 10px 0;
    }
  }

  &__main {
    font-size: 30px;
    margin-bottom: 0;

    &--increase {
      color: $success;
    }

    &--decrease {
      color: $danger;
    }
  }
}

.portfolio-private {
  text-align: center;
  margin: 0 auto;
  margin-top: 5rem;

  &__logo {
    max-width: 96px;
  }

  h3 {
    margin-top: 2rem;
  }
}

.dashboard-privacy-form {
  text-align: center;
  margin: 0 auto;
  margin-bottom: 2rem;
  max-width: 250px;

  &__message {
    margin-bottom: 1rem;
  }
}

.coin-transactions-list {
  tbody {
    tr:hover {
      &[data-bind-link] {
        cursor: pointer;
      }
      background-color: rgba(0,0,0,0.05);
    }
  }

  &__actions {
    text-align: center;
    .button {
      margin-bottom: 0;
    }
  }

  &__item {
    display: block;
  }

  &__currency-icon {
    width: 25px;
    vertical-align: bottom;
  }

  display: none;

  @include grid-media($dashboard-header-grid--md) {
    display: table;
  }
}

.coin-transactions-list-mobile {
  tbody {
    tr:hover {
      cursor: pointer;
      background-color: rgba(0,0,0,0.05);
    }
  }

  td {
    &:nth-child(1) {
      font-weight: bold;
    }

    &:nth-child(n+2) {
      text-align: right;
    }
  }

  display: table;

  @include grid-media($dashboard-header-grid--md) {
    display: none;
  }
}

.coin-transactions-list-mobile,
.coin-transactions-list {
  .coin-trades-summary {
    cursor: pointer;

    &--error {
      color: gray;
      background-color: #ffe5e5;
    }
  }

  .coin-trade {
    display: none;

    td:first-of-type:before {
      content: "";
      display: inline-block;
      width: 15px;
      height: 15px;
      border-left: 1px solid #E1E1E1;
      border-bottom: 1px solid #E1E1E1;
      margin-right: 10px;
      margin-left: 10px;
    }
  }

  .coin-trade.visible {
    display: table-row;
  }
}

.coin-transactions__empty {
  text-align: center;
}

input[type="text"].highcharts-range-selector {
  background-color: white;
  border-radius: 0;
  box-sizing: content-box;
  margin-bottom: inherit;
  height: 100%;
  width: 100%;
}
