/* layout.css — Chrome, Explorer Shell, Grid systems, and Sidebar Navigation layouts */

.vox-chrome {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.vox-tabbar {
  display: flex;
  align-items: stretch;
  height: var(--header-h);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vox-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  background: var(--surface-elevated);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

.vox-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
}

.vox-tab {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.vox-tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.vox-tab.active {
  color: var(--text);
  background: var(--surface-elevated);
  position: relative;
}

.vox-tab.active::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--text);
}

.vox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  margin-left: auto;
  border-left: 1px solid var(--line);
}

.vox-explorer {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--header-h) - 28px);
}

.vox-sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 0;
  flex-shrink: 0;
  overflow-y: auto;
  height: 100%;
}

.vox-sidebar h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0 20px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vox-nav-item {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0 20px;
  min-height: var(--touch-target);
  color: var(--muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.vox-nav-item:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.vox-nav-item.active {
  color: var(--text);
  background: var(--surface-elevated);
  border-left-color: var(--text);
}

.vox-main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  height: 100%;
  background: var(--bg);
}

.component-section {
  display: none !important;
  animation: vox-fade-in 0.18s var(--ease);
}

.component-section.active {
  display: block !important;
}

@keyframes vox-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sidebar search */
.vox-sidebar-search {
  padding: 0 20px 14px;
}

.vox-sidebar-search input {
  width: 100%;
  min-height: var(--touch-target);
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.vox-sidebar-search input::placeholder {
  color: var(--muted);
}

.vox-sidebar-search input:focus {
  border-color: var(--muted);
  outline: none;
}

.vox-nav-item.hidden {
  display: none;
}

/* Mobile detail chrome */
.vox-mobile-back {
  display: none;
  align-items: center;
  gap: 8px;
  margin: -8px 0 20px;
  padding: 8px 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.vox-mobile-back:hover {
  color: var(--text);
}

/* Layout boxes, grids, chart container wrapper */
.vox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.vox-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.vox-hbox {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.vox-vbox {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vox-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.vox-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.vox-splitter {
  display: flex;
  height: 200px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.vox-splitter-panel {
  flex: 1;
  padding: 20px;
  background: var(--surface);
  overflow: auto;
}

.vox-splitter-handle {
  width: 6px;
  background: var(--line);
  cursor: col-resize;
  transition: background 0.15s;
}

.vox-splitter-handle:hover {
  background: var(--muted);
}

@media (max-width: 768px) {
  .vox-tabbar {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-h);
  }
  .vox-tabs {
    flex: 1 1 100%;
    order: 3;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    height: 40px;
  }
  .vox-tab {
    height: 40px;
  }
  .vox-actions {
    flex: 1;
    justify-content: flex-end;
  }
  
  .vox-explorer {
    flex-direction: row;
    overflow: hidden;
    height: calc(100vh - var(--header-h) - 28px);
  }
  .vox-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: none;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.2s var(--ease);
  }
  .vox-sidebar.mobile-hidden {
    display: none;
  }
  .vox-main {
    width: 100%;
    padding: 24px 20px;
    height: 100%;
    overflow-y: auto;
    display: none;
  }
  .vox-main.mobile-active {
    display: block;
  }
  .vox-mobile-back {
    display: inline-flex;
  }
}

@media (min-width: 769px) {
  .vox-sidebar.mobile-hidden {
    display: block !important;
  }
  .vox-main {
    display: block;
  }
}

@media (max-width: 480px) {
  .vox-grid {
    grid-template-columns: 1fr;
  }
}
