.dashboard {
  padding-bottom: 3rem;
  position: relative;
  width: 100%;
  border-top-left-radius: 0.5rem;

  @media (width >= 768px) {
    overflow-y: auto;
  }

  & > div {
    display: flex;
    flex-direction: column;
  }

  & .dropdown {
    align-self: flex-end;
    margin: 0.5rem 0.5rem 0 0;
  }

  & .dashboard-heading {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 1rem;
    margin: -1rem 0.5rem 1rem;

    @media only screen and (width >= 768px) {
      flex-direction: row;
      align-items: center;
      margin: -1rem 2rem 0;
    }

    @media only screen and (width >= 920px) {
      gap: 3rem;
    }

    & > div.title {
      flex: 1;
    }

    & h1 {
      font-size: 2rem;
      font-weight: 300;
    }

    & p {
      font-size: 0.875rem;
      margin-bottom: 0;

      &.venue {
        opacity: 0.8;
        font-size: 0.75rem;

        & a {
          color: inherit;
        }
      }

      a {
        color: var(--scampi-700);
        text-decoration: none;

        &:hover,
        &:active,
        &:focus {
          text-decoration: underline;
        }
      }
    }

    & > div:first-child {
      grid-column: 1 / span 2;
      padding: 0 1rem;

      @media only screen and (width >= 768px) {
        grid-column: 1;
      }

      @media only screen and (width >= 920px) {
        grid-column: 1 / span 2;
      }
    }

    & > div:nth-child(2) {
      display: none;

      @media only screen and (width >= 1200px) {
        display: block;
      }
    }

    & > a {
      border: 1px solid transparent;
      grid-column: 1 / span 2;
      padding: 0 1rem;
      margin-right: 1rem;
      text-decoration: none;

      @media only screen and (width >= 768px) {
        grid-column: 2;
      }

      @media only screen and (width >= 920px) {
        grid-column: 3 / span 2;
      }

      @media only screen and (width >= 1200px) {
        grid-column: 4;
      }

      &:hover,
      &:active,
      &:focus {
        background-color: var(--scampi-50);
        border: 1px solid var(--gray-300);
        border-radius: 0.5rem;
        text-decoration: none;
      }
    }

    & .time-ago {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.5rem;
      padding-left: 1rem;

      @media only screen and (width >= 768px) {
        flex-direction: column;
        gap: 0;
      }
    }

    & .time-ago-value {
      font-size: 1.5rem;
      font-weight: bold;
      line-height: 1;

      & svg {
        color: var(--orange-500);
      }
    }

    & .time-ago-unit {
      color: var(--gray-500);
      font-size: 0.875rem;
      font-weight: 300;
    }

    & dl {
      display: flex;
      flex-direction: column;
      font-size: 0.75rem;
      gap: 0.5rem;
      padding: 0.5rem 0;

      @media only screen and (width > 768px) {
        align-items: end;
      }

      & div {
        display: flex;
        gap: 0.5rem;
      }

      & dt {
        margin: 0;
      }
    }
  }

  & dataset,
  & .cards {
    padding: 0.5rem 0.5rem 0;
    gap: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    @media (width >= 768px) {
      padding: 2rem 2rem 0;
      gap: 1.625rem;
    }

    @media (width >= 920px) {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  & data {
    background-color: #fff;
    border: 1px solid var(--gray-300);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0.5rem;

    & ul.dashboard--metrics {
      font-size: 1rem;
      font-weight: normal;
      list-style: none;
      margin: 0;
      padding: 0.5rem 1rem;

      & li {
        display: flex;
        padding: 0.25rem 0;
        justify-content: space-between;
      }
    }

    &.list-links ul {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 0.5rem 0;
    }

    &.list-links li {
      padding: 0;
    }

    &.list-links ul li a {
      display: flex;
      font-size: 0.875rem;
      gap: 1rem;
      justify-content: space-between;
      padding: 0.25rem 1rem;
      text-decoration: none;
      width: 100%;
    }

    &.list-links ul li a:hover,
    &.list-links ul li a:focus,
    &.list-links ul li a:active {
      background-color: var(--scampi-50);
    }

    &.list-links ul li.list-total a {
      font-size: 1rem;
      font-weight: bold;
    }

    & a.widget,
    & > div {
      color: black;
      display: flex;
      flex: 1;
      flex-direction: column;
      justify-content: center;
      padding: 0.5rem 1rem;

      & span {
        font-size: 1rem;
        font-weight: 900;

        @media (width >= 1200px) {
          font-size: 3.25rem;
        }
      }

      & a {
        color: var(--scampi-700);
        font-size: 0.875rem;
        font-weight: 300;
        text-decoration: none;
      }

      & a:hover,
      & a:focus,
      & a:active {
        text-decoration: underline;
      }

      & a.widget-text {
        color: var(--gray-500);
      }

      & a.widget-text:hover {
        color: var(--gray-700);
      }

      & b {
        color: black;
        font-size: 1.125rem;
        font-weight: 500;
        padding: 0;
        padding-top: 0.5rem;
      }

      & aside {
        display: inline;
      }
    }

    & > div.table-stats-wrapper {
      flex: none;
      overflow-x: scroll;
    }

    & a.widget {
      text-decoration: none;

      &:hover {
        background-color: var(--light-blue);
      }
    }
  }

  & data.data-gross-income {
    @media (width >= 920px) {
      grid-column: 1 / span 2;
    }
  }

  & data.data-net-income {
    @media (width >= 920px) {
      grid-column: 3 / span 2;
    }
  }

  & data.data-check-ins {
    grid-column: span 2 / span 2;
  }

  @media (width >= 920px) {
    & data.data-check-ins {
      grid-column: span 4 / span 4;
    }

    & data.passes {
      grid-column: span 2 / span 2;
    }
  }

  & data.passes header h2 {
    white-space: nowrap;
  }
}

.dashboard.dashboard--invites {
  background-color: transparent;
  padding: 0;

  & dataset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-check-in-lists {
  & h2 a {
    color: var(--gray-700);
    display: block;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;

    &:hover {
      background-color: var(--light-blue);
    }
  }
}

.dashboard-check-in-list {
  align-items: center;
  color: inherit;
  display: grid;
  gap: 1rem;
  grid-template-columns: 20px 100px fit-content(300px) 1fr;
  padding: 0.5rem 1rem;
  text-decoration: none;

  &:hover {
    background-color: var(--light-blue);
  }
}

.data-check-ins {
  & .progress-stacked {
    margin-bottom: 0;
    width: 100px;
  }
}

.card {
  background-color: #fff;
  border: 1px solid var(--gray-300);
  display: flex;
  flex-direction: column;
  grid-column: span 2 / span 2;
  overflow: hidden;
  border-radius: 0.5rem;

  &.card--wide {
    grid-column: span 4 / span 4;
  }

  & p {
    font-size: 0.875rem;
  }

  & ul.dashboard--metrics {
    list-style: none;
    margin: 0;
    padding: 0;

    & li {
      display: flex;
      font-size: 0.875rem;
      gap: 1rem;
      justify-content: space-between;
      padding: 0.5rem 1rem;
    }
  }

  & li span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  & li span svg {
    color: var(--scampi-700);
    font-size: 0.625rem;
  }

  & .btn {
    font-size: 0.875rem;
  }
}

.card header,
data header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 1rem;
  padding: 1rem 0 0.5rem;

  & h2 {
    color: black;
    font-size: 1.125rem;
    font-weight: 500;
  }

  & a {
    color: var(--scampi-700);
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
  }

  & a:hover:not([aria-disabled="true"]),
  & a:focus:not([aria-disabled="true"]),
  & a:active:not([aria-disabled="true"]) {
    text-decoration: underline;
  }

  & a[aria-disabled="true"] {
    color: var(--gray-400);
  }
}

data.data-check-ins ul {
  padding: 0;
}

data.data-check-ins ul li a {
  align-items: center;
  display: flex;
  flex: 1;
  font-size: 0.875rem;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

data.data-check-ins ul li a:hover,
data.data-check-ins ul li a:active,
data.data-check-ins ul li a:focus {
  background-color: var(--scampi-50);
}

data.data-check-ins ul li a .data-check-ins--name {
  flex: 1;
  position: relative;
}

data.data-check-ins ul li a .data-check-ins--name svg {
  position: absolute;
  top: 4px;
}

data.data-check-ins ul li a .data-check-ins--name span {
  display: inline-block;
  padding-left: 1.3rem;
}

data.data-check-ins ul li a .progress-stacked {
  background-color: var(--scampi-200);
  flex: 1;
}

data.data-check-ins ul li a .progress-stacked .bg-success.progress-bar {
  background-color: var(--scampi-700);
}

.card a.btn-link {
  color: var(--scampi-700);
}

.card ul li a.inline-link {
  text-align: right;
}

.dashboard-muted {
  opacity: 0.4;
}
