// ---------------------------
// PUBLIC DASHBOARD
// ---------------------------

.collection {
  width: 100%;
  margin: 0 0 1em 0;
  padding: 0 0 1em 0;
  display: inline-block;
  box-sizing: border-box;
  transition: border-color 0.3s;
  border-bottom: 1px dotted $borderColor;
  &:last-child {
    border: 0;
    margin: 0;
  }
  &.stats-visible { border-color: transparent; }
  &.stats-visible &_stats-bubble { opacity: 1; }
  &_image {
    float: left;
    padding: 5px;
    background: #FFF;
    margin-right: $gapSize;
    background-clip: padding-box;
    border: 1px solid rgba(#000, 0.06);
  }
  &_details {
    overflow: hidden;
  }
  &_title {
    margin: 0;
    a {
      text-decoration: none;
      color: darken($fgLink, 10%);
      &:hover { color: $fgLink; }
    }
  }
  &_snippet {
    margin: 0.4em 0 0 0;
    font-size: $fontSizeSmall;
  }
  &_summary {
    margin: 0.4em 0 0 0;
    color: $bodyFgFaded;
    > * {
      margin-right: 1em;
      display: inline-block;
      vertical-align: middle;
    }
    a {
      color: inherit;
      &:hover { color: $bodyFg; }
    }
  }
  &_works {
    color: $bodyFgLight;
    li { line-height: 1.2; }
  }
}

.collection_stats {
  &-bubble {
    opacity: 0;
    padding: 0 8px;
    margin-top: 10px;
    position: relative;
    border-radius: 3px;
    transition: opacity 0.3s;
    font-size: $fontSizeSmall;
    background: mix(#000, $bodyBg, 4%);
    border: 1px solid rgba(#000, 0.05);
    &:before, &:after {
      left: 13px;
      content: '';
      bottom: 100%;
      position: absolute;
      border: 6px solid transparent;
      border-top-width: 0;
      border-bottom-color: mix(#000, $bodyBg, 4%);
    }
    &:before {
      margin-bottom: 1px;
      border-bottom-color: rgba(#000, 0.15);
    }
  }
  table {
    width: 100%;
    margin: 8px 0;
    border-spacing: 8px;
    border-collapse: separate;
  }
  th, td {
    line-height: 1.2;
    white-space: nowrap;
    font-size: $fontSizeSmall;
  }
  th {
    color: $bodyFgFaded;
    padding-bottom: 5px;
    border-bottom: 1px solid $borderColor;
  }
  td:first-child {
    max-width: 50px;
    overflow: hidden;
    white-space: nowrap;
    color: $bodyFgFaded;
    text-overflow: ellipsis;
  }
  .progress { width: 200px; }
}


// ---------------------------
// ADMIN DASHBOARD
// ---------------------------

.admin-counters {
  font-size: 0;
  .counter {
    width: 25%;
    margin: $gapSize * 2 0;
    font-size: $fontSizeH4;
    &:first-child { border: 0; }
  }
}

.counter.link {
  &:before {
    color: $fgLink;
    }
  &:hover:before {
    color: $fgHover;
    }
}

.admin-logfile {
  color: #333;
  font-size: 12px;
  padding: $gapSize;
  background: rgba(#FFF, 0.5);
  background-clip: padding-box;
  border: 1px solid rgba(#000, 0.05);
}

.admin-grid {
  p {
    margin: 0.4em 0;
    &:first-child { margin-top: 0; }
  }
  [data-prefix] {
    margin-right: 0.8em;
  }
  .icon:only-child { vertical-align: middle; }
}

.upload-status {
  &-new { background-color: #F66; }
  &-queued { background-color: #E6C; }
  &-processing { background-color: #6AF; }
  &-finished { background-color: #7B3; }
}


// ---------------------------
// OWNER DASHBOARD
// ---------------------------

.owner-counters {
  font-size: 0;
  margin: $gapSize 0;
  .counter {
    width: 20%;
    border-left: 1px solid rgba(#000, 0.1);
    &:first-child { border: 0; }
  }
}

.owner-info {
  padding: 0 30px 15px 0;
  color: $bgSelected;
  font-style: italic;
}

.owner-collection {
  clear: both;
  padding: $gapSize;
  border-radius: 4px;
  margin-bottom: $gapSize / 2;
  background-clip: padding-box;
  border: 1px solid rgba(#000, 0.06);
  background-color: mix(#FFF, $bodyBg, 35%);
  overflow: hidden;
  &.stats-visible { border-color: transparent; }
  &.stats-visible &_stats-bubble { opacity: 1; }
  &_title {
    margin: 0;
    a {
      text-decoration: none;
      color: darken($fgLink, 10%);
      &:hover { color: $fgLink; }
    }
  }
}

.visibility {
  font-style: italic;
  color: $bgSelected;
}

//--------------------------------
// LANDING PAGE
//--------------------------------
.carousel {
  display: flex;
  overflow: hidden;
  position: relative;
  align-items: center;
  margin-bottom: 50px;
  justify-content: space-around;

  &:not(.slick-initialized) {
    display: flex;
  }

  &_slide {
    outline: none;
    display: flex;
    flex-shrink: 0;
    padding: 0 10px;
    align-items: center;

    &_image {
      padding: 5px;
      background: #FFF;
      align-self: flex-start;
      margin-right: $gapSize;
      background-clip: padding-box;
      border: 1px solid rgba(#000, 0.06);

      img {
        width: auto;
        height: auto;
        max-width: 300px;
        max-height: 300px;
      }
    }

    &_content {
      flex: 1 1 auto;

      h3 {
        margin: 0;
      }

      p {
        margin-bottom: 0;
      }

      a {
        text-decoration: none;
        color: darken($fgLink, 10%);
        &:hover { color: $fgLink; }
      }
    }
  }

  .slick-list {
    margin: 0 15px;
    overflow: hidden;
    max-width: 920px;
  }

  .slick-track {
    display: flex;
    align-items: center;
  }

  @media screen and (max-width: $widthMin){
    display: none;
  }
}

.project-list {
  &_projects {
    border-bottom: 1px dotted $borderColor;
  }
  &_link {
    margin-top: $gapSize;
    font-size: $fontSizeStrong;
    text-align: right;
    font-style: italic;
    a {
      color: darken($fgLink, 10%);
      &:hover { color: $fgLink; }
    }
  }
}

.projects {
  margin: 0 0 ($gapSize/2) 0;
  &_details {
    overflow: hidden;
    margin: 0 0 .5em 0;
    &_image {
      float: left;
      margin-right: $gapSize/2;
      img {
        max-width: 100px;
        max-height: 100px;
      }
    }
  }
  &_collection {
    margin: 0 0 $gapSize/2 0;
    h5 { margin: 0; }
    a {
      text-decoration: none;
      color: darken($fgLink, 10%);
      &:hover { color: $fgLink; }
    }
    &_snippet {
      margin: 0.4em 0 0 0;
      font-size: $fontSizeSmall;
    }
  }
  &_link {
    font-style: italic;
    a {
      color: darken($fgLink, 10%);
      &:hover { color: $fgLink; }
    }
  }
}

.projects-owner {
  width: 100%;
  display: table;
  margin: $gapSize/2 0 $gapSize;
  &_details {
    width: 100%;
    display: table-cell;
    vertical-align: middle;
    .headline {
      margin: 0;
    }
  }
  &_title {
    margin: 0;
    a {
      text-decoration: none;
      color: darken($fgLink, 10%);
      &:hover { color: $fgLink; }
    }
  }
}

.description {
  margin: 0.3em 0 0.5em 0;
  font-size: $fontSizeSmall;
}

.collection-tiles-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
}

.collection-tile {
  width: 200px;
  height: auto;
  text-align: left;
  padding: 0px;
  margin: 5px;

  img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
  }
}


// ---------------------------
// EDITOR SECTION
// ---------------------------

.editor-activity time {
  min-width: 120px;
  color: $bodyFgLight;
  white-space: nowrap;
  display: inline-block;
  font-size: $fontSizeSmall;
}
