@import 'src/styles/variables';

.page_wrapper {
  display: grid;
  grid-template-areas: 'sidebar header'
                        'sidebar main';
  grid-template-columns: 240px 1fr;
  grid-template-rows: 72px 1fr;
  min-height: 100vh;
  background-color: #F5F7F9;

  &_header {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;

    display: block;
    height: 100px;
    width: 100%;
    background-color: var(--color-white);
  }

  &_main,
  &_main_mobile {
    grid-area: main;
    display: block;
    width: calc(100vw - 258px);
    min-height: calc(100vh - 72px);
    padding: 24px;
    box-sizing: border-box;
    break-inside: auto;
  }

  &_main {
    &_mobile {
      width: calc(100vw - 240px);
      padding: 24px 24px 82px;
    }

    &_fullscreen {
      display: block;
      padding: 24px;
      width: calc(100vw - 18px);
      min-height: 100vh;
      box-sizing: border-box;
      background-color: #F5F7F9;
    }
  }
}

@media (max-width: 1000px) {
  .page_wrapper {
    grid-template-columns: 60px 1fr;

    &_main {
      width: calc(100vw - 78px);
    }

    &_main_mobile {
      width: calc(100vw - 60px);
    }
  }
}

@media (max-width: 700px) {
  .page_wrapper {
    grid-template-areas: 'header header' 'main main';

    &_main {
      width: calc(100vw - 18px);
    }

    &_main_mobile {
      width: 100vw;
    }
  }
}

@media print {
  .page_wrapper {
    grid-template-areas: 'main main' 'main main';

    &_main {
      width: 100vw;
      padding: 12px 0;
    }
  }
}
