/* body {
    perspective: 1500px;
} */

#top-bar .tip {
    pointer-events: none;
    width: 1.5rem;
    height: 1.5rem;
    position: absolute;
    top: 56px;
    margin-top: 56px;
    left: -40px;
    opacity: 0;
    transition: transform 300ms ease-in-out, margin-top 500ms linear 75ms, opacity 500ms linear;
}

#top-bar .first {
    transition: transform 0ms, margin-top 300ms linear 75ms, opacity 500ms linear;
}

#top-bar .header__expandMenu {
    position: absolute;
    top: 68px;
    left: 50%;
    width: 100%;
    height: 100%;
    transform-origin: 0%;
    transform: translateX(-50%) rotate3d(1, 0, 0, -15deg);
    background-color: white;
    border-radius: 0.5rem;
    perspective: 100px;
    transition: width 250ms ease, height 250ms ease, opacity 150ms ease,
        transform 200ms ease-in;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    padding: 20px;
    z-index: 500;
}

#top-bar .menu__container {
    width: 100%;
    height: 100%;
    background-color: white;
}

#top-bar .menu__container>* {
    position: absolute;
    top: 0;
    left: 50%;

    overflow: hidden;
    transform: translateX(-35%);
    transition: transform 250ms linear, opacity 250ms ease;
    opacity: 0;
}
#content {
    display: grid;
    row-gap: 0;
    grid-template-columns: repeat(2, 300px);
}

#information, #media {
    display: grid;
    row-gap: 0;
    grid-template-columns: repeat(3, 300px);
}

#networking,
#discussions {
    width: 400px;
}

#top-bar .active {
    z-index: 1;
    opacity: 1;
    transform: translatex(-50%);
}

#top-bar .prev {
    transform: translateX(-65%);
}

#top-bar .expand {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) rotateX(0);
}

#top-bar .hover {
    opacity: 0.5;
}

#top-bar .new--expand {
    transition: opacity 150ms ease, transform 150ms ease-in;
}

#top-bar .active-color {
    color: #3b82f6;
}

#top-bar .inactive-color {
    color: #111827;
}
.dark #top-bar .inactive-color {
    color: #fff;
}

@media (max-width: 1100px) {
    #information {
        grid-template-columns: repeat(2, 300px);
    }

    #information .promotion {
        grid-column: span 2;
    }
}
#bottom-menu-bar {
    height: 58px + env(safe-area-inset-bottom);
    touch-action: manipulation; /* disables double-tap zoom, keeps pinch-zoom */
    padding:0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
#buttongroup-bottombar {
    touch-action: manipulation; /* disables double-tap zoom, keeps pinch-zoom */
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
.safe-inset-bottom {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
/* Menu animation layers */
#bottom-menu-bar .menu-layer {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background-color: white;
  transform-origin: left;
  transform: scaleX(0);
}

#bottom-menu-bar .menu-layer-1 {
  z-index: 400;
}

#bottom-menu-bar .menu-layer-2 {
  z-index: 401;
}

#bottom-menu-bar .menu-layer-3 {
  z-index: 402;
}

#bottom-menu-bar .menu-backdrop {
  display: grid;
  grid-template-columns: 1fr;
  position: fixed;
  inset: 0;
  z-index: 300;
}

/* Button group */
#bottom-menu-bar .bottom-button-group {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  z-index: 403;
  display: flex;
  opacity: 1;
  transform: translateY(300%);
}

/* Menu items container */
#bottom-menu-bar .menu-items-container {
  position: fixed;
  z-index: 402;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: white;
  inset: 0;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.75rem;
  bottom: 130px;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(-50%);
}
.dark #bottom-menu-bar .menu-items-container {
  background-color: #202020;
}
.dark #bottom-menu-bar .menu-layer {
  background-color: #202020;
}
.dark #buttongroup-bottombar {
  background-color: #202020;
}

/* Animations */
#bottom-menu-bar .animate-in-delay-0 {
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

#bottom-menu-bar .animate-in-delay-1 {
  transition: transform 0.2s ease-out 0.2s, opacity 0.2s ease-out 0.2s;
}

#bottom-menu-bar .animate-in-delay-2 {
  transition: transform 0.2s ease-out 0.4s, opacity 0.2s ease-out 0.4s;
}

@media (max-width: 640px) {
  .dark .menu__container {
    background-color: #141414;
  }
}