* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: "Figtree";
}

.layout_body {
  background-color: var(--darkgray1);
}

/* -- TOP -- */

.top {
  display: none;
  align-items: center;
  height: 60px;
  background: #232323;
  border-bottom: 1px solid var(--darkborder1);
}

.toggle_information_container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 15px;
  top: 17px;
  z-index: 2000;
  border-radius: 20px;
  padding-left: 20px;
  padding-right: 10px;
  background-color: var(--darkgray1);
  cursor: pointer;
  border: 1px solid transparent;
}
.toggle_information_container:hover {
  border: 1px solid rgb(80, 80, 80);
  background-color: var(--darkgray1_hover);
}
.toggle_information_container:active {
  border: 1px solid rgb(80, 80, 80);
  background-color: var(--darkgray1_active);
}

.toggle_buildings_container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 150px;
  top: 17px;
  z-index: 2000;
  border-radius: 20px;
  padding-left: 20px;
  padding-right: 10px;
  background-color: var(--darkgray1);
  cursor: pointer;
}
.toggle_buildings_container:hover {
  background-color: var(--darkgray1_hover);
}
.toggle_buildings_container:active {
  background-color: var(--darkgray1_active);
}

.toggle_information {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: none;
  z-index: 100;
}
.toggle_information img {
  width: 15px;
  height: auto;
  object-fit: contain;
}
.toggle_information_text {
  display: inline-block;
  color: var(--darktext1);
  font-size: 1.2rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.toggle_menu {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 10px;
  top: 10px;
  color: #fff;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  z-index: 100;
}

.toggle_information {
  margin-left: auto;
}

.toggle_menu img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* -- MAIN -- */

.main {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
}

.menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 70px;
  height: 100%;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
  z-index: 100;
  gap: 10px;
}

.menu button:last-of-type {
  margin-bottom: 16px;
}

.menu-logo {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: auto;
  z-index: 1000;
}
.menu-logo img {
  width: 30px;
  height: 30px;
}

.menu-theme-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.menu-theme {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 8px;
  border-radius: 50%;
  background-color: var(--darkgray1);
}
.menu-theme:hover {
  background-color: var(--darkgray1_hover);
}
.menu-theme:active {
  background-color: var(--darkgray1_active);
}

.menu-theme img {
  width: 20px;
  height: 20px;
}

.menu-theme-label {
  margin-top: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--darktext1);
  text-align: center;
}

.menu-item {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background-color: var(--darkgray1);
}
.menu-item:hover {
  background-color: var(--darkgray1_hover);
}
.menu-item:active {
  background-color: var(--darkactive1);
}
.menu-item img {
  width: 20px;
  height: 20px;
}
.menu-item.is-active,
.menu-item.is-active:hover {
  background-color: var(--darkgray1_active);
}

.menu-item-bottom {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  margin-bottom: 8px;
  background-color: var(--darkgray1);
}
.menu-item-bottom:hover {
  background-color: var(--darkgray1_hover);
}
.menu-item-bottom:active {
  background-color: var(--darkgray1_active);
}
.menu-item-bottom img {
  width: 20px;
  height: 20px;
}
.menu-item-bottom.is-active,
.menu-item-bottom.is-active:hover {
  background-color: var(--darkgray1_active);
}

#toggle_menu_buttons {
  display: none;
}

/* --- PANEL --- */

.panel {
  width: 0;
  overflow: hidden;
  background: var(--darkgray1);
  transition: width 0.35s ease;
  display: flex;
  position: relative;
  flex-direction: column;
}

.panel.show {
  width: 260px;
}

.panel-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 20px;
  cursor: pointer;
  background-color: var(--darkgray1);
}
.panel-close:hover {
  background-color: var(--darkgray1_hover);
}
.panel-close:active {
  background-color: var(--darkgray1_active);
}
.panel-close img {
  width: 15px;
  height: auto;
  object-fit: contain;
}

/* --- title --- */

.title_container {
  display: flex;
  position: absolute;
  justify-items: center;
  align-items: center;
  flex-direction: column;
  top: 15px;
  left: 50%;

  transform: translateX(-50%);
  border-radius: 15px;
  height: auto;
  padding: 10px 20px;
  background-color: var(--darkgray1);
}

.display_title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--darktext1);
}

.display_subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: #f69179;
}

/* --- pages inside the panel --- */

.panel-page {
  display: none;
  height: 100%;
}
.panel-page.is-visible {
  display: block;
}

.panel-page_title {
  display: flex;
  align-items: center;
  justify-content: left;
  width: 100%;
  height: 35px;
  padding-left: 10px;
  color: var(--darktext1);
  font-size: 1.2rem;
}

.information_panel_page {
  padding: 16px;
  height: 100%;
}

/* show only when toggled */
.information_panel_page.is-visible {
  display: block;
}

.information_panel_title {
  display: flex;
  align-items: center;
  justify-content: left;
  width: 100%;
  height: 35px;
  padding-left: 10px;
  color: var(--darktext1);
  font-size: 1.2rem;
}

.panel_scroll_container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow-y: scroll;
  padding-bottom: 20px;
  border-top: 1px solid var(--darkborder1);
}

.panel_scroll_container {
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.panel_scroll_container::-webkit-scrollbar {
  display: none;
}

/* --- Content --- */

.content {
  flex: 1;
  background: var(--darkgray2);
  transition: width 0.3s ease;
}

.main-content-page {
  display: none;
}

.main-content-page.is-visible {
  display: block;
}

/* --- Navigation --- */

.tree {
  list-style: none;
  padding-left: 0;
  padding-top: 10px;
}

.tree li {
  margin-bottom: 6px;
}

.tree-btn {
  all: unset;
  cursor: pointer;
  padding: 6px 10px;
  width: 90%;
  display: flex;
  align-items: center;
  border-radius: 30px;
  color: var(--darktext1);
}
.tree-btn:hover {
  background-color: var(--darkhover1);
}
.tree-btn:active {
  background-color: var(--darkactive1);
}
.tree-btn.is-active {
  background-color: var(--darkactive1);
}

/* Information + details container*/

/* === Sidepanel (right) === */
.information {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 0; /* collapsed state */
  background-color: var(--darkgray2);
  overflow: hidden;
  transition: width 0.3s ease-in-out;
  z-index: 1001;
  border-left: 0px solid rgb(50 50 50);
}

.information:not(.collapsed) {
  width: 400px; /* always 400px wide when open */
  min-width: 400px; /* enforce min width */
}

.information.collapsed {
  width: 0;
}

/* === Details panel (left, next to aside) === */
.information_details {
  position: fixed;
  top: 0;
  right: 400px; /* exactly next to sidebar */
  height: 100%;
  width: 0;
  background-color: rgb(50, 50, 50);
  overflow: hidden;
  transition: width 0.3s ease-in-out;
  z-index: 100; /* behind the sidepanel */
}

/* when open */
.information_details.open {
  width: calc(100% - 400px); /* take up the remaining space */
}

.details-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Close button top-right */
.details-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  border-radius: 50px;
}
.details-close:hover {
  background-color: var(--darkgray1_hover);
}
.details-close:active {
  background-color: var(--darkgray1_active);
}
.details-close img {
  width: 24px;
  height: 24px;
}

/* Top slideshow = 50% */
.details-slideshow {
  flex: 1;
  max-height: 50%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-snap-type: x mandatory;
  background-color: var(--darkgray2);
}
.slideshow-track {
  display: flex;
  height: 100%;
}
.slide {
  flex: 0 0 auto;
  height: 100%;
  margin-right: 10px; /* small gap */
  scroll-snap-align: start;
}
.slide img {
  height: 100%;
  width: auto;
  object-fit: cover;
  border-radius: 6px;
}

/* Bottom info = 50% */
.details-info {
  flex: 1;
  color: var(--darktext1);
  display: flex;
  padding: 50px;
  gap: 20px;
  overflow-y: auto;
}
.info-left {
  flex: 1;
}
.info-center-links {
  flex: 1;
  text-align: left;
}
.info-center-rechts {
  flex: 1;
  text-align: left;
}
.info-right {
  flex: 1;
  text-align: right;
}

/* buildings panel */

#buildings_panel {
}

/* -- MISC -- */

.hidden {
  display: none;
}

@media screen and (max-width: 950px) {
  .information {
    width: 100vw !important;
    height: 0;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    transition: height 0.3s ease-in-out;
    z-index: 1000;
    border-top: 1px solid var(--darkborder1);
  }

  .information:not(.collapsed) {
    height: 70vh;
    max-width: none;
  }

  .information.collapsed {
    transform: none;
  }

  #toggle_menu_buttons {
    display: flex;
  }

  .menu-toggleable {
    display: none;
  }
  #toggle_fullscreen {
    display: none !important;
  }

  /* --- title --- */

  .title_container {
    padding: 5px 20px;
    border-radius: 50px;
  }

  .display_title {
    font-size: 1rem;
  }

  .display_subtitle {
    font-size: 0.8rem;
  }
}
