* {
  outline: none;
}

main {
  transition: padding 0.5s;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;

  &.expanded .breadcrumbs {
    padding-left: 22rem;
  }

  &.collapsed .breadcrumbs {
    padding-left: 4.2rem;
    pointer-events: auto;
  }
}

@include media-breakpoint-up(sm) {
  main.collapsed .breadcrumbs {
    padding-left: 10.3rem;
  }
}

@include media-breakpoint-up(lg) {

  main.expanded {
    padding-left: 18rem;

    .breadcrumbs {
      padding-left: 22rem;
    }
  }

  main.collapsed {
    padding-left: 0;

    .breadcrumbs {
      opacity: 1;
    }
  }
}

@include media-breakpoint-down(md) {
  main {
    position: relative;
    overflow-x: hidden;
  }

  main:before {
    content: "";
    position: absolute;
    background: $dark-popover-background;
    top: -10%;
    left: -10%;
    width: 0;
    height: 0;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
  }

  main.expanded {
    position: fixed;
  }

  main.expanded:before {
    opacity: 1;
    width: 120%;
    height: 120%;
  }

  main.expanded .overview, main.expanded .content {
    filter: blur(5px);
    pointer-events: none;
  }

  main.expanded .breadcrumbs {
    opacity: 0;
    pointer-events: none;
  }

  .breadcrumbs {
    transition: all .5s ease;
  }
}

@include media-breakpoint-down(xs) {
  .breadcrumbs span {
    display: none;
  }
}

.breadcrumbs-bg {
  display: block;
  content: " ";
  z-index: -1;
}

.breadcrumbs, .breadcrumbs-bg {
  @include brand-font-h3();
  position: fixed;
  top: 0;
  left: 0;
  padding-left: 4rem;
  height: 3.75rem;
  padding-top: 1.15rem;
  width: 100%;
  font-size: 1rem;
  transition: padding 0.5s;

  .ico {
    font-size: 0.8em;
    margin-left: 0.6125rem;
    margin-right: 0.425rem;
  }

  &.with-tabs {
    height: 6.5rem;
  }
}

.breadcrumbs select.form-control {
  max-width: 25rem;
  margin-top: -0.5rem;
  font-family: $font-family-sans-serif;
}

.overview {
  height: 15rem;
  position: absolute;
  width: 100%;
  z-index: 8;

  &.with-tabs {
    height: 17.5rem;
  }

  &.has-icon {
    display: flex;
    padding-left: 4rem;
    padding-top: 7.3rem;

    .overview-icon i {
      font-size: rem(60);
      color: $gray-800;
      position: relative;
      bottom: rem(10);
    }

    h1, .subtext {
      @extend .ml-3;
      @extend .pt-0;
    }
  }

  .nav-tabs {
    margin-top: 3.8rem;
    padding-left: 2rem;
  }

  .subtext {
    @include brand-font-h3();
    text-transform: none;
    display: block;
    margin-left: 4.125rem;
    margin-right: 4.125rem;
  }
}

// .with-icon
.overview.with-icon {
  .ico {
    font-size: 4rem;
    position: absolute;
    top: 6.125rem;
    left: 3.75rem;
    color: $gray-800;
  }

  img {
    position: absolute;
    top: 7rem;
    left: 3.75rem;
    width: 4.5rem;
  }

  h1 {
    margin-left: 9rem;
  }

  .subtext {
    margin-left: 9rem;
  }
}



@include media-breakpoint-down(xs) {
  .overview {
    display: none;
  }
}

.overview h1 {
  padding-top: 7.25rem;
  margin-left: 4rem;
  margin-bottom: 0.25rem;
}

section.content {
  @include media-breakpoint-down(xs) {
    padding: 0.5rem;
  }

  padding: 2.875rem;

  &.no-padding {
    padding: 0;
  }

  &.with-tabs {
    margin-top: 6.5rem;
  }
}

breadcrumb + section.content {
  margin-top: 3.7rem;
}

.overview + section.content {
  padding-top: 17.85rem;
}

@include media-breakpoint-down(xs) {
  .overview + section.content {
    padding-top: 6.8rem;
  }
}

.overview.with-tabs + section.content {
  padding-top: 240px;
}

.layout-sidebar {
  padding: 0 15px;

  > .row {
    height: 100vh;
    margin-top: -56px;
    padding-top: 56px;
  }

  &.sidebar-right .sidebar {
    border-left: solid 0.0625rem $gray-100;
  }

  &.sidebar-left .sidebar {
    border-right: solid 0.0625rem $gray-100;
    order: -1;
  }

  .content, .sidebar {
    overflow: scroll;
  }
}

.sidebar {
  background: $gray-75;
  padding: 0;
  line-height: 1em;

  .sidebar-content {
    padding: 1em 1.5rem;

    p, label, .form-group {
      line-height: 1em;

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

  .sidebar-highlight {
    background: $gray-100;
    margin-left: -1rem;
    margin-right: -3.8rem;
    padding: 1rem 2rem;
  }

  hr {
    margin: 0;
  }
}

.split-layout {
  padding: 2em;
}

section.floating {
  @include media-breakpoint-down(xs) {
    margin-right: 0;
  }

  @include media-breakpoint-up(sm) {
    margin-right: 1rem;
  }

  & > .col:first-child {

    @include media-breakpoint-down(xs) {
      padding: 0 2.5rem 2rem;
    }

    padding-left: 4rem;
    padding-right: rem(24);

    h2 {
      margin-top: 0.75rem;
    }
  }
}

.flex {
  display: flex;

  &.center-center {
    justify-content: center;
    align-items: center;
  }
}

.content-split {
  display: flex;
  min-height: 100vh;

  @media all and (max-width: 1023px) {
    flex-direction: column;
  }

  @media all and (min-width: 1024px) {
    flex-direction: row;
  }
}

.content-split .content-main {
  flex: 1;
  padding: 0 2.25rem 0.5rem 0;

  .card {
    margin-left: -1rem;
    margin-top: -1rem;
  }
}

.content-split .content-sidebar {
  border-left: solid 0.0625rem $gray-200;
  padding: 0.5rem 2.25rem;

  @media all and (max-width: 1023px) {
    flex: 1;
  }

  @media all and (min-width: 1024px) and (max-width: 1279px) {
    flex: 0 0 16rem;
    max-width: 16rem;
  }

  @media all and (min-width: 1280px) {
    flex: 0 0 20rem;
    max-width: 20rem;
  }
}

.tab-pane .floating > .col:first-child {
  padding-left: 3rem;
}

.content > .bleed {
  margin-left: -2.875rem;
  margin-right: -2.875rem;

  &:first-child {
    margin-top: -2.875rem;
  }
}

.content > header {
  margin: -2.875rem -2.875rem 2rem;
  padding: 3rem 4rem 2rem;
  background-color: $white;
  border-bottom: 1px solid $gray-75;
}

// Rightbar
.rightbar-content .tabs-menu .nav-tabs li.nav-item:first-child a {
  margin-left: 0;
}

.rightbar-fixed {
  position: fixed;
  padding-top: 1rem;
  width: 370px;
  max-height: calc(100vh - 27rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.rightbar-inline {
  padding: 0 2rem;
}

.rightbar-list, .lined-list {
  @extend .list-unstyled;
  padding-left: 0;
  margin-bottom: 0;

  li {
    border-bottom: solid 0.0625rem $gray-100;
    padding: 0.75rem 0 0.5rem;
    font-size: 0.875rem;
  }
}

// Misc Responsive

@include media-breakpoint-down(xs)  {
  .overview.with-tabs {
    + section.content {
      padding-top: 9.4rem;
    }
  }

  .overview + .content > .tabs-menu > .nav-tabs {
    top: 9.4rem;
    z-index: 1001;
  }
}

//Prevents tabs scrolling horizontally in lg viewport
@include media-breakpoint-down(lg)  {
  .rightbar-content .nav-tabs .nav-link {
    margin: 0 .35rem;
  }
}

@include media-breakpoint-down(sm)  {
  //Fix for pages where the filters were going up under fixed breadcrumbs
  section.content {
    padding-top: 2.875rem;
  }
}

.split-pane-container {
  margin: 0;
}

.split-pane-right {
  &.with-divider {
    border-left: solid 0.0625rem $gray-200;
  }
}

.card-inset-row {
  background-color: $gray-75;
  border-top: solid 0.0625rem $gray-150;
  border-bottom: solid 0.0625rem $gray-150;
  padding-top: 2rem;
  margin-left: -4.25rem;
  margin-right: -4.25rem;
  padding: 2rem 3rem 0;
  margin-bottom: 3rem;
  margin-top: 3rem;
}



.diagonal {
  $gradient-end: mix($intense-orange, $yellow-700, 25%);
  width: 100%;
  height: 750px;
  position: fixed;
  left: 0;
  top: 0;
  overflow: hidden;
  transform: skewY(-12deg);
  transform-origin: 0;
  background: linear-gradient(to right, $intense-orange, $gradient-end);
  z-index: -1;

  img {
    width: 100%;
    height: 100%;
    opacity: .5;
    mix-blend-mode: hard-light;
  }
}

section.content.has-tabs {
  margin-bottom: 0;
  padding-bottom: 0;
}
