/* wbmain/static/wbmain/css/main.css */

/* Base styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto; /* Changed from hidden to auto */
}

/* Navigation styles for home page */
.container-homepage {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Add responsive padding for content */
.content-padding {
  padding: 1rem;
}

/* Fix for React navigation */
#react-nav-root nav {
  display: block !important;
}

/* Forge Viewer styles */
#forgeViewer {
  width: 100% !important;
  height: 100% !important;
}

.adsk-viewing-viewer {
  height: 100% !important;
  width: 100% !important;
}

/* Hierarchy Tree Styles */
#hierarchyTree li {
  cursor: pointer;
  margin-bottom: 4px;
  padding: 4px;
}

#hierarchyTree li.selected {
  background-color: #e0f7fa;
  font-weight: bold;
}

/* Properties Table Styles */
#propertiesContent table {
  width: 100%;
  border: 1px solid #ccc;
}

#propertiesContent th,
#propertiesContent td {
  padding: 4px;
  border: 1px solid #ccc;
  text-align: left;
}

.text-blue-500 {
  color: #3b82f6;
}

/* Left Panel styles */
#left-panel {
  background-color: #f3f4f6;
  transition: width 0.2s;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#left-panel.hidden {
  display: none;
}

#left-panel .overflow-x-auto {
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* Splitter styles */
.splitter-handle {
  width: 8px;
  background-color: #e5e7eb;
  cursor: col-resize;
  transition: background-color 0.2s;
  z-index: 2;
}

.splitter-handle:hover {
  background-color: #93c5fd;
}

/* Object Tree Styles */
.text-span {
  border: 1px solid transparent;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 1px 0;
  display: inline-block;
  transition: all 0.2s;
}

.text-span.selected {
  background-color: #3b82f6;
  color: white;
  border-color: #2563eb;
}

.text-span:hover {
  background-color: #93c5fd;
  border-color: #60a5fa;
}

#objectTree {
  min-width: min-content;
  padding-bottom: 1rem;
}

#objectTree li {
  margin: 2px 0;
}

#objectTree ul {
  margin-left: 12px;
}

.toggle-icon {
  display: inline-block;
  width: 16px;
  text-align: center;
  margin-right: 2px;
  cursor: pointer;
  line-height: 1;
}

/* Toggle button styles */
#toggle-button {
  width: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-right: 1px solid #e5e7eb;
  background-color: #f3f4f6;
  transition: background-color 0.2s;
  z-index: 2;
}

#toggle-button:hover {
  background-color: #e5e7eb;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 50;
  padding-top: 4rem;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: white;
  margin: 1.25rem auto;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  width: 80%;
  max-height: 80vh;
  overflow-y: auto;
}

.close-modal {
  float: right;
  font-size: 1.75rem;
  font-weight: bold;
  cursor: pointer;
  color: #6b7280;
}

.close-modal:hover {
  color: #111827;
}

#treeCountDisplay {
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

#treeCountDisplay.hidden {
  display: none;
}

#itemCount {
  font-weight: 600;
  color: #2563eb;
}


#left-panel button {
  transition: all 0.2s ease-in-out;
}

/* Tab styles */
#webTab, #dbTab {
  transition: all 0.2s ease-in-out;
  position: relative;
}

#webTab.active, #dbTab.active {
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
}

/* Content area styles */
#webContent, #dbContent {
  height: calc(100% - 40px); /* Account for tab height */
  overflow-y: auto;
}

.db-tree .text-span,
#objectTree .text-span {
    border: 1px solid transparent;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 1px 0;
    display: inline-block;
    transition: all 0.2s;
}

.db-tree .text-span.selected,
#objectTree .text-span.selected {
    background-color: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.db-tree .text-span:hover,
#objectTree .text-span:hover {
    background-color: #93c5fd;
    border-color: #60a5fa;
}

.db-tree ul,
#objectTree ul {
    margin-left: 12px;
}

/* Tree item containers */
.flex.items-center.my-1 {
  white-space: nowrap;
  display: flex;
  align-items: flex-start;
}

.flex.items-center.my-1 .toggle-icon {
  margin-top: 3px;
}

/* Add these new styles */
.tab-content {
  height: calc(100% - 40px);
  overflow-y: auto;
}

/* Hide tab content by default */
#webContent.hidden,
#dbContent.hidden {
    display: none !important;
}

/* Tab buttons */
.tab-button {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.tab-button.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}