@import 'bootstrap/custom-bootstrap-variables';
@import 'bootstrap/scss/mixins/breakpoints';
@import 'bootstrap/scss/mixins/grid';

.content {
  background-color: $white;
  color: $body-color;

  .site__row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 0 calc(#{$spacer} + 1vw);
    overflow: hidden;

    @include media-breakpoint-up(sm) {
      overflow: inherit;
    }
  }
}


.site__content {
  grid-column-start: 1;
  grid-column: span 12 / span 12;

  &.has-sidebar {
    @include media-breakpoint-up(lg) {
      grid-column: span 8 / span 8;
    }
  }

  .site.is-unpublished & {
    background: repeating-linear-gradient(-45deg, rgba($warning,0.15), rgba($warning,0.15) 0.625rem, rgba($warning,0.1) 0.625rem, rgba($warning,0.1) 1.25rem);
    position: relative;

    &::before {
      content: 'Unpublished';
      color: mix($black, $warning, 40%);
      font-family: $font-family-monospace;
      padding: 5px;
      display: block;
      background: repeating-linear-gradient(-45deg, rgba($warning,0.5), rgba($warning,0.5) 0.625rem, rgba($warning,0.45) 0.625rem, rgba($warning,0.45) 1.25rem);
    }
  }
}

.site__sidebar {
  grid-column-start: 1;
  grid-column: span 12 / span 12;

  @include media-breakpoint-up(lg) {
    grid-column: span 3 / span 3;
    grid-column-start: 10;
  }
}

@include media-breakpoint-up(lg) {
  .site__sidebar-inner {
    position: sticky;
    top: $spacer;
    max-height: calc(100vh - #{$spacer});
    overflow-y: auto;
  }

  #toolbar-administration ~ * .site__sidebar-inner {
    top: calc(#{$spacer} + 80px);
  }
}