@import 'variables';
@import 'mixins';
.dashboard-container {
  width: 800px;
  max-width: 96%;
  margin: auto;

  h1 {
    font-size: calc(15px + 0.2vw);
    font-family: $helvetica-condensed;
    font-stretch: condensed;
    padding-bottom: 0px;
    text-align: center;
    margin-bottom: 0px;
    @media screen and (min-width: 600px) {
      text-align: left;
    }

    &.pro-header {
      text-align: center;
      font-size: 3em;
      padding: 5px;
      margin: 0px;
    }
  }

  .rounded-btn {
    font-size: calc(15px + 0.2vw);
    font-family: $helvetica-condensed;
    font-stretch: condensed;
    padding: 4px 20px;
    border-radius: 100px;
    margin-right: 5px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 10px;
    color: var(--body-color);
    @include themeable(
      background,
      theme-container-background,
      lighten($light-medium-gray, 5%)
    );
    &:hover {
      @include themeable(
        background,
        theme-container-background-hover,
        $light-medium-gray
      );
    }

    &.active {
      @include themeable(background, theme-secondary-color, $dark-gray);
      @include themeable(color, theme-container-background, white);
    }

    &.back-nav {
      left: 2vw;
    }
    &.rounded-btn--transparent {
      background: transparent;
      font-size: calc(15px + 0.2vw);
      &:hover {
        @include themeable(
          background,
          theme-container-accent-background,
          lighten($light-medium-gray, 10%)
        );
      }
    }
  }

  .actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2% 0;

    /* about .dashboard-container's left / right margin */
    @media screen and (min-width: 600px) {
      flex-direction: row;
    }

    .action {
      flex-basis: 0;
      flex-grow: 1;
      flex-shrink: 0;
      width: 100%;
      color: var(--body-color);
      padding: 10px 0px;
      border-radius: 3px;
      min-width: 115px;
      transition: background-color 250ms ease, opacity 250ms ease;
      font-family: $helvetica-condensed;
      font-stretch: condensed;
      font-size: 0.95em;
      text-align: center;

      &.active {
        @include themeable(
          background,
          theme-container-accent-background,
          $purple
        );
        color: var(--card-color);
      }

      &:not(.active):hover {
        background: $light-medium-purple;
        @include themeable(
          background,
          theme-container-background-hover,
          $light-medium-purple
        );
        color: var(--card-color);
      }

      &:not(:last-child) {
        /* gap between actions */
        margin-bottom: 8px;

        @media screen and (min-width: 600px) {
          margin-bottom: 0;
          margin-right: 8px;
        }
      }

      span {
        display: inline-block;

        @media screen and (min-width: 600px) and (max-width: 800px) {
          display: block;
        }
      }
    }
  }

  .actions-secondary {
    padding-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    @media screen and (max-width: 600px) {
      flex-direction: column;
      align-items: stretch;
    }

    a.video-upload-cta {
      display: inline-block;
      padding: 14px;

      @media screen and (max-width: 600px) {
        margin-bottom: 15px;
        text-align: center;
      }
    }

    select {
      display: block;
      font-size: 19px;
      padding: 12px;
      border: 1px solid rgb(222, 230, 233);
      border-radius: 3px;
      background-color: white;
      outline: none;
      font-weight: bold;
      color: #333333;
      font-family: 'HelveticaNeue-CondensedBold', 'HelveticaNeueBoldCondensed',
        'HelveticaNeue-Bold-Condensed', 'Helvetica Neue Bold Condensed',
        'HelveticaNeueBold', 'HelveticaNeue-Bold', 'Helvetica Neue Bold',
        'HelveticaNeue', 'Helvetica Neue', 'TeXGyreHerosCnBold', 'Helvetica',
        'Tahoma', 'Geneva', 'Arial Narrow', 'Arial', sans-serif;

      @media screen and (max-width: 426px) {
        text-align-last: center;
        text-align: center;
        -ms-text-align-last: center;
        -moz-text-align-last: center;
        text-align-last: center;
      }
    }
  }

  .dashboard-analytics-header-wrapper {
    text-align: center;
    margin-bottom: 15px;
    background: $dark-gray;
    @include themeable(box-shadow, theme-container-box-shadow, $bold-shadow);
    padding: 15px 0px;
  }

  .dashboard-analytics-header {
    color: white;
    margin: 5px auto;
    font-size: calc(1.1em + 0.1vw);
    padding: 18px 0px 7px;
    padding-left: 10px;
    text-align: left;
    font-family: $monospace;
    border: 1px solid $light-gray;
    display: inline-block;
    width: 90%;
    text-align: center;
    margin: 1.1%;

    @media screen and (min-width: 800px) {
      width: 43%;
      margin: 1.2%;
    }

    span {
      font-size: 1.8em;
      font-weight: bold;
      margin-left: 8px;
      display: inline-block;
    }

    img {
      width: calc(1.2em + 0.2vw);
      height: calc(1.2em + 0.2vw);
      margin-left: 0.4em;
      vertical-align: calc(-0.2vw - 0.3em);
      background: $sky-blue;
      border-radius: 100px;
      border: 2px solid darken($light-gray, 7%);
    }

    .dashboard-analytics-sub-indicator {
      color: darken($light-gray, 7%);
      padding: 10px 0px;
      font-weight: bold;
      font-size: 0.66em;
    }
  }

  .video-upload-cta {
    display: inline-block;
    background: #0045ff;
    padding: 5px 12px;
    border-radius: 3px;
    color: white;
  }
  .manage-header {
    background: $bold-blue;
  }

  .single-article {
    padding: 5px 15px;
    @include dev-card;
    position: relative;

    &.single-article-unpublished {
      background: lighten($yellow, 20%);
      @include themeable(
        background,
        theme-container-accent-background,
        lighten($yellow, 20%)
      );
    }
    &.single-article-archived {
      @include themeable(
        background,
        theme-container-accent-background,
        lighten($yellow, 10%)
      );
    }
    &.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;
          }
        }
      }
    }

    & div.ellipsis-menu {
      float: right;
      position: relative;

      & button.ellipsis-menu-btn {
        display: block;
        float: right;
        margin-top: 0.3em;
        margin-right: -0.6em;
        border: 0px;
        background: transparent;
        img {
          width: 20px;
        }

        &:hover {
          background-color: #eee;
        }
      }

      & ul.ellipsis-menu {
        position: absolute;
        right: 0;
        display: block;
        background-color: white;
        padding-left: 0;
        border-style: solid;
        border-color: #ccc;
        border-radius: 3px;
        border-width: 1px;
        margin-top: 1.75em;
        margin-right: -0.6em;

        &.hidden {
          display: none;
        }

        & hr {
          margin: 0;
          color: #ccc;
          background-color: #ccc;
          height: 1px;
          border: 0;
        }

        & li.ellipsis-menu-item {
          list-style: none;

          & form * {
            background-color: transparent;
          }

          &:hover {
            background-color: #eee;
          }
        }
      }
    }

    .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);
    }

    a {
      color: var(--card-color);
      &.block-link {
        display: block;
      }
    }

    h2 {
      font-weight: 500;
      margin-bottom: 10px;
      margin-top: 8px;
      font-size: 22px;

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

      width: 100%;

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

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

      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;
          float: right;
        }

        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;

        input[type='submit'],
        button {
          height: 30.4px;
          border: 2px solid transparent;
        }
      }
    }

    .pill {
      background: $bold-blue;
      padding: 4px 20px;
      border-radius: 100px;
      color: white;
      margin-right: 5px;
      font-size: 14px;
      border: 2px solid transparent;
      margin-top: 6px;
      display: inline-block;

      &.yellow {
        background: $yellow;
        color: $black;
        border: 2px solid $black;
      }

      &.green {
        background: $green;
        color: $black;
      }

      &.red {
        background: $red;
      }

      &.black {
        background: $dark-gray;
      }

      &.mute {
        background-color: $medium-gray;
        color: $white;
      }

      &.unmute {
        // inverted background color
        background-color: $blue;
        color: $white;
      }
    }

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

    form {
      padding: 10px 0px;
      font-size: 15px;
      font-family: $helvetica-condensed;
      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;
      }
    }
  }

  .no-articles {
    text-align: center;
    @include themeable(background, theme-container-accent-background, #fff);
    padding: 2vw 3vw 6vw;
    box-shadow: $shadow;
    border-radius: 3px;
    min-height: 620px;

    h3 {
      font-size: 28px;
      font-weight: 400;
    }

    a.big {
      display: block;
      border: 3px solid $black;
      font-size: 2.2em;
      padding: 0.4em 0.2em;
      border-radius: 3px;
      width: 90%;
      max-width: 500px;
      margin: auto;
    }

    img {
      margin-top: 30px;
      width: 90%;
      max-width: 270px;
    }
  }
}

.charts-container {
  max-width: 500px;
  height: 250px;
  margin: 0 auto;
}

.recent-reactors-container {
  height: 400px;
  overflow: scroll;
}

.pro-container {
  width: 1400px;
}

.summary-stats {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;

  .card {
    flex: 1 0 150px;
  }
}

.toggles {
  text-align: center;
}

.toggles button {
  @include themeable-important(color, theme-color, $black);
  display: inline-block;
  padding: 2px 8px;
  margin: 8px;
  font-size: 1.3em;
  border-radius: 2px;
  border: 1px solid transparent;
  font-family: $helvetica-condensed;
  font-stretch: condensed;
  top: 18px;
  font-weight: 600;
  background-color: transparent;

  &:focus {
    outline: 0;
  }

  &.selected {
    background: #cfd7ff;
    color: #0a0a0a !important;
    border: 1px solid #4e57ef;
    box-shadow: 3px 4px 0px #4e57ef;
  }
}

.graphs {
  .row {
    display: flex;
    flex-wrap: wrap;

    .card {
      flex: 1 0;
    }
  }

  h2 {
    margin: 5px;
    text-align: center;
  }
}

.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;
}

.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;
  }
}
