/*====================
  CSS Reset
=====================================================================
====================================================================*/

/*
  1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}
/*
  2. Remove default margin
*/
* {
  margin: 0;
}
/*
  3. Allow percentage-based heights in the application
*/
html,
body {
  height: 100%;
}
/*
  Typographic tweaks!
  4. Add accessible line-height
  5. Improve text rendering
*/
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/*
  6. Improve media defaults
*/
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/*
  7. Remove built-in form typography styles
*/
input,
button,
textarea,
select {
  font: inherit;
}
/*
  8. Avoid text overflows
*/
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
/*
  9. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/*=====================================================================
=======================================================================
  CSS Reset End
====================*/

body {
  height: 100%;
  padding: 0 calc(50vw - 690px);
  font-family: Arial, Helvetica, sans-serif;
}

.wrapper {
  display: grid;
  min-height: 100%;
  grid-template-rows: min-content 1fr auto;
}

/* Header
-----------------------------------------------------------------------------*/
.header {
  z-index: 10;
}

#header__nav-icon {
  display: none;
}

.header__wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 4rem;
  padding: 10px 0;
  background: #ffe680;
}

.header__title {
  margin-top: 2px;
  font-size: 1.5rem;
  color: #2970a9;
}

/* Middle
-----------------------------------------------------------------------------*/
.middle {
  width: 100%;
  display: grid;
  grid-template-columns: 18rem auto;
}

.content {
  padding: 2rem 3rem;
}

.board {
  max-width: 85vh;
}

/* Sidebar
-----------------------------------------------------------------------------*/
.sidebar {
  padding: 2rem 1rem;
  min-height: 100%;
  background: #b5e3ff;
  transition: bottom 0.5s;
  scrollbar-width:  none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-greeting {
  color: #1F547F;
  margin-bottom: 0.5rem;
}

.sidebar-name {
  color: #1F547F;
}

.sidebar-name:hover {
  color: #2970a9;
}
.sidebar-logout {
  border-radius: 6px;
}

.sidebar-button, .sidebar-logout a {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0.7rem 0;
  outline: none;
  border: 1px solid;
  border-color: #60a3d8 #2970a9 #2970a9 #60a3d8;
  border-radius: 6px;
  background: #60a3d8 linear-gradient(#89bbe2, #60a3d8 50%, #378bce);
  box-shadow: inset rgba(255, 255, 255, 0.5) 1px 1px;
  line-height: 1.1;
  font-weight: 600;
  text-shadow: #2e7ebd 0 1px 2px;
  text-decoration: none;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}
.sidebar-button:hover, .sidebar-logout a:hover {
  color: rgb(255, 255, 255);
  background-image: linear-gradient(#9dc7e7, #74afdd 50%, #378bce);
}
.sidebar-button:active, .sidebar-logout a:active {
  color: rgb(255, 255, 255);
  border-color: #2970a9;
  background-image: linear-gradient(#5796c8, #6aa2ce);
  box-shadow: none;
}

/* Footer
-----------------------------------------------------------------------------*/
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 5rem;
  padding: 0 1rem;
  background: #bff08e;
  text-align: center;
}

/* Кнопка открытия меню
----------------------------------------------------------------------------*/

#header__nav-icon {
  margin:  0 15px;
  width: 30px;
  height: 22px;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.5s ease-in-out;
  -moz-transition: 0.5s ease-in-out;
  -o-transition: 0.5s ease-in-out;
  transition: 0.5s ease-in-out;
  cursor: pointer;
}

#header__nav-icon span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #2970a9;
  border-radius: 5px;
  opacity: 1;
  left: 0;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.25s ease-in-out;
  -moz-transition: 0.25s ease-in-out;
  -o-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}

#header__nav-icon span:nth-child(1) {
  top: 0px;
}

#header__nav-icon span:nth-child(2),
#header__nav-icon span:nth-child(3) {
  top: 9px;
}

#header__nav-icon span:nth-child(4) {
  top: 18px;
}

#header__nav-icon.open span:nth-child(1) {
  top: 9px;
  width: 0%;
  left: 50%;
}

#header__nav-icon.open span:nth-child(2) {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
}

#header__nav-icon.open span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

#header__nav-icon.open span:nth-child(4) {
  top: 9px;
  width: 0%;
  left: 50%;
}

/* @media
-----------------------------------------------------------------------------*/

@media screen and (max-width: 800px) {
  #header__nav-icon {
    display: block;
  }

  .header__wrapper {
    justify-content: left;
    min-height: 3rem;
  }

  .header__title {
    width:  100%;
    text-align: center;
    font-size: 1.2rem;
  }

  .sidebar {
    position: absolute;
    bottom:  100%;
    z-index: 5;
    max-height: 100%;
    width: 215px;
    padding: 1rem;
    overflow: auto;
  }

  .sidebar_open {
    bottom:  0;
  }

  .sidebar-greeting {
    font-size: 1.1rem;
  }

  .sidebar-button, .sidebar-logout a {
    padding: 0.5rem 0;
  }

  .middle {
    display: block;
    position: relative
  }

  .footer {
    height: 4rem;
  }
}
