/* ============================================================
   Bluebell Design System — layout.css
   Shell, sidebar, navigation, and responsive layout styles.
   Uses --bb-* custom properties defined in theme.css.
   ============================================================ */

/* ----------------------------------------------------------
   Shell
   ---------------------------------------------------------- */

.bb-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.bb-content {
  flex: 1;
  overflow-y: auto;
  background: var(--bb-bg);
}

/* ----------------------------------------------------------
   Sidebar (240 px full)
   ---------------------------------------------------------- */

.bb-sidebar {
  width: 240px;
  flex-shrink: 0;
  height: 100%;
  background: var(--bb-sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  overflow-y: auto;
}

.bb-sidebar-top {
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-sidebar-logo {
  height: 20px;
  object-fit: contain;
}

.bb-sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: #137fec;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bb-sidebar-gap {
  height: 16px;
}

.bb-sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0;
}

.bb-nav-section-label {
  padding: 6px 20px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

/* ----------------------------------------------------------
   Nav Items
   ---------------------------------------------------------- */

.bb-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-family: Inter, sans-serif;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-left: 2px solid transparent;
}

.bb-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.bb-nav-item.active {
  background: none;
  color: #fff;
  font-weight: 700;
  border-left-color: transparent;
}

.bb-nav-item .material-symbols-outlined {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

/* ----------------------------------------------------------
   Sidebar Collapsed (64 px)
   ---------------------------------------------------------- */

.bb-sidebar-collapsed {
  width: 64px;
  overflow: hidden;
}

.bb-sidebar-collapsed .bb-nav-item {
  width: 40px;
  height: 40px;
  padding: 10px 0;
  justify-content: center;
  margin: 0 auto;
  border-left: none;
}

.bb-sidebar-collapsed .bb-nav-item .bb-nav-label {
  display: none;
}

.bb-sidebar-collapsed .bb-sidebar-top {
  justify-content: center;
}

.bb-sidebar-collapsed .bb-sidebar-logo,
.bb-sidebar-collapsed .bb-sidebar-avatar {
  display: none;
}

.bb-sidebar-collapsed .bb-nav-section-label,
.bb-sidebar-collapsed .bb-project-picker .bb-picker-text,
.bb-sidebar-collapsed .bb-project-picker .material-symbols-outlined:last-child {
  display: none;
}

.bb-sidebar-collapsed .bb-sidebar-footer {
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
  align-items: center;
}

.bb-sidebar-collapsed .bb-sidebar-divider {
  margin: 0 12px;
}

/* ----------------------------------------------------------
   Top Nav Bar
   ---------------------------------------------------------- */

.bb-topnav {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  gap: 4px;
  background: var(--bb-sidebar-bg);
  border-bottom: 1px solid var(--bb-border);
  flex-shrink: 0;
}

.bb-topnav-left {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 220px;
}

.bb-topnav-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  color: var(--bb-sidebar-text);
  font-family: var(--bb-font-body);
  font-size: 12px;
}

.bb-topnav-picker .material-symbols-outlined {
  font-size: 14px;
  color: var(--bb-sidebar-muted);
}

.bb-topnav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.bb-topnav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  color: rgba(255,255,255,0.75);
  font-family: var(--bb-font-body);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.bb-topnav-item .material-symbols-outlined {
  font-size: 16px;
}

.bb-topnav-item.active {
  color: #ffffff;
  font-weight: 500;
  background: rgba(255,255,255,0.08);
  border-bottom: 2px solid var(--bb-accent-light, #75affa);
}

.bb-topnav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 220px;
}

.bb-topnav-icon {
  font-size: 16px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
}

.bb-topnav-icon:hover {
  color: rgba(255,255,255,0.7);
}

/* Shell in top-nav mode: vertical layout */
.bb-shell.bb-layout-topnav {
  flex-direction: column;
}

.bb-shell.bb-layout-topnav .bb-sidebar {
  display: none;
}

.bb-shell.bb-layout-topnav .bb-topnav {
  display: flex;
}

/* ----------------------------------------------------------
   Project Picker
   ---------------------------------------------------------- */

.bb-project-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--bb-sidebar-text);
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.bb-project-picker:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bb-project-picker .icon {
  color: var(--bb-sidebar-muted);
  font-size: 14px;
}

.bb-project-picker .chevron {
  margin-left: auto;
  color: var(--bb-sidebar-muted);
  font-size: 14px;
}

.bb-picker-dropdown {
  position: fixed;
  left: 12px;
  top: auto;
  width: 216px;
  background: var(--bb-surface);
  border: 1px solid var(--bb-border);
  border-radius: 8px;
  overflow: hidden;
  z-index: 200;
  box-shadow: var(--bb-shadow-lg);
}

.bb-sidebar-collapsed .bb-picker-dropdown {
  left: 68px;
}

.bb-picker-option {
  padding: 10px 16px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: var(--bb-text);
  cursor: pointer;
  transition: background 0.1s;
}

.bb-picker-option:hover {
  background: var(--bb-hover);
}

.bb-picker-option-active {
  color: var(--bb-text);
  font-weight: 500;
  background: var(--bb-hover);
}

/* ----------------------------------------------------------
   Sidebar Footer
   ---------------------------------------------------------- */

.bb-sidebar-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
}

.bb-footer-icon {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: color 0.15s;
}

.bb-footer-icon:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* (old topnav CSS removed — consolidated above) */

/* ----------------------------------------------------------
   Mobile Header
   ---------------------------------------------------------- */

.bb-mobile-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bb-sidebar-bg);
}

.bb-mobile-header .title {
  color: white;
  font-family: Raleway, sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.bb-mobile-header .icon {
  color: rgba(255, 255, 255, 0.5);
}

/* ----------------------------------------------------------
   Menu Overlay
   ---------------------------------------------------------- */

.bb-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bb-menu-overlay-blue {
  background: #2D619E;
}

.bb-menu-overlay-black {
  background: #0a0c10;
}

.bb-menu-overlay-header {
  width: 100%;
  height: 48px;
  display: flex;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}

.bb-menu-overlay-nav {
  display: flex;
  flex-direction: column;
  width: 280px;
}

.bb-menu-overlay-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-family: Inter, sans-serif;
  font-size: 18px;
  color: white;
}

.bb-menu-overlay-item.active {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-weight: 600;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 768px) {
  .bb-sidebar {
    display: none;
  }

  .bb-content {
    padding: 16px;
  }
}

@media (max-width: 1024px) {
  .bb-content {
    padding: 20px 16px;
  }
}
