@import "../settings/variables";

.l-detail-page {
  display: flex;
  flex-direction: row;
  height: 100%;
  min-width: 768px;
  width: 100%;

  &__main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: spacing(md) spacing(xl);
  }

  &__banner {
    flex: 0 0 auto;
    padding: spacing(md) 0;
  }

  &__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  &__breadcrumbs {
    flex: 1 1 auto;
    padding: spacing(md) 0;
  }

  &__actions {
    padding: spacing(md) 0 spacing(md) spacing(lg);
  }

  &__title {
    padding: spacing(sm) 0;
  }

  &__subtabs {
    padding: spacing(sm) 0;
  }

  &__body {
    display: flex;
    flex: 1 0 auto;
    padding: spacing(md) 0;

    &__content {
      flex: 1 1 auto;
    }
  }

  &__sidebar {
    background-color: $core-gray-96;
    border-left: 1px solid $core-gray-90;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: 0.2s width ease-in-out;
    width: 280px;

    &__content {
      flex: 1 0 auto;
      width: 280px;
    }

    &__footer {
      align-items: center;
      border-top: 1px solid $core-gray-90;
      cursor: pointer;
      display: flex;
      flex: 0 0 auto;
      justify-content: center;
      padding: spacing(xl);
      transition: 0.2s width ease-in-out;
      width: 280px;

      &__label {
        color: $core-gray-50;
        font-size: 13px;
        font-weight: 600;
        line-height: 16px;
        padding-right: spacing(md);
      }

      &__icon {
        color: $core-orange-50;
        transform: rotate(180deg);
      }

      &:hover {
        background-color: $core-gray-90;
      }
    }
  }

  &--collapsed {
    .l-detail-page__sidebar {
      width: 40px;

      &__content {
        opacity: 0;
      }

      &__footer {
        border: 0;
        bottom: 0;
        padding: 0;
        position: absolute;
        top: 0;
        width: 40px;

        &__label {
          display: none;
        }

        &__icon {
          padding: 0;
          transform: rotate(0);
        }
      }
    }
  }
}
