/*
 * TI Hub shared cross-panel bar.
 * Self-contained and namespaced under .ti-hub-bar so it can't leak into,
 * or be overridden by, whatever CSS framework the host page already uses
 * (Bootstrap, Tailwind, hand-rolled, or none at all).
 *
 * Integration note: add `padding-top: 46px` (or a wrapper margin of the
 * same height) to the host page's body/main content area, since this bar
 * is `position: fixed` and does not push content down on its own.
 *
 * The panel switcher is a native <details>/<summary> element — no JS
 * required, works identically across all four codebases.
 */

.ti-hub-bar,
.ti-hub-bar * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ti-hub-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #0d1117;
  border-bottom: 1px solid #21262d;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
}

.ti-hub-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  margin-right: 2px;
  border-radius: 6px;
  color: #e6edf3;
  text-decoration: none;
  font-weight: 600;
}

.ti-hub-brand:hover {
  background: #161b22;
}

.ti-hub-brand svg.ti-hub-mark {
  flex-shrink: 0;
}

.ti-hub-sep {
  color: #30363d;
  margin-right: 8px;
}

.ti-hub-switcher {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ti-hub-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: #e6edf3;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 500;
}

.ti-hub-trigger::-webkit-details-marker {
  display: none;
}

.ti-hub-trigger:hover {
  background: #161b22;
}

.ti-hub-chevron {
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.ti-hub-switcher[open] .ti-hub-chevron {
  transform: rotate(180deg);
}

.ti-hub-switcher[open] .ti-hub-trigger {
  background: #161b22;
}

.ti-hub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 6px;
}

.ti-hub-menu-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6e7681;
}

.ti-hub-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #c9d1d9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.ti-hub-menu-item:hover {
  background: #21262d;
  color: #e6edf3;
}

.ti-hub-menu-item.is-current {
  color: #e6edf3;
}

.ti-hub-menu-item .ti-hub-current-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #388bfd;
  flex-shrink: 0;
}
