:root {
  --navHeight: 110px;
  --navLogoHeight: calc(var(--navHeight) - 20px);
  --navBodyPadding: 130px;
  --navStatusLineHeight: calc(var(--navHeight) / 3);
  --catAccWidthHeight: 50px;
  --logoutColor: #c42424;
}

body {
  padding-top: var(--navBodyPadding) !important;
  box-sizing: border-box;
}

#navbar {
  width: 100%;
  height: var(--navHeight);
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  background-color: var(--contrastcolor);
  display: flex;
  color: var(--fontcolor);
  box-shadow: 1px 1px 5px 1px black;
  z-index: 300;
  transition: 0.15s;
  box-sizing: border-box;
  border-radius: 0px 0px 4px 4px;
  color: black;
}

#navLogo {
  display: block;
  width: 24%;
  margin-left: 1%;
  height: var(--navLogoHeight);
  margin-top: 10px;
  background-color: transparent;
  background-image: url("/src/icon/main.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 15%;
  outline: none;
  border-radius: 3px;
  box-sizing: border-box;
}
#navLogo:focus {
  background-color: var(--contrastcolor-light);
}

#navContent {
  width: 75%;
  height: var(--navHeight);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#navStatusLine {
  width: 100%;
  margin-left: 0%;
  height: var(--navStatusLineHeight);
  background-color: var(--forthwhite);
  border-radius: 0px 0px 0px 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: var(--maincolor-purple);
  box-sizing: border-box;
  position: relative;
}

#navStatusLineContent {
  /* animation properties */
  white-space: nowrap;
  transform: translateX(100%);
  font-size: 1.25em;
  letter-spacing: 1px;
  cursor: default;
  user-select: none;
  box-sizing: border-box;

  animation: scrollText 60s linear infinite;
}

@keyframes scrollText {
  from {
    transform: translateX(125%);
  }
  to {
    transform: translateX(-125%);
  }
}

#navStatusLineLeftEnd {
  background-color: var(--forthwhite);
  border-radius: 0px 0px 0px 200px;
  height: var(--navStatusLineHeight);
  width: 45px;
  position: absolute;
  left: 0px;
  z-index: 3;
  box-shadow: 5px 0px 5px 3px var(--forthwhite);
}

#navStatusLineRightEnd {
  background-color: var(--forthwhite);
  height: var(--navStatusLineHeight);
  width: 15px;
  position: absolute;
  right: 0px;
  z-index: 3;
  box-shadow: -5px 0px 5px 3px var(--forthwhite);
}

#navStatusLineCover {
  width: calc(100% - 10px);
  margin-left: 31px;
  margin-top: calc(var(--navStatusLineHeight) * -1);
  height: var(--navStatusLineHeight);
  background-color: var(--forthwhite);
  opacity: 0;
  transition: 0.15s;
  z-index: 1;

  color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
  box-sizing: border-box;
  padding-right: calc(var(--catAccWidthHeight) + 15px + 5px);
  font-weight: bold;
}
#navStatusLineCover.active {
  opacity: 1;
}

#navCategories {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  box-sizing: border-box;
  padding-right: calc(var(--catAccWidthHeight) + 15px + 5px);
}

#navCategories .navLink {
  font-weight: bold;
}

.navLink {
  background-color: transparent;
  border: none;
  height: calc(var(--navHeight) - var(--navStatusLineHeight) - 10px);
  margin-top: 5px;
  padding: 0px 25px;
  border-radius: 3px;
  transition: 0.15s;
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  z-index: 2;
  font-size: 0.9em;
  box-sizing: border-box;
  color: inherit;
  text-align: center;
}
.navLink:hover,
.navLink:focus {
  background-color: var(--contrastcolor-light);
  text-decoration: none;
}
.navLink.opened {
  margin-top: calc(var(--navStatusLineHeight) * -1);
  height: var(--navStatusLineHeight);
  background-color: transparent;
  color: inherit;
}
.navLink.closed {
  opacity: 0;
  margin-top: calc(var(--navStatusLineHeight) * -1);
  height: var(--navStatusLineHeight);
  background-color: transparent;
  cursor: unset;
}
.navLink.danger {
  color: var(--logoutColor);
}
.navLink.danger:hover,
.navLink.danger:focus {
  background-color: var(--logoutColor);
  color: var(--mainwhite);
}

.externalURL {
  color: var(--maincolor-purple);
  margin-bottom: 1px;
}

#navCategoriesContent {
  height: 0px;
  overflow: hidden;
  transition: 0.15s;
  box-sizing: border-box;
}
#navCategoriesContent.opened {
  height: calc(var(--navHeight) - var(--navStatusLineHeight));
}

.navCatContent {
  width: 100%;
  display: none;
  justify-content: space-evenly;
  background: none;
  box-sizing: border-box;
}
.navCatContent.acc {
  padding-right: calc(var(--catAccWidthHeight) + 15px + 5px);
}
.navCatContent.opened {
  display: flex;
}

/* open or close menu */
#navOpenCloseMenu {
  position: absolute;
  right: 15px;
  top: calc(var(--navStatusLineHeight) + 15px);
  height: 30px;
  width: 30px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  display: none;
  z-index: 4;
}

#navMenuBar1,
#navMenuBar2,
#navMenuBar3 {
  width: 30px;
  height: 3px;
  background-color: var(--thirdwhite);
  transition: 0.15s;
}
#navMenuBar1 {
  margin-bottom: 6px;
}
#navMenuBar3 {
  margin-top: 6px;
}

#navOpenCloseMenu:hover #navMenuBar1,
#navOpenCloseMenu:hover #navMenuBar2,
#navOpenCloseMenu:hover #navMenuBar3 {
  background-color: var(--maincolor-blue);
}
#navOpenCloseMenu:hover:not(.opened) #navMenuBar1 {
  margin-bottom: 8px;
}
#navOpenCloseMenu:hover:not(.opened) #navMenuBar3 {
  margin-top: 8px;
}

.opened #navMenuBar1 {
  transform: translate(0, 8.9px) rotate(-45deg);
}
.opened #navMenuBar2 {
  opacity: 0;
}
.opened #navMenuBar3 {
  transform: translate(0, -8.85px) rotate(45deg);
}

#catAcc {
  position: absolute;
  right: 15px;
  top: 48px;
  width: var(--catAccWidthHeight);
  height: var(--catAccWidthHeight);
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 1px 1px 2px 0px black;
  outline: none;
  transition: 0.15s;
}
#catAcc:hover,
#catAcc:focus {
  scale: 1.1;
  box-shadow: 1px 1px 2px 1px black;
}
#catAcc.closed {
  scale: 1;
  box-shadow: 1px 1px 2px 0px black;
  cursor: default;
  opacity: 0;
}

/* must stay down */
@media (max-width: 900px) {
  :root {
    --navHeight: 90px;
    --navLogoHeight: calc(90px - 20px);
  }

  #navbar.firstOpen {
    --navHeight: 155px;
  }
  #navbar.opened {
    --navHeight: 250px;
  }

  #navCategories {
    display: none;
    flex-direction: column;
  }
  #navCategories.opened {
    display: flex;
  }

  .navLink {
    height: unset;
    padding: 5px 10px;
    width: 75%;
    margin-top: 7px;
  }
  .navLink.opened {
    height: unset;
    margin-top: 2px;
    z-index: 6;
  }
  .navLink:hover,
  .navLink:focus {
    background-color: var(--contrastcolor-light);
  }

  #navCategoriesContent {
    flex-direction: column;
    align-items: start;
  }
  #navCategoriesContent.opened {
    height: unset;
  }

  .navCatContent {
    flex-direction: column;
  }

  #navOpenCloseMenu {
    display: flex;
  }

  #catAcc {
    top: 88px;
  }

  #navStatusLineCover {
    display: none;
  }

  @keyframes scrollText {
    from {
      transform: translateX(50%);
    }
    to {
      transform: translateX(-100%);
    }
  }
}
@media (min-width: 2200px) {
  #navStatusLineContent {
    /* animation properties */
    white-space: nowrap;
    transform: unset;
    font-size: 1.25em;
    letter-spacing: 1px;
    cursor: default;
    user-select: none;
    box-sizing: border-box;
    text-align: center;
    display: block;
    width: 100%;

    animation: scrollText 20s linear infinite;
  }

  @keyframes scrollText {
    0% {
      opacity: 0;
    }
    10% {
      opacity: 0;
    }
    30% {
      opacity: 1;
    }
    70% {
      opacity: 1;
    }
    90% {
      opacity: 0;
    }
    100% {
      opacity: 0;
    }
  }
}
