body {
    position: absolute;
    margin: 0;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 13px;
    line-height: 24px;
    /* overscroll-behavior: none; */
    /* overflow: hidden; */
    width: 100%;
    height: 100%;
    transition: background-color 1s;
    overflow: hidden;
}


/* Set canvas to fill the screen */
#container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

/* UI Panel Styling */
.options-menu {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

/* Hide the phone menu toggler on larger screens */
.phone-menu-toggler {
  display: none;
}

/* Styles for smaller screens (e.g., mobile phones) */
@media (max-width: 768px) {
  .options-menu {
    display: none;
    /* Hide menu by default on phone */
  }

  .options-menu-visible {
    display: block;
    /* Show it when this class is added */
  }

  .phone-menu-toggler {
    display: block;
    /* Show the toggle button */
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 20;
  }
}


.analysis-panel {
  max-width: 800px;
  margin: 1rem auto;
  font-family: "Segoe UI", sans-serif;
}

.category-table,
.elements-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.category-table th,
.category-table td,
.elements-table th,
.elements-table td {
  border: 1px solid #ccc;
  padding: 0.4rem 0.6rem;
  text-align: left;
  font-size: 0.875rem;
}

.elements-table-container {
  max-height: 300px;
  overflow-y: auto;
}

.elements-table th {
  background-color: #f5f5f5;
  position: sticky;
  top: 0;
  z-index: 1;
}

bim-panel-section label {
  font-weight: 600;
}

.category-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.category-checkbox label {
  margin-left: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}



:root {
  /* --primary-color: #3498db; */
  --primary-color: #00B2D4;
  --bg-color: #1e1e1ee7;
  /* --bg-color: #1B4150; */
  --text-color: #f0f0f0;
  --panel-width: 333px;
}

/* Loader */
#custom-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  transition: opacity 0.3s;
  font-size: 16px;
}

#custom-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Panel */
#ui-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  /* height: 450px; */
  height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  border-bottom-left-radius: 18px;
}

#ui-panel.collapsed {
  transform: translateX(100%);
}

#ui-main{
  display: flex;
  flex: 1;
  flex-direction: column;
  /* justify-content: space-between; */
  overflow: hidden;
}

.ui-main-header,
.ui-main-footer{
  flex: 0 0 auto;
}

.tab-content{
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Toggle Button */
#ui-toggle {
  position: absolute;
  left: -40px;
  top: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg-color);
  border: none;
  border-radius: 8px 0 0 8px;
  color: white;
  cursor: pointer;
  font-size: 20px;
  box-shadow: -5px 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

#ui-toggle:hover {
  color: var(--primary-color);
}

/* Content & Tabs */
.ui-header {
  padding: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  border-bottom: 1px solid #787878;
  background: rgba(0, 0, 0, 0.2);
}

.ui-content {
  flex: 1;
  overflow-y: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #787878;
  margin-bottom: 15px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-size: 1rem;
}

.tab-btn:hover {
  color: #ccc;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Controls */
.btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #6b6b6b;
}

.btn-secondary:hover {
  background: #8b8b8b;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #2a2a2a;
  padding: 10px;
  border-radius: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-item input {
  /* accent-color: var(--primary-color); */
  width: 16px;
  height: 16px;
}

.scroll-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #787878;
  padding: 5px;
  border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

#btn-export {
  margin-bottom: 9px;
}

.d-none {
  display: none !important;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 16px;
}

.modal-content > p {
  text-align: center;
}

.modal-content h3 { margin-top: 0; margin-bottom: 20px; border-bottom: 1px solid #444; padding-bottom: 10px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-control {
  width: 100%; padding: 10px; border-radius: 5px; border: 1px solid #444;
  background: #2a2a2a; color: white; font-size: 1rem; box-sizing: border-box;
}
.form-control:focus { outline: none; border-color: var(--primary-color); }
.modal-actions { display: flex; gap: 10px; margin-top: 25px; }
.modal-actions .btn { flex: 1; }




/* Entity List Wrapper Styles (Ported) */
/* .entityListWrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 100%;
  overflow: hidden;
}

.entityListLabel {
  font-weight: bold;
  margin-top: 10px;
  border-bottom: 1px solid #444;
  padding-bottom: 2px;
}

.entityList {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #333;
  padding: 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.2);
}

.entityListWrapperHeader {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
} 
  
.selectedClass {
  color: var(--primary-color);
  font-weight: bold;
} */


#filterBox {
  margin: 10px 0;
}

/* .entityListContainer {
  max-height: 300px;
  padding: 9px;
  border: inset;
  overflow: hidden;
  transition: max-height 0.28s ease;
  width: 95%;
  border-radius: 9px;
  margin: auto;
  margin-bottom: 18px;
  color: #1e1e1e;
}

.entityListWrapper {
  height: 200px;
  overflow-y: auto;
  border: 1px solid #ccc;
  padding: 8px;
  background-color: #f9f9f9;
} */

.entityListContainer {
  min-height: 0;
  /* padding: 9px; */
  border: inset;
  overflow: hidden;
  box-sizing: border-box;
  flex: 1;
  width: 100%;
  border-radius: 9px;
  margin: auto;
  margin-bottom: 18px;
  color: #1e1e1e;
}

/* Scroll area */
.entityListWrapper {
  height: 100%;
  overflow-y: auto;
  padding: 8px;
  box-sizing: border-box;
  background-color: #f9f9f9;
}

.filterZone>label {
  display: block;
  margin-bottom: 4px;
}

.filter_radio-options {
  display: flex;
  /* margin-bottom: 18px; */
  column-gap: 18px;
  justify-content: center;
  align-items: center;
}

.entityList {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  row-gap: 3px;
}

.entityListWrapperHeader {
  display: flex;
  justify-content: space-evenly;
  margin-bottom: 9px;
}

#filterLoader {
  position: absolute;
  top: 57%;
  left: 48%;
}

#ifcSchemaLabel {
  display: none;
  background-color: #00B2D4C9;
  padding: 3px;
  color: white;
  border-radius: 5px;
  /* margin-left: 9px; */
}

.selectedClass {
  width: 100%;
  background-color: antiquewhite;
  text-align: left;
}

.filteringOptions {
  display: flex;
  flex-direction: column;
}

.entityListLabel, 
.entityListLabelHeader {
  display: flex;
  background-color: #7fffd438;
  font-weight: 600;
  padding: 3px;
  /* justify-content: center; */
  margin-top: 9px;
  margin-bottom: 9px;
}

.entityListLabelHeader{
  background-color: #607D8B;
  justify-content: center;
  color: white;
}

/* ------------------------ */

#polyCountPanel {
  background-color: black;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid #444;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  margin-bottom: 10px;
}

.polyCountPanel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #bbb;
}

.polyCountPanel-item label:last-child {
  font-weight: 600;
  color: #fff;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
}