.admin-list {
  padding: 0;
  margin: 0;
  list-style-type: none;

  @media (width >= 768px) {
    height: 0;
  }

  & li {
    align-items: center;
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
    min-height: 4rem;
    position: relative;

    & .li-border {
      border-bottom: 1px solid var(--lightest-gray);
      position: absolute;
      bottom: 0;
      right: 0;
      left: 50px;

      &.without-icon {
        left: 15px;
      }
    }

    & .metadata {
      color: var(--gray-500);

      &.stat {
        text-align: center;
      }
    }

    &.group {
      align-items: flex-start;
      min-height: 0;
      padding: 1rem;
    }

    @media only screen and (width <= 599px) {
      &.stacked {
        height: auto;

        a {
          align-items: flex-start;
          flex-direction: column;
          gap: 0.25rem;
        }
      }
    }

    & h3 {
      font-weight: 500;
    }

    & > a,
    & .unclickable {
      align-items: center;
      color: var(--gray-600);
      display: flex;
      flex: 1;
      flex-direction: row;
      height: 100%;
      gap: 1rem;
      padding: 1rem;
      width: 100%;
    }

    & > details > summary,
    & > a {
      text-decoration: none;
    }

    & a.active {
      background: var(--medium-purple);
      outline: 1px solid var(--medium-purple);

      & .li-border {
        visibility: hidden;
      }
    }

    & a:hover {
      background: var(--light-purple);
    }

    & a.active:hover {
      background: var(--medium-purple);
    }

    & a,
    & a:visited {
      color: var(--gray-600);
    }

    & a.list-invitation,
    & a.list-ticket {
      padding-right: 3rem;
    }

    & a.list-invitation .list-invitation--ref {
      color: var(--gray-500);

      @media (width >= 600px) {
        min-width: 45px;
      }
    }

    & a.list-invitation span b {
      @media (width >= 600px) {
        min-width: 180px;
      }
    }

    & b {
      color: var(--gray-900);
      display: inline-block;
      font-weight: 500;
    }

    & div {
      & p {
        padding: 0;
      }
    }
  }

  & .img-in-list {
    height: 2rem;
    margin: -0.5rem 0;
  }
}

.admin-list.admin-list--tickets li {
  height: auto;

  @media (width >= 768px) {
    height: 4rem;
  }

  & .no-color.swatch {
    background-image: none;
  }

  &.ticket-cancelled {
    & .swatch {
      background-color: var(--light-gray);
      border-color: var(--medium-gray);
      color: var(--dark-gray);
    }

    & .fa-ban {
      color: var(--danger-color);
      position: absolute;
      right: 17px;
      top: 25px;
    }
  }

  & a {
    gap: 1rem;
  }

  & .admin-list--ticket-name {
    display: flex;
    flex: 1;
    flex-direction: column;

    @media (width >= 600px) {
      align-items: center;
      flex-direction: row;
      gap: 0.5rem;
      justify-content: space-between;
    }

    & .admin-list--guest-name {
      @media (width >= 600px) {
        text-align: right;
        white-space: nowrap;
      }

      & br {
        display: none;

        @media (width >= 600px) {
          display: block;
        }
      }
    }
  }
}

.admin-list.admin-list--messages {
  @media (width >= 768px) {
    height: auto;
  }

  & li {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    padding: 0.5rem 0;

    & b {
      width: 4rem;
    }
  }

  & li:last-child {
    border-bottom: none;
  }

  @media (width >= 425px) {
    & li {
      flex-direction: row;
    }
  }

  @media (width >= 768px) {
    & li {
      flex-direction: column;
    }
  }

  @media (width >= 1100px) {
    & li {
      flex-direction: row;
    }
  }
}

.admin-list.admin-list--guests {
  @media (width >= 768px) {
    height: auto;
  }

  & li {
    height: auto;

    & a {
      gap: 1rem;
      padding: 0.5rem 1rem;
    }
  }

  & li:last-child {
    border-bottom: none;
  }
}

.admin-list--digital-passes {
  list-style: none;
  margin: 0;
  padding: 0;

  @media (width >= 768px) {
    height: auto;
  }

  & li {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.25rem 0;
  }
}

.admin-list--timeline {
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;

  @media (width >= 768px) {
    height: auto;
  }

  & li {
    display: list-item;
    min-height: auto;
    padding: 0 0 1px;

    &:last-child {
      & .li-border {
        display: none;
      }
    }

    & .li-border {
      left: 1rem;
    }

    &.admin-list--timeline-date {
      background-color: var(--medium-purple);
      padding: 0.5rem 1rem;
    }

    & details {
      &[open] {
        border-left: 0.25rem solid var(--dark-purple);
        margin-bottom: 0.25rem;

        & summary {
          padding-left: 0.75rem;
        }
      }

      & .fa-chevron-up {
        display: none;
      }

      &[open] .fa-chevron-down {
        display: none;
      }

      &[open] .fa-chevron-up {
        display: block;
      }
    }

    & summary {
      align-items: center;
      display: flex;
      cursor: pointer;
      gap: 0.5rem;
      justify-content: space-between;
      padding: 0.5rem 1rem;

      &::marker {
        font-size: 0;
      }

      & .details-toggle {
        opacity: 0.25;
      }

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

        & .details-toggle {
          opacity: 1;
        }
      }
    }

    & .details-body {
      padding: 0 2.6rem 1rem;
    }

    & .object-changes {
      margin: 0;
      padding: 0;

      & > li {
        padding: 0.25rem;

        &::marker {
          font-size: 0;
        }
      }

      & .badge {
        background-color: white;
      }

      & .changes-from {
        color: var(--danger-color);
      }

      & .changes-to {
        color: var(--success-color);
      }

      & .changes-blank {
        color: var(--medium-gray);
      }
    }

    .admin-list--timeline-link {
      text-decoration: none;

      & svg {
        opacity: 0.25;
      }

      &:hover {
        background-color: inherit;

        & svg {
          opacity: 1;
        }
      }
    }
  }
}

.admin-list:not(:has(.swatch.with-color)) {
  & li {
    .swatch {
      display: none;
    }
  }
}

.admin-list > li.event-list {
  & > a {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;

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

    & .metadata.stat {
      display: flex;
      flex-direction: row-reverse;
      gap: 1rem;
      justify-content: flex-start;
      width: 100%;

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

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

      & br {
        display: none;

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

.viewer-list {
  height: auto;
}