/* Copyright (C) 2019 Monomax Software Pty Ltd
 *
 * This file is part of Dnote.
 *
 * Dnote is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Dnote is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Dnote.  If not, see <https://www.gnu.org/licenses/>.
 */

@import '../../App/theme';
@import '../../App/responsive';
@import '../../App/rem';
@import '../../App/font';
@import '../../App/variables';

.sidebar {
  min-width: 100%;
  width: 100%;
  transition: width 0.25s cubic-bezier(0, 0, 0, 1),
    min-width 0.25s cubic-bezier(0, 0, 0, 1);
  border-right: 1px solid $border-color;
  //overflow-y: scroll;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: auto;
  position: absolute;
  z-index: 3;
  transform: translateX(0);
  height: 100%;

  @include overSidebarThreshold {
    position: relative;
    transform: initial;
    min-width: $note-sidebar-width;
    width: $note-sidebar-width;
  }

  @include breakpoint(xl) {
    min-width: $xl-note-sidebar-width;
    width: $xl-note-sidebar-width;
  }

  .content {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  &.hidden {
    min-width: 0;
    width: 0;
    transform: translateX(-100%);

    .content {
      display: none;
    }
  }

  &.noscroll {
    overflow-y: hidden;
  }

  &.fetching {
    height: 100%;
    background: white;
  }
}

.toggle-sidebar {
  display: none;
}

.header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  border-bottom: 1px solid $border-color;
}

.header-content {
  padding: rem(16px) rem(16px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;

  @include breakpoint(lg) {
    flex-direction: column;
    justify-content: initial;
    align-items: flex-start;
  }
}

.header-heading {
  margin-left: rem(12px);
  margin-bottom: 0;
  @include font-size('large');
  color: $gray;
  text-transform: uppercase;
  font-weight: 400;

  @include overSidebarThreshold {
    margin-top: 0;
    margin-left: 0;
  }
}

.header-actions {
  @include breakpoint(lg) {
    margin-top: rem(16px);
  }
}

.header-left {
  display: flex;
}

.subscriber-wall {
  &.pro {
    display: none;
  }

  @include breakpoint(md) {
    display: none;
  }
}
