@import 'variables';
@import 'mixins';
@import 'config/import';

.dashboard-container {
  .manage-header {
    background: $bold-blue;
  }

  .single-article {
    padding: 5px 15px;
    @include dev-card;
    position: relative;
    overflow: auto;
    &.thanks-for-suggesting-a-tweet {
      background: lighten($green, 20%);
      padding: 30px 0px;
      text-align: center;
      font-size: 1.4em;
      font-weight: bold;
    }
    &.single-article-manage-form-wrapper {
      form {
        text-align: center;
        width: 490px;
        max-width: 90%;
        margin: 10px auto;
        textarea {
          width: 100%;
          border: 1px solid $light-medium-gray;
          height: 100px;
          border-radius: 3px;
        }
        input[type='submit'] {
          background: #1da1f2; // twitter blue
          color: white;
          font-size: 19px;
          padding: 8px 35px;
          border-radius: 100px;
          font-family: $helvetica-condensed;
          margin: 18px auto;
        }
        .button-section {
          display: inline-block;
          border-radius: 12px;
          padding: 3px;
          &.button-section-newbie {
            background: lighten($green, 12%);
          }
          &.button-section-intermediate {
            background: lighten($purple, 5%);
          }
          &.button-section-senior {
            background: lighten($bold-blue, 19%);
          }
        }
        button {
          color: white;
          font-size: 15px;
          font-weight: bold;
          border: 2px solid white;
          background: $black;
          padding: 5px 0px;
          width: 38px;
          border-radius: 8px;
          &.selected {
            background: $green;
            padding: 15px 0px;
            width: 70px;
            font-size: 20px;
          }
        }
        p {
          .scale-pod {
            display: inline-block;
            width: 160px;
          }
        }
      }
    }

    .dashboard-collection-org-details {
      .dashboard-top-pill {
        @include themeable(
          background,
          theme-container-accent-background,
          darken($light-gray, 6%)
        );
        color: var(--body-color);
        margin-right: 5px;
        padding: 3px 10px;
        border-radius: 100px;
        margin-top: 10px;
        display: inline-block;
        font-size: 0.9em;
      }
    }

    .dashboard-meta-details {
      font-size: 0.85em;
      padding: 3px 0px 6px;
      color: var(--card-color-tertiary);
    }

    h2 {
      font-weight: 500;
      margin-bottom: 10px;
      margin-top: 8px;
      font-size: 22px;
      overflow: auto;
      display: inline-block;

      @media screen and (min-width: 800px) {
        font-size: 34px;
      }

      width: 100%;

      .block-link {
        display: inline;
      }

      img {
        height: 40px;
        width: 40px;
        border-radius: 80px;
        vertical-align: -8px;
      }

      .dashboard-username {
        color: $medium-gray;
        font-size: 0.6em;
        vertical-align: 0.16em;
      }

      .dashboard-follow {
        @include themeable(
          background,
          theme-dashboard-followers-follow-background,
          $green
        );
        border: 0;
        border-radius: 5px;
        @include themeable(
          color,
          theme-dashboard-followers-follow-color,
          $black
        );
        font-size: 15.9px;
        padding: 2px 10px;
        @media screen and (min-width: 520px) {
          font-size: 20px;
        }
        &.follow-tag {
          @media screen and (min-width: 750px) {
            margin: 8px 0px 8px 10px;
          }
        }
        &.follow-user {
          float: right;
          margin-top: 8px;
        }
      }

      .follow-tag-actions {
        @media screen and (min-width: 750px) {
          float: right;
        }
      }

      form {
        @include themeable(
          background,
          theme-container-accent-background,
          $light-gray
        );
        padding: 8px 15px;
        margin-bottom: 10px;
        border-radius: 3px;

        @media screen and (min-width: 750px) {
          display: inline-block;
        }

        input {
          font-size: 16px;
          border-radius: 3px;
          padding: 3px 8px;
          width: 50px;
          border: 1px solid $black;
          font-weight: bold;

          &[type='submit'] {
            width: auto;
            background: $green;
            font-family: $helvetica-condensed;
            margin-left: 5px;
          }
        }
      }
    }

    h4 {
      margin-top: 0px;
      margin-bottom: 9px;
      margin-left: 2px;
      font-weight: 300;
      font-size: 16px;
      color: rgb(67, 78, 87);
    }

    .dashboard-actions {
      padding: 7px 0px 10px;

      form {
        margin: 0;
        padding: 0;
        display: inline;
      }
    }

    .dashboard-pageviews-indicator {
      display: inline-block;
      font-family: var(--ff-monospace);
      color: $dark-gray;
      background: white;
      text-align: center;
      padding: 2px 8px;
    }

    form {
      padding: 10px 0px;
      font-size: 15px;
      font-stretch: condensed;

      select {
        margin: 0px 4px;
        vertical-align: 2px;
      }

      input[type='submit'] {
        border: 0px;
        font-size: 15px;
      }
    }

    .single-article__details {
      margin: 10px 0px;

      .user {
        color: $medium-gray;
      }

      .tag {
        margin-left: 10px;
      }
    }
  }
}

.analytics-container {
  max-width: 1400px;
  margin: 0 auto;
}

.crayons-tabs--analytics {
  width: min-content;
  margin: var(--su-1) auto var(--su-4);
  @media screen and (min-width: 800px) {
    margin: var(--su-1) var(--su-4) var(--su-4);
  }
}

$column-flex: 1;

.summary-stats {
  text-align: center;
  display: flex;
  justify-content: space-between;

  &__col {
    flex: $column-flex;
    min-height: 100px;
  }
}

.crayons-tabs--analytics {
  justify-content: center;
}

.graphs {
  display: flex;
  justify-content: space-between;
  &__col {
    flex: $column-flex;
  }
  .charts-container {
    padding: var(--su-4);
    height: 320px;
    canvas {
      min-height: 280px;
      max-height: 280px;
    }
  }
}

@media screen and (max-width: $breakpoint-s) {
  .summary-stats,
  .graphs {
    display: block;
    &__col {
      display: block;
      width: 90%;
      margin: 10px auto;
    }
  }

  .crayons-tabs--analytics {
    width: 100%;
  }
}

.card {
  @include themeable(border, theme-container-border, 1px solid #d6d6d6);
  @include themeable(
    box-shadow,
    theme-container-box-shadow,
    3px 3px 0px #bababa
  );
  border-radius: 3px;
  padding: 20px;
  margin: 5px;
  @include themeable(background-color, theme-container-background, #fff);

  h4 {
    font-size: 0.8em;
    margin: 0px;
    padding: 0px;
  }

  .stat-percentage {
    font-size: 0.8em;
  }

  table {
    margin: 1rem auto;
    text-align: left;
    width: 50%;

    thead {
      line-height: 3rem;

      th:last-child {
        text-align: right;
      }
    }

    tbody {
      line-height: 2rem;

      td:last-child {
        text-align: right;
      }
    }
  }
}

.featured-stat {
  font-size: 2em;
  font-weight: bold;
}

.header-card {
  max-width: 100%;
}

.dashboard-manage-header {
  background: darken($bold-blue, 25%);
  color: white;
  padding: 32px 0;
  line-height: 1.3em;
  box-shadow: 0 100px 0 darken($bold-blue, 25%);
  .manage-page-error {
    background: $red;
    color: white;
    padding: 20px 10px;
    line-height: 1.4em;
    border-radius: 3px;
  }
  .manage-page-success {
    background: $green;
    padding: 20px 10px;
    line-height: 1.4em;
    border-radius: 3px;
  }
  li {
    margin: 20px auto;
  }
  a {
    color: white;
    text-decoration: underline;
  }
  .dashboard-manage-header-inner-container {
    width: 800px;
    max-width: 96%;
    margin: 10px auto;
  }
  .dashboard-manage-nav {
    padding: 10px 0px;
    font-size: 0.9em;
    font-weight: bold;
  }
}

// dashboard pages
.dashboard__tag__container {
  height: 195px;
  justify-content: space-between;

  .crayons-tag {
    padding-top: 0;
    padding-bottom: 0;
  }
}
