/**
 * Hub sidebar — узкий постоянный rail (52px).
 * Иконки на месте, подписи — tooltip справа по hover на пункт.
 * Не затирается sync-handoff-full.mjs.
 */
:root {
  --catalog-sidebar-w-collapsed: 52px;
  --hub-sidebar-w-collapsed: 52px;
}

body.hub-sidebar-rail .catalog-sidebar,
body.hub-sidebar-rail aside.hub-sidebar-aside.catalog-sidebar,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar {
  width: var(--catalog-sidebar-w-collapsed) !important;
  min-width: var(--catalog-sidebar-w-collapsed) !important;
  max-width: var(--catalog-sidebar-w-collapsed) !important;
  padding: 10px 6px 12px !important;
  overflow: visible !important;
  transition: none !important;
}

body.hub-sidebar-rail .catalog-sidebar:hover,
body.hub-sidebar-rail .catalog-sidebar:focus-within,
body.hub-sidebar-rail aside.hub-sidebar-aside.catalog-sidebar:hover,
body.hub-sidebar-rail aside.hub-sidebar-aside.catalog-sidebar:focus-within,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar:hover,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar:focus-within {
  width: var(--catalog-sidebar-w-collapsed) !important;
  padding-inline: 6px !important;
}

body.hub-sidebar-rail .catalog-sidebar__head,
body.hub-sidebar-rail .catalog-sidebar__toggle,
body.hub-sidebar-rail .catalog-sidebar__theme,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__head,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__toggle {
  display: none !important;
}

body.hub-sidebar-rail .catalog-sidebar__nav,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__nav {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  flex: 1;
  padding-top: 4px;
  gap: 4px;
  overflow: visible;
}

body.hub-sidebar-rail .catalog-sidebar__bottom,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__bottom {
  padding-top: 8px;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.hub-sidebar-rail .catalog-sidebar__link,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__link {
  position: relative;
  width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0 !important;
  margin-inline: auto;
  justify-content: center !important;
  gap: 0 !important;
  border-radius: 10px;
  overflow: visible;
}

body.hub-sidebar-rail .catalog-sidebar__link.is-active,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__link.is-active {
  background: rgba(0, 210, 255, 0.12);
}

body.hub-sidebar-rail .catalog-sidebar__link:hover,
body.hub-sidebar-rail .catalog-sidebar__link:focus-visible,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__link:hover,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__link:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

body.hub-sidebar-rail .catalog-sidebar__icon,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__icon {
  width: 20px !important;
  height: 20px !important;
}

body.hub-sidebar-rail .catalog-sidebar__icon svg,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__icon svg {
  width: 18px !important;
  height: 18px !important;
}

body.hub-sidebar-rail .catalog-sidebar__label,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  flex: none;
  min-width: 0;
  max-width: none;
  width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(12, 18, 32, 0.96);
  border: 1px solid rgba(0, 210, 255, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  z-index: 200;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}

body.hub-sidebar-rail .catalog-sidebar:hover .catalog-sidebar__label,
body.hub-sidebar-rail .catalog-sidebar:focus-within .catalog-sidebar__label,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar:hover .catalog-sidebar__label,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar:focus-within .catalog-sidebar__label {
  max-width: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body.hub-sidebar-rail .catalog-sidebar__link:hover .catalog-sidebar__label,
body.hub-sidebar-rail .catalog-sidebar__link:focus-visible .catalog-sidebar__label,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__link:hover .catalog-sidebar__label,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__link:focus-visible .catalog-sidebar__label {
  opacity: 1 !important;
  visibility: visible !important;
}

body.hub-sidebar-rail .catalog-sidebar__badge,
html.catalog-handoff-active .hub-handoff-root .catalog-sidebar__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  margin-left: 0;
  min-width: 14px;
  height: 14px;
  font-size: 0.55rem;
  line-height: 14px;
}

html.catalog-theme-biz body.hub-sidebar-rail .catalog-sidebar__label,
html.catalog-theme-biz.catalog-handoff-active .hub-handoff-root .catalog-sidebar__label {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}
