/* MENU DISPLAY */
/* ============ */

#mobile_header{
	display:none;
}

#sidebar_toggle{
  width:42px;
  height:42px;
  position:fixed;
  top:20px;
  left:20px;
  z-index:1200;
  display:none;
  align-items:center;
  justify-content:center;
  background-color:var(--sidebar-color);
  border:none;
  border-radius:var(--inner-box-radius);
  cursor:pointer;
  box-shadow:0 4px 10px var(--box-shadow);
  padding:0;
}

.nav_toggle_bar{
  position:relative;
  display:block;
  width:22px;
  height:3px;
  background-color:var(--white);
  border-radius:2px;
  transition:background-color .35s ease, transform .35s ease;
}

.nav_toggle_bar::before,
.nav_toggle_bar::after{
  content:'';
  position:absolute;
  left:0;
  width:22px;
  height:3px;
  background-color:var(--white);
  border-radius:var(--element-radius);
  transition:transform .35s ease, top .35s ease;
}

.nav_toggle_bar::before{
  top:-8px;
}

.nav_toggle_bar::after{
  top:8px;
}


/* MENU CONTENT */
/* ============ */

.sidebar-label{
  font-size:.95rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--sidebar-icon-color);
  margin:0 16px 12px;
}

/* ============================== */

#sidebar_top{
  background-color:var(--primary-color);
  padding:10px 10px;
  display:flex;
  flex-direction:row;
}

#school{
  display:flex;
  align-items:center;
  gap:14px;
}

#school_logo{
  width:70px;
  height:70px;
  background:var(--main-bg);
  border:1px solid var(--black);
  border-radius:var(--box-radius);
  overflow:hidden;
}

#school_logo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

#school_text,
#school_text{
  flex:1;
}

#school_text h1,
#school_text h1{
  font-size:2rem;
  color:var(--white);
  line-height:1;
  margin-bottom:4px;
}

#school_text p,
#school_text p{
  font-size:1rem;
  color:var(--white);
}

/* ============================== */

#sidebar_account{
  width:100%;
  display:flex;
  flex-direction:column;
  border-bottom:1px solid #555555;
  padding:10px 15px;
}

#account_card{
  display:flex;
  flex-direction:row;
  align-items:center;
  color:var(--sidebar-text-color);
}

#icon_background{
  width:50px;
  height:50px;
  background:linear-gradient(160deg, #848584, #b7b8b6);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-right:15px;
}

#icon_background .icon{
  width:40px;
  height:40px;
}

#account_name_div{
  flex:1;
}

#account_name{
  font-size:18px;
}

#account_role{
  font-style:italic;
  font-weight:lighter;
  font-size:14px;
}

#account_actions{
  width:30px;
  display:flex;
  flex-direction:column;
  gap:5px;
}

#account_actions .icon{
  color:var(--white);
  cursor:pointer;
  opacity:.6;
}

#account_actions .icon:hover{
  opacity:1;
}

.icon-settings{
  width:24px;
  height:24px;
}

.icon-settings:hover{
  transform:rotate(90deg);
  transition:transform 0.5s;
}

.icon-logout{
  width:30px;
  height:24px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
  margin-left:3px;
}

.icon-logout .arrow-head1{
  transition-delay:0.05s;
}

.icon-logout .arrow-head2{
  transition-delay:0.1s;
}

.icon-logout .arrow-line,
.icon-logout .arrow-head1,
.icon-logout .arrow-head2{
  transform:translateX(-2px);
  transition:transform 0.3s ease;
}

.icon-logout:hover .arrow-line,
.icon-logout:hover .arrow-head1,
.icon-logout:hover .arrow-head2{
  transform:translateX(6px);
  transition:transform 0.15s ease-out;
}

/* ============================== */

#sidebar_services,
#sidebar_parameters{
  width:100%;
  display:flex;
  flex-direction:column;
  padding:20px 15px;
}

#sidebar_services{
  border-bottom:1px solid #555555;
}

.navigation-link{
  width:100%;
  font-size:18px;
  cursor:pointer;
  border-left:4px solid transparent;
  border-radius:10px 0 0 10px;
  transition:background-color .2s ease, transform .2s ease, border-color .2s ease, opacity .2s ease;
}

.navigation-link:hover{
  background-color:var(--sidebar-hover);
  border-left-color:var(--light-primary-color);
  color:var(--white);
  transform:translateX(3px);
}

.navigation-link.active{
  background-color:var(--primary-color);
  transform:translateX(4px);
  border-left-color:var(--light-primary-color);
}

.navigation-link a{
  width:100%;
  padding:8px 15px;
  text-decoration:none;
  color:var(--sidebar-text-color);
  display:flex;
  flex-direction:row;
  align-items:center;
}

.navigation-link:hover a,
.navigation-link.active a{
  color:var(--white);
}

.navigation-link .icon{
  width:24px;
  height:24px;
  color:var(--white);
  opacity:.6;
  transition:opacity .2s ease, transform .2s ease;
  margin-right:15px;
}

.navigation-link .icon-openMenu,
.navigation-link .icon-closeMenu{
  width:24px;
  height:24px;
  margin-right:0;
  opacity:1;
  transition:transform .2s ease, opacity .2s ease;
}

.navigation-link:hover .icon,
.navigation-link.active .icon{
  opacity:1;
  transform:scale(1.04);
}

.navigation-link a .link-label{
  flex:1;
}

/* SUBMENU */
.submenu{
  margin:6px 0 0 52px;
  padding-left:14px;
  border-left:2px solid var(--sidebar-border-color);
}

.submenu.open{
  display:block;
}

.submenu.close{
  display:none;
}

.navigation-sublink{
  display:flex;
  align-items:center;
  border-radius:10px 0 0 10px;
  color:var(--sidebar-text-color);
  transition:background-color .2s ease, color .2s ease, transform .2s ease;
  cursor:pointer;
}

.navigation-sublink a{
	width:100%;
  text-decoration:none;
  padding:5px 14px;
  color:var(--sidebar-text-color);
}

.navigation-sublink:hover{
  background-color:var(--sidebar-hover);
  transform:translateX(3px);
}

.navigation-sublink.active a{
  color:var(--light-primary-color);
}

.navigation-sublink:hover a{
  color:var(--white);
}


/* ============================== */
/*           COMPACT MODE         */
/* ============================== */

@media screen and (min-width:701px) and (max-width:1400px){
  #sidebar{
    width:var(--sidebar-width-compact);
    min-width:var(--sidebar-width-compact);
  }

  #admin_wrapper{
    margin-left:var(--sidebar-width-compact);
    width:calc(100% - var(--sidebar-width-compact));
  }

  #sidebar_top{
    padding:10px 8px;
    justify-content:center;
  }

  #school{
    width:100%;
    justify-content:center;
  }

  #school_logo{
    width:52px;
    height:52px;
  }

  #school_text,
  #brand_text{
    display:none;
  }

  #sidebar_account{
    padding:10px 8px;
    align-items:center;
  }

  #account_card{
    width:100%;
    flex-direction:column;
    gap:10px;
    align-items:center;
  }

  #icon_background{
    margin-right:0;
  }

  #account_name_div{
    display:none;
  }

  #account_actions{
    width:auto;
    flex-direction:row;
    justify-content:center;
    gap:12px;
  }

  .sidebar-label{
    margin:0 0 12px;
    text-align:center;
    font-size:.72rem;
  }

  #sidebar_services,
  #sidebar_parameters{
    padding:18px 8px;
    align-items:center;
  }

  .navigation-link{
    width:100%;
    border-left:none;
    border-radius:10px 0 0 10px;
    display:flex;
    justify-content:center;
  }

  .navigation-link:hover{
    transform:none;
  }

  .navigation-link a{
    padding:10px 0;
    justify-content:center;
    gap:0;
  }

  .navigation-link .icon{
    margin-right:0;
  }

  .navigation-link .icon-openMenu,
  .navigation-link .icon-closeMenu{
    display:none !important;
  }

  /* Display submenu */
	.submenu{
		margin:6px 0 0 10px;
		padding-left:0;
		border-left:2px solid var(--sidebar-border-color);
	}

	.navigation-sublink{
		font-size:12px;
	}

  /* Tooltip to display label-link */
  #sidebar{
    overflow:visible;
  }

  .navigation-link{
    position: relative;
  }

  .navigation-link.active{
    transform:translateX(0);
  }

  .link-label{
    position:absolute;
    left:72px;
    top:50%;
    transform:translateY(-50%);
    color:var(--white);
    padding:10px 10px;
    border-top:1px solid #1a222b;
    border-right:1px solid #1a222b;
    border-bottom:1px solid #1a222b;
    border-radius:0 10px 10px 0;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    transition:0.2s ease;
  }

  .navigation-link:hover .link-label{
    opacity:1;
    visibility:visible;
    background-color:#393F46;
  }

  .navigation-link.active:hover .link-label{
    background-color:var(--primary-color);
  }
}


/* ============================== */
/*            MOBILE              */
/* ============================== */

@media screen and (max-width:700px){
  #mobile_header{
    display:block;
    position:fixed;
    top:0;
    left:0;
    margin-bottom:25px;
    width:100%;
    height:86px;
		color:var(--white);
    background:var(--primary-color);
		text-align:center;
    z-index:1190;
    box-shadow:0 2px 8px var(--box-shadow);
  }

  #mobile_header_inner{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
  }

  #mobile_header_brand{
    text-align:center;
    color:var(--white);
  }

  #mobile_header_brand h1{
    font-size:1rem;
    line-height:1;
    margin:0 0 4px 0;
  }

  #mobile_header_brand p{
    font-size:0.95rem;
    line-height:1.1;
    margin:0;
  }

  #mobile_header_actions{
    position:absolute;
    right:20px;
    top:50%;
    transform:translateY(-50%);
    display:flex;
    align-items:center;
    gap:10px;
  }

  #sidebar{
    width:100%;
    transform:translateX(-100%);
    z-index:1150;
  }

  html.menu_open #sidebar{
    transform:translateX(0);
  }

  #admin_wrapper{
    margin-left:0;
    width:100%;
  }

  #content{
    width:95%;
  }

  #sidebar_toggle{
    display:flex;
    position:fixed;
    top:22px;
    left:20px;
    width:42px;
    height:42px;
    z-index:1200;
    background:transparent;
    border:none;
    box-shadow:none;
    padding:0;
    align-items:center;
    justify-content:center;
  }

  html.menu_open .nav_toggle_bar{
    background:transparent;
  }

  html.menu_open .nav_toggle_bar::before{
    top:0;
    transform:rotate(45deg);
  }

  html.menu_open .nav_toggle_bar::after{
    top:0;
    transform:rotate(-45deg);
  }
}