:root {
  --popup-color: rgb(62, 184, 255);
  --colored-button-color: rgb(48, 140, 193);
}

.nav-bar {
  padding: 5px;
  display: inline-block;
  vertical-align: middle;
  align-items: stretch;
  box-sizing: border-box;
  height: 85px;
}

.nav-bar>* {
  display: inline-block;
  margin-top: auto;
  margin-bottom: auto;
}

#navbar-button:active {
  background-color: rgba(255, 255, 255, 0.4);
}

.nav-links {
  height: min-content;
  margin-left: 8%;
  margin-right: 3%;
  width: 100%;
  display: flex;
  justify-content: left;
  user-select: none;
}

.nav-links a {
  color: white;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 8px 13px;
  display: flex;
  align-content: center;
  align-items: center;
  transition: background-color 0.1s ease;
}

.nav-links a div {
  font-size: 15px;
}

.nav-links a img {
  width: 30px;
  margin-right: 10px;
  transition: all 0.2s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.nav-links a+a {
  margin-left: 30px;
}

.nav-links a:hover {
  background-color: rgba(0, 0, 0, 0.3);
  transition: background-color 0.1s ease;
}

.nav-links a:active {
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.1s ease;
}

.nav-links a:active img {
  transform: scale(80%);
  opacity: 80%;
}

.logo {
  height: 100%;
  transition: all 0.1s cubic-bezier(0.075, 0.82, 0.165, 1);
  box-sizing: border-box;
}

.logo:active {
  transform: scale(90%);
}

.nav-title {
  font-size: 32px;
  color: rgb(28, 30, 31);
  margin-left: 10px;
}

.important-button {
  appearance: none;
  display: block;
  padding: 10px;
  aspect-ratio: 1/1;
  height: 70%;
  margin-left: auto;
  margin-top: auto;
  margin-bottom: auto;
  background-color: rgba(255, 255, 255, 0);
  margin-right: 1.5%;
  cursor: pointer;
  border: none;
}

.important-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.important-button:focus-within {
  background-color: rgba(255, 255, 255, 0.4);
}

.important-button svg {
  pointer-events: none;
  width: 100%;
}

#themePopup {
  top: 90px;
  right: 10px;
}

.popup-container {
  z-index: 1;
  display: none;
  position: fixed;
  width: 15%;
  min-width: 300px;
  padding: 2px;
  box-sizing: border-box;
  background-color: var(--transparent-gray-border);
}

.popup {
  padding: 15px;
  pointer-events: all;
  background-color: var(--background-color);
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: var(--main-font);
  color: var(--font-color);
}

.popup .multi-option-control-container {
  margin-top: 10px !important;
}

.popup-container.shown {
  display: block;
  animation: 0.5s popup-appear cubic-bezier(0.075, 0.82, 0.165, 1);
}

.popup-container.hidden {
  display: block !important;
  animation: 0.5s popup-disappear cubic-bezier(0.075, 0.82, 0.165, 1);
}

@keyframes popup-appear {
  from {
    opacity: 0;
    transform: translateY(-15%);
  }

  to {
    opacity: 1;
    transform: translateY(0%);
  }
}

@keyframes popup-disappear {
  from {
    opacity: 1;
    transform: translateY(0%);
  }

  to {
    opacity: 0;
    transform: translateY(-15%);
  }
}

.toggle-button {
  height: 100%;
  width: 100%;
  text-align: left;
}

.toggle-button>div {
  padding-left: 23px;
}

.selected {
  display: inline;
}

/* animate icon */
#themeButton div {
  width: 100%;
  height: 100%;
  background-image: url('/icons/theme-button.webp');
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  animation: animated-icon-out 0.3s steps(6) forwards;
}

#themeButton.animate div {
  animation: animated-icon-in 0.3s steps(6) forwards;
}

.desktop-theme-options {
  margin: 0px !important;
  width: 100% !important;
  height: 80px !important;
  box-sizing: border-box;
}

#hamburgerButton {
  display: none;
}

#hamburgerButton.important-button {
  z-index: 2;
  width: 50px;
  height: 50px;
  margin-right: 0;
  margin-left: 0;
  padding: 6px;
}

#hamburgerButton div {
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: url('/icons/hamburger-button.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 0% 0%;

  animation: animated-icon-out 0.3s steps(6) forwards;
}

#hamburgerButton.animate {
  background-color: rgba(255, 255, 255, 0.4);
}

#hamburgerButton.animate div {
  animation: animated-icon-in 0.3s steps(6) forwards;
}

.hamburger-menu {
  all: none;
  justify-content: center;
  display: none;
  flex-direction: column;
  position: fixed;
  background-color: var(--background-color);
  color: var(--font-color);
  width: 75%;
  height: 100%;
  top: 0px;
  left: 0px;
  overflow-y: scroll;
  z-index: 1;
  pointer-events: all;
  cursor: auto;
  overflow: hidden;
  user-select: none;
  clip-path: polygon(calc(100% - 5px) 0px, calc(100% - 5px) 5px, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%, 0px 100%, 0px 0px);
}

.hamburger-menu.hamburger-open {
  display: flex;
  animation: hamburger-open 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.hamburger-menu.hamburger-closed {
  animation: hamburger-close 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
  pointer-events: none;
}

@keyframes hamburger-open {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(0%);
  }
}

@keyframes hamburger-close {
  from {
    transform: translateX(0%);
  }

  to {
    transform: translateX(-110%);
  }
}

#hamburgerBG.hamburger-open {
  display: block;
  animation: fade-in 0.5s ease;
}

#hamburgerBG.hamburger-closed {
  animation: fade-out 0.5s ease forwards;
  pointer-events: none;
}

#hamburgerBG {
  display: none;
  background-color: rgba(0, 0, 0);
  opacity: 40%;
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0%;
  top: 0%;
  z-index: 0;
}

@keyframes fade-in {
  from {
    opacity: 0%;
  }

  to {
    opacity: 40%;
  }
}

@keyframes fade-out {
  from {
    opacity: 40%;
  }

  to {
    opacity: 0%;
  }
}

.hamburger-header {
  display: flex;
  justify-content: left;
  align-items: center;
  width: 100%;
  height: 85px;
  box-sizing: border-box;
  background-color: var(--secondary-bg-color);
  padding: 0 2% 0 calc(2% + 65px);
  flex-shrink: 0;
}

.hamburger-header h3 {
  margin: 1px;
  font-size: 25px;
  font-weight: 800;
}

.hamburger-header .close-button-container {
  margin-right: 5%;
  height: 65%;
  aspect-ratio: 1/1;
}

.hamburger-body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  margin-top: 2%;
  margin-bottom: 2%;
}

.hamburger-body a {
  color: var(--font-color);
  text-decoration: none;
  padding: 5px 10px 5px 10px;
  display: flex;
  align-content: center;
  align-items: center;
  border-bottom: 1px rgba(128, 128, 128, 0.2) solid;
  transition: background-color 0.1s ease;
}

.hamburger-body a>div {
  font-size: 16px;
}

.hamburger-body a>img {
  width: 50px;
  margin-right: 10px;
  transition: all 0.2s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.hamburger-body a:hover {
  background-color: rgba(128, 128, 128, 0.1);
  transition: background-color 0.1s ease;
}

.hamburger-body a:active {
  background-color: rgba(128, 128, 128, 0.2);
  transition: background-color 0.1s ease;
}

.hamburger-body a:active>img {
  transform: scale(80%);
  opacity: 80%;
}

.theme-switch-section {
  display: block;
  align-self: flex-end;
  bottom: 0%;
  justify-content: center;
  background-color: var(--secondary-bg-color);
  width: 100%;
  height: 90px;
}

.theme-text {
  color: var(--font-color);
  left: 3%;
  margin-top: 4%;
  margin-left: 4%;
  width: 100%;
  justify-content: left;
  align-self: flex-start;
  height: fit-content;
}

.mobile-theme-switch {
  width: 45% !important;
  min-width: 65px !important;
  height: 40% !important;
  min-height: 20px !important;
}

.mts-option-ico {
  height: 60%;
  display: block;
  margin: auto;
}

/* Accessible animations */
@media(prefers-reduced-motion) {
  .logo {
    transition: all 0.1s ease;
  }

  .logo:active {
    transform: none;
    filter: brightness(80%);
    transition: all 0.1s ease;
  }

  @keyframes popup-appear {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }
  
  @keyframes popup-disappear {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }

  .nav-links a:active img {
    transform: none !important;
    filter: brightness(80%);
    opacity: 80%;
  }
}

/* Code for big screens */
@media (min-width: 616px) {
  .hamburger-menu {
    display: none !important;
  }

  #hamburgerBG {
    display: none !important;
  }
}

/* Code for small screens */
@media (max-width: 615px) {
  #themeButton {
    display: none;
  }

  #themePopup {
    display: none;
  }

  #hamburgerButton {
    position: absolute;
    left: 10px;
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-title {
    display: none;
  }

  .nav-bar {
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .logo {
    margin: 0;
    box-sizing: border-box;
    height: 95%;
    aspect-ratio: 1/1;
  }

  .logo:active {
    transform: scale(90%);
  }

  @media(prefers-reduced-motion) {
    .logo:active {
      transform: none;
    }

    .animate {
      animation: none !important;
    }
  }
}