//
// CIRCLE IMAGES
//

.circle-img {
  border-radius: 50%;
  display: block;
  height: 0;
  overflow: hidden;
  padding-top: 100%;
  position: relative;
  width: 100%;

  .circle-img__fill {
    height: auto;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  .circle-img__placeholder{
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    font-size: 50px;
    justify-content: center;
    align-items: center;
    display: flex;
  }

  @supports (object-fit: cover) {
    .circle-img__fill {
      height: 100%;
      object-fit: cover;
    }
  }
}

//
// DETAILS OVERVIEW (OV) DETAILS PAGE
//

.layout-ov-page {
  &__aside {
    margin-bottom: $grid-gap;
  }

  
  @include media-breakpoint-up(md) {
    margin: calc(#{$content-padding} * -1); // removing padding from shell
    display: flex;
    height: calc(var(--app-height, 100vh) - #{$header-height});

    &__aside {
      flex: 0 0 calc(#{$sidenav-aside-width} + #{$content-padding});
      padding: $content-padding 0 $content-padding $content-padding;
      margin-bottom: 0 !important;
    }

    &__content {
      flex: 1 1 100%;
      padding: $content-padding  $content-padding  0  $grid-gap;
      overflow-y: auto;

      // ff-fix for padding bottom
      &::after {
        content: ' ';
        display: block;
        width: 100%;
        height: $content-padding;
      }
    }
  }

  @include media-breakpoint-up(lg) {
    &__content--padded {
      max-width: 930px;
      margin: 0 auto;
    }
  }
}

.layout__wrapper--focus-mode {
  @include media-breakpoint-up(md) {
    .layout-ov-page__aside,
    .layout-ov-page__content {
      height: calc(var(--app-height, 100vh) - #{$topbar-height});
    }
  }
}

// Overview card aside
.ov-card {
  @include media-breakpoint-up(md) {
    height: 100%;
  }

  .mat-tab-header {
    border-bottom: 0;
  }

  &__content {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  &--fixed-top {
    @media screen and (max-width: 959px) {
      position: fixed;
      z-index: 90;
      top: calc(-125px + 72px + 48px); // negative card height + padding-top + tab-height
      left: 16px;
      right: 16px;

      .ov-header__profile,
      .mat-subheading-2,
      .mat-body,
      .mat-caption {
        display: none;
      }

      .ov-card.sc-card {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
      }

      .ov-header {
        padding-bottom: 12px !important;
      }
    }

    @media screen and (min-width: 600px) and (max-width: 959px) {
      left: 88px; // shell-sidebar-width (72px) + padding (16px)
      top: calc(-125px + 124px + 48px); // negative card height + padding-top + tab-height
    }
  }
}

.layout__wrapper--sidebar-fixed .ov-card--fixed-top {
  left: 296px; // shell-sidebar-wide-width (72px) + padding (16px)
}

.ov-header {
  padding: $content-padding 0;

  &__profile {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: 16px;
    max-width: 360px;
    margin: 0 auto;

    &-pic {
      flex: 0 1 200px;
    }

    &-prev-next {
      flex: 0 0 auto;
      padding: 0 8px;
    }
  }

  &__text {
    text-align: center;
    padding: 0 $card-padding;

    .mat-title,
    .mat-subheading-2,
    .mat-body,
    .mat-caption {
      margin-bottom: 8px !important;

      &:last-child {
        margin-bottom: 0;
      }
    }

    .mat-title {
      line-height: 26px !important;
    }
  }

  &.ov-header--mini {
    padding: 8px 0;

    .ov-header__profile {
      width: 152px;
    }

    .ov-header__profile-prev-next {
      padding: 0 8px;
    }
  }
}

.ov-nav {
  display: none;

  @include media-breakpoint-up(md) {
    display: block;
    overflow: auto;

    // &__nav-item-icon {
    //   margin-right: 8px;
    // }

    &__list-item-title,
    &__list-item-subtitle {
      width: 196px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0 !important;
    }
  }

  &--mobile.mat-tab-group {
    @include media-breakpoint-up(md) {
      display: none !important;
    }
  }
}
