.dashboard-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding-bottom: 20px;
}

.dashboard-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 0 auto;
  margin: 8px;
  padding: 12px 4px;
  min-height: 160px;
  width: 340px;
  color: $brand-primary;
  background: $gray-100;
  text-align: center;
  max-width: calc(100% - 16px);
  overflow-wrap: break-word;
  position: relative;
  border-radius: 4px;

  &:hover {
    background: $gray-100;
    color: $brand-primary;
    text-decoration: none;
  }

  &.symbol {
    display: flex;
    padding: 0;
    align-items: center;
    justify-content: center;
    i {
      font-size: 56px;
    }
  }

  h1 {
    font-size: 36px;
    font-weight: normal;

    .fa {
      padding-right: 0.3em;
    }
  }

  .dashboard-description {
    padding: 0 8px;
    font-size: 20px;

    ul {
      text-align: left;
    }
  }
  &.event-block {
    padding-bottom: 48px;
    .stats {
      position: absolute;
      width: 100%;
      bottom: 0;
      left: 0;
      height: 40px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      > * {
        width: 100%;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        &.state.inactive {
          background-color: $gray;
          color: $white;
          font-weight: bold;
        }
        &.state.active {
          background-color: $brand-success;
          color: $white;
          font-weight: bold;
        }
        &.submissions {
          background-color: $gray-light;
          color: $body-color-light;
        }
      }
    }
  }
}

.dashboard-special-block {
  background: lighten($brand_warning, 29%);
}

.timeline {
  display: flex;
  flex-direction: row;
  margin-left: 5px;
  margin-right: 60px;
  padding-bottom: 90px;

  .timeline-element {
    display: inline-block;
    flex-grow: 1;
    padding: 10px;
    position: relative;
    min-width: 200px;
    height: 80px;
    max-width: 320px;
    padding: 0.5em;

    &::after {
      content: "  ";
      position: absolute;
      top: 0;
      right: -50px;
      border-top: 40px solid transparent;
      border-bottom: 40px solid transparent;
      border-left: 50px solid white;
      z-index: 5;
    }

    .timeline-text {
      display: none;
    }

    &:hover .timeline-text,
    .timeline-text:hover {
      display: block;
      color: black;
      position: absolute;
      padding-right: 20px;
      margin-top: 8px;
      background: white;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
      opacity: 1;
    }

    .timeline-heading {
      text-align: center;
      padding-top: 20px;
      padding-bottom: 20px;
      font-weight: bold;
    }
  }

  .timeline-element.done {
    .timeline-heading {
      font-weight: normal;
    }
  }

  .timeline-element.next {
    .timeline-heading {
      font-weight: normal;
    }
  }

  .timeline-element:nth-of-type(1) {
    background-color: #e5e5e5;

    &::after {
      border-left: 50px solid #e5e5e5;
    }
  }

  .timeline-element:nth-of-type(2) {
    background-color: #d3d3d3;

    &::after {
      border-left: 50px solid #d3d3d3;
    }
  }

  .timeline-element:nth-of-type(3) {
    background-color: #c2c2c2;

    &::after {
      border-left: 50px solid #c2c2c2;
    }
  }

  .timeline-element:nth-of-type(4) {
    background-color: #b0b0b0;

    &::after {
      border-left: 50px solid #b0b0b0;
    }
  }

  .timeline-element:nth-of-type(5) {
    background-color: #a1a1a1;

    &::after {
      border-left: 50px solid #a1a1a1;
    }
  }

  .timeline-element.next:nth-of-type(6) {
    background-color: #858585;
    color: $white;

    &::after {
      border-left: 50px solid #858585;
    }
  }

  .timeline-element.active {
    background-color: mix(#fff, $brand-success, 25%);
    color: $white;

    &::after {
      background: transparent;
      border-left-color: mix(#fff, $brand-success, 25%);
    }
  }
}

.dashboard-history {
  .time {
    color: #858585;
  }
}

@media (max-width: 640px) {
  .timeline {
    margin-right: 8px;

    .timeline-element.done,
    .timeline-element.next {
      display: none;
    }

    .timeline-element.active {
      display: block;
      width: 100%;

      &::after {
        display: none;
        width: 0;
      }
    }
  }

  .event-dropdown {
    flex-basis: inherit !important;
  }

  .dropdown-menu.show {
    position: absolute !important;
  }
}
