@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");
@import url('../../styles.css');

:root {
  --header-height: 4rem;
  --sub-header-height: 0rem;
  --nav-width: 80px;
  --nav-expand-width: 228px;
  --first-color: var(--fh-color-bg-primary);
  --first-color-light: var(--fh-color-text-primary);
  --white-color: var(--fh-color-primary);
  --body-font: var(--fh-font-family-primary);
  --normal-font-size: 1rem;
  --z-fixed: 998;
}

.body-pd *,
::before,
::after {
  box-sizing: border-box
}
a {
  text-decoration: none
}
ul {
  list-style: none;
}

.main-area {
  position: relative;
  padding: 8px 0 0 8px;
  margin-left: 0;
  width: 100vw;
  margin-top: calc(var(--header-height) + var(--sub-header-height));
  height: calc(100vh - var(--header-height) - var(--sub-header-height));
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--fh-color-bg-secondary);
  border-radius: var(--fh-border-radius);
  transition: .5s;
  overflow-x: hidden;
  overflow-y: auto;
}

.header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background-color: var(--fh-color-bg-secondary);
  z-index: 1000;
  transition: .5s;
  color: var(--fh-color-text-primary);
  margin-left: 6px;
  width: 100vw;
}
.header-pd {
  width: calc(100vw - var(--nav-width) - 10px) !important;
  margin-left: calc(var(--nav-width) + 10px);
}
.sub-header {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding: 0 1rem;
  transition: .5s;
  border-top: var(--fh-border1);
  background-color: var(--fh-color-bg-secondary);
  height: var(--sub-header-height) ;
  align-items: center;
  /* box-shadow: 0 10px 10px -10px rgba(0, 0, 0, .1); */
  /* border-radius: var(--fh-border-radius); */
  
}

.body-pd {
  margin-left: var(--nav-width) !important;
  width: calc(100vw - var(--nav-width)) !important;
}

.sub-header .sub-greeting {
  display: none;
}

.header.body-pd #header-toggle-mobile {
  display: none !important;
}

.header_toggle {
  color: var(--first-color);
  font-size: 1rem;
  cursor: pointer;
  transition: .3s;
}
.header_toggle:hover {
  transform: scale(1.5);
  transition: .3s;
}

.header img{
  height: 2rem;
  object-fit: contain;
}

.header_img {
width: 40px;
height: 40px
}

.header .right-content {
display: flex;
justify-content: end;
gap: 1rem;
align-items: center;
height: 100%;
}

.header .right-content .apartment {
display: flex;
/* justify-content: space-between; */
gap: 10px;
align-items: center;
height: 100%;
cursor: pointer;
}

.header .right-content .apartment .apartment-switch-btn {
width: 1.5rem;
}

.header .right-content .apartment .apartment-img {
height: 40px;
width: 40px;
border-radius: var(--fh-border-radius-circle);
overflow: hidden;
}
.header .right-content .apartment .apartment-img img {
height: 40px;
object-fit: contain;
}

.header-toggle-container:hover {
  background-color: var(--fh-color-primary);
  color: var(--fh-color-text-tertiary);
}

.l-navbar {
  position: fixed;
  top: 0;
  left: -100%;
  width: var(--nav-width);
  height: calc(100vh);
  background-color: var(--first-color);
  transition: .5s;
  z-index: var(--z-fixed);
  padding-bottom: 1rem;
  /* margin: 1rem 0; */
  overflow: hidden;
  /* border-right: 1px solid rgba(0, 0, 0, 0.1); */
  background-color: var(--fh-color-bg-primary);
  /* box-shadow: 8px 0px 5px -5px rgba(0, 0, 0, .1); */
}

.l-navbar.show {
  left: 0;
}

.nav {
  height: 100%;
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
  flex-wrap: nowrap;
}

.nav_logo,
.nav_link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  padding: .5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}
.nav_logo {
  flex-direction: column;
  justify-content: center;
}

.nav_link.active * {
  color: var(--fh-color-primary) !important;
}

.nav_link_content {
  display: flex;
  justify-content: start;
  align-items: center;
  /* gap: 1rem; */
  height: 2.5rem;
  color: var(--fh-color-text-primary)
}
.nav_link .nav_link_expand_icon {
  display: none;
  font-size: .8rem;
}

.nav_logo {
  padding-bottom: 1rem;
  /* display: flex; */
  /* flex-direction: column; */
  /* justify-content: center; */
  /* align-items: center; */
  /* gap: 10px; */
}

.nav_logo img {
  height: 2.5rem;
  object-fit: contain;
}

.header .middle-content {
  display: flex;
  justify-content: start;
  gap: 20px;
}

.nav_logo-icon {
  font-size: 1.25rem;
  color: var(--white-color)
}

.nav_logo-name {
  color: var(--white-color);
  font-weight: 700
}

.nav_link {
  position: relative;
  color: var(--first-color-light);
  transition: .3s;
  width: 100%;
}

.nav_list {
  height: 85vh;
  overflow-y: scroll;
  overflow-x: hidden;
}

.nav_logo-name,
.nav_name {
  max-width: 0;
  line-height: 1.5rem;
  overflow: hidden;
  transition: .3s;
} 

.nav_link:hover * {
  color: var(--white-color) !important;
}

.nav_icon {
  font-size: 1.25rem
}

.l-navbar *.active{
  color: var(--white-color) !important
}


.nav-item .active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: .3rem;
  height: 100%;
  background-color: var(--white-color)
}

.height-100 {
  height: 100vh
}

.nav-item {
  position: relative;
}

.dropdown-menu.show {
  border-radius: var(--fh-border-radius2);
  border: .2px solid var(--fh-color-primary);
}

.nav-item .dropdown-menu {
  visibility: hidden;
  opacity: 0;
  display: flex;
  flex-direction: column;
  /* gap: 1rem; */
  position: absolute;
  top: 0;
  right: 0;
  transform: translateX(calc(100%));
  background-color: var(--fh-color-bg-secondary);
  text-align: left;
  -webkit-transition: opacity 0.3s ease, visibility 0.3s ease;
  -o-transition: opacity 0.3s ease, visibility 0.3s ease;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  -webkit-box-shadow: var(--fh-shadow3);
  box-shadow: var(--fh-shadow3);
  border-radius: var(--fh-border-radius);
  border: none;
  padding: 1rem;
}

.dropdown-menu.bottom-right {
  top: calc(100% + 10px);
  right: 0;
  transform: translateY(0)
}

.dropdown-menu.bottom-left {
  top: calc(100% + 10px);
  transform: translateY(0);
  left: 0;
}

.nav-item:hover > .dropdown-menu {
  visibility: visible;
  -webkit-transition-delay: 0s;
  -o-transition-delay: 0s;  
  transition-delay: 0s;
  opacity: 1;
}

.nav-item .nav-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--fh-color-text-primary);
  object-fit: cover;
}

.dropdown-menu .dropdown-title {
  color: var(--fh-color-text-primary);
  padding: 1rem;
  text-decoration: none;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid var(--fh-color-text-secondary);
}

.dropdown-link {
  cursor: pointer;
}

.dropdown-item {
  /* font-weight: bold; */
  color: var(--fh-color-text-primary);
  padding: .5rem !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dropdown-list .dropdown-item {
  /* margin-left: .5rem; */
}



/* .dropdown-item.active, */
.dropdown-link .dropdown-list .dropdown-item:hover,
.dropdown-menu .dropdown-item:hover {
  background-color: var(--fh-color-bg-primary) ;
  color: var(--fh-color-primary) !important;
}
.dropdown-item.active {
  background-color: var(--fh-color-primary) !important;
  color: var(--fh-color-text-tertiary) !important;
}
.dropdown-item.active * {
  color: var(--fh-color-text-tertiary) !important;
}

.dropdown-link .dropdown-list {
  /* width: 100%; */
  max-height: 0;
  margin: 0;
  overflow: hidden;
  transition: .3s;
  z-index: 9999999;
  position: absolute;
  top: 100%;
  background-color: var(--fh-color-bg-secondary);
  box-shadow: var(--fh-shadow3);
  display: flex;
  flex-direction: column;
  border-radius: var(--fh-border-radius2);
}
.dropdown-link .dropdown-list.bottom-right {
  top: 100%;
  right: 0;
}

.dropdown-link .dropdown-list.show {
  max-height: 70vh;
  padding: 1rem 0;
  overflow-y: scroll;
  border: .2px solid var(--fh-color-primary);

  /* overflow-y: scroll; */
}


@media screen and (min-width: 1000px) {

  #header-toggle-mobile {
    display: none !important;
  }
  
  .header {
    margin-left: calc(var(--nav-width) + 16px);
    width: calc(100vw - var(--nav-width) - 16px);
  }
  .main-area {
    margin-left: calc(var(--nav-width) + 8px);
    width: calc(100vw - var(--nav-width) - 8px);
  }
  
  .l-navbar {
    top: 0;
    left: 0;
  }

  .l-navbar.show {
    width: var(--nav-expand-width);
    left: 0;
  }

  .header-pd {
    margin-left: calc(var(--nav-expand-width) + 16px) !important;
    width: calc(100vw - var(--nav-expand-width) - 16px) !important;
  }
  .body-pd {
    margin-left: calc(var(--nav-expand-width) + 8px) !important;
    width: calc(100vw - var(--nav-expand-width) - 16px) !important;
  }

  .l-navbar.show .nav_logo-name,
  .l-navbar.show .nav_name{
    max-width: 1000px;
    transition: max-width 2s;
  }

  .sub-header .sub-greeting {
    display: inline-block;
  }

  .l-navbar.show .nav-item .dropdown-menu.bottom {
    position: relative;
    visibility: visible;
    opacity: 1;
    max-height: 0;
    transform: translateY(0);
    width: 100%;
    overflow: hidden;
    padding: 0 1rem 0 2rem;
    transition: max-height .1s;
    background-color: unset;
    box-shadow: none;
  }
  .l-navbar.show .nav-item .dropdown-menu.bottom .dropdown-title {
    display: none !important;
  }
  .l-navbar.show .nav-item .dropdown-menu.bottom a {
    text-wrap: wrap;
    background-color: unset;
    color: var(--first-color-light);
    position: relative;
    padding: 0 0 0 1.5rem;
    padding-right: 0;
    font-size: 1rem;
  }
  /* .l-navbar.show .nav-item .dropdown-menu.bottom a::before {
    content: "";
    position: absolute;
    left: 0; 
    top: 50%;
    transform: translateY(-50%); 
    width: 6px; 
    height: 6px;
    border-radius: 50%; 
    background-color: var(--first-color-light);
  } */
  .l-navbar.show .nav-item .dropdown-menu.bottom a:hover {
    color: var(--white-color);
  }
  .l-navbar.show .nav-item .dropdown-menu {
    margin-bottom: .5rem;
  }
  .l-navbar.show .nav-item .dropdown-menu:nth-child(2) {
    margin-top: .5rem;
  }

  .l-navbar.show .nav-item .dropdown-menu.bottom.expanded {
    /* margin-top: 1rem; */
    /* padding-bottom: 1rem; */
    max-height: 1000px;
    transition: max-height .3s;
  }
  .l-navbar.show .nav_link_expand_icon {
    display: inline-block;
    font-size: 1rem;
  }
  .l-navbar.show .nav_link {
    display: flex;
    justify-content: space-between;
  }
  .l-navbar.show .nav_link_content {
    gap: 1rem
  }

}

