* {
  border-radius: 2px !important;
  font-family: 'Noto Sans', sans-serif;
}

/* Prevent body scroll on chat page */
body:has(#chat-container) {
  overflow: hidden;
  height: 100vh;
  max-height: 100vh;
}

/* Chat input container adjustments for left nav */
#chat-input-container {
  margin-left: 250px;
}

/* Footer always visible, adjust for chat input */
footer {
  z-index: 50;
  font-size: 0.65rem;
  line-height: 1;
}

body:has(#chat-container) footer {
  bottom: 0;
  margin-left: 250px;
}

@media (max-width: 768px) {
  body:has(#chat-container) footer {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  #chat-input-container {
    margin-left: 0;
  }

  #top-messages-container {
    margin-left: 0 !important;
  }
}

.dropdown-content {
  z-index: 1000 !important;
}

/* Left nav styles */
.left-nav {
  position: fixed;
  left: 0;
  top: 4rem;
  width: 250px;
  height: calc(100vh - 4rem);
  background: var(--fallback-b1, oklch(var(--b1)));
  border-right: 1px solid var(--fallback-bc, oklch(var(--bc) / 0.2));
  z-index: 60;
  transition: transform 0.3s ease;
  transform: translateX(0);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.left-nav-content {
  flex-grow: 1; /* This pushes the footer to the bottom */
  overflow-y: auto;
  overflow-x: hidden;
}

.left-nav-footer {
  flex-shrink: 0; /* Ensures the footer doesn't compress */
}
.left-nav-header,
.left-nav-content {
  overflow-x: hidden;
}

.content-container {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* For pages with forms that need scrolling */
.content-container:not(:has(#chat-container)) {
  overflow-y: auto;
}

/* For chat page that needs fixed height */
.content-container:has(#chat-container) {
  height: calc(100vh - 4rem);
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  padding-top: 0;
}

.content-container:has(#chat-container) > div {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* Constrain chat container to leave space for input */
#chat-container {
  margin-bottom: 100px;
}

@media (max-width: 768px) {
  #chat-container {
    margin-bottom: 170px;
  }
}

/* Dialog container positioning */
.chaos-dialog-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay for mobile */
.left-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 55;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Desktop styles */
@media (min-width: 769px) {
  .left-nav {
    transform: translateX(0) !important;
    /*display: block !important;*/
  }

  .left-nav-overlay {
    display: none !important;
  }

  .content-container {
    margin-left: 250px !important;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .left-nav {
    transform: translateX(-100%);
  }

  .left-nav.active {
    transform: translateX(0);
  }

  .left-nav-overlay.active {
    display: block;
    opacity: 1;
  }

  .content-container {
    margin-left: 0 !important;
  }
}