/* ========================================================================
   HOSTINGJET / HALO 0.28.85 — TIGHT PERSISTENT SIDEBAR REFINEMENT
   Final layer over v0.28.84. Keeps the sidebar permanently open while
   reducing width/vertical density and ensuring the footer stays inside the
   usable viewport at common laptop heights.
   ======================================================================== */

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell,
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell.is-sidebar-collapsed,
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell.hj-sidebar-open {
  --halo-sidebar-width: 252px !important;
  grid-template-columns: var(--halo-sidebar-width) minmax(0,1fr) !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar {
  width: var(--halo-sidebar-width) !important;
  min-width: var(--halo-sidebar-width) !important;
  max-width: var(--halo-sidebar-width) !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100dvh !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Smaller, calmer brand zone. */
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-brand-row {
  min-height: 58px !important;
  height: 58px !important;
  padding: 13px 18px 12px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-panel-brand {
  gap: 8px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-panel-brand-mark {
  width: 23px !important;
  height: 25px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-panel-brand-word {
  width: 70px !important;
  height: 18px !important;
}

/* Navigation now fits normal laptop heights without feeling loose. */
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav {
  min-height: 0 !important;
  padding: 10px 11px 8px !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: transparent transparent !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav:hover {
  scrollbar-color: #dfe0e6 transparent !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav::-webkit-scrollbar {
  width: 5px !important;
}
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav::-webkit-scrollbar-track {
  background: transparent !important;
}
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav::-webkit-scrollbar-thumb {
  background: transparent !important;
  border-radius: 99px !important;
}
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav:hover::-webkit-scrollbar-thumb {
  background: #dfe0e6 !important;
}
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: #cfd0d8 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-group {
  padding-bottom: 8px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-group + .hj-nav-group {
  margin-top: 4px !important;
  padding-top: 9px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-group-items {
  gap: 1px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-section-toggle {
  min-height: 23px !important;
  margin: 0 0 2px !important;
  padding: 3px 8px 5px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: .055em !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-section-toggle svg {
  width: 11px !important;
  height: 11px !important;
}

/* Compact rows: smaller without becoming dense or hard to scan. */
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a {
  min-height: 36px !important;
  padding: 7px 8px !important;
  gap: 11px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav .hj-nav-icon {
  width: 16.5px !important;
  height: 16.5px !important;
  flex: 0 0 16.5px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav .hj-nav-icon svg {
  width: 16.5px !important;
  height: 16.5px !important;
  stroke-width: 1.75 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav .hj-nav-label {
  max-width: 174px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a.is-active,
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a.is-active .hj-nav-label {
  font-weight: 600 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a.is-active::before {
  left: -4px !important;
  top: 25% !important;
  bottom: 25% !important;
  width: 2.5px !important;
}

/* Mail row follows the tighter rhythm. */
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-mail-item {
  grid-template-columns: minmax(0,1fr) 29px !important;
  column-gap: 1px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-mail-nav-more {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-mail-nav-more svg {
  width: 14px !important;
  height: 14px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-mail-nav-count {
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  font-size: 10px !important;
}

/* Footer is explicitly kept inside the viewport and no longer feels oversized. */
body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-footer {
  flex: 0 0 auto !important;
  padding: 7px 10px 9px !important;
  box-sizing: border-box !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-account {
  min-height: 44px !important;
  padding: 6px 8px !important;
  grid-template-columns: 31px minmax(0,1fr) 12px !important;
  gap: 10px !important;
  border-radius: 11px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-avatar {
  width: 31px !important;
  height: 31px !important;
  box-shadow: 0 0 0 2px var(--hj-sb-accent-soft) !important;
  font-size: 11px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-account-copy {
  gap: 1px !important;
  max-width: 154px !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-account-copy strong {
  font-size: 12.2px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-account-copy small {
  font-size: 10.2px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-account-caret {
  font-size: 11px !important;
}

/* A bit more breathing room is returned to the main product area. */
@media (max-width: 1100px) and (min-width: 681px) {
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell,
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell.is-sidebar-collapsed,
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell.hj-sidebar-open {
    --halo-sidebar-width: 228px !important;
    grid-template-columns: var(--halo-sidebar-width) minmax(0,1fr) !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar {
    width: var(--halo-sidebar-width) !important;
    min-width: var(--halo-sidebar-width) !important;
    max-width: var(--halo-sidebar-width) !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a,
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav .hj-nav-label {
    font-size: 12.7px !important;
  }
}

/* Keep the permanent phone rail from v0.28.84, but tighten it slightly. */
@media (max-width: 680px) {
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell,
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell.is-sidebar-collapsed,
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell.hj-sidebar-open {
    --halo-sidebar-width: 68px !important;
    grid-template-columns: 68px minmax(0,1fr) !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-brand-row {
    min-height: 56px !important;
    height: 56px !important;
    padding: 12px 0 !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-panel-brand-mark {
    width: 23px !important;
    height: 25px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav {
    padding: 8px 7px 6px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a {
    min-height: 36px !important;
    padding: 7px 0 !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-footer {
    padding: 6px 7px 8px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-account {
    min-height: 42px !important;
    padding: 5px 0 !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-avatar {
    width: 30px !important;
    height: 30px !important;
  }
}

/* Extra height compaction for shorter laptop/browser viewports. */
@media (max-height: 760px) and (min-width: 681px) {
  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-brand-row {
    min-height: 54px !important;
    height: 54px !important;
    padding-top: 11px !important;
    padding-bottom: 10px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav {
    padding-top: 7px !important;
    padding-bottom: 5px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-sidebar-nav a {
    min-height: 34px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-group {
    padding-bottom: 6px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-group + .hj-nav-group {
    margin-top: 3px !important;
    padding-top: 7px !important;
  }

  body .hj-experience-v27.hj-enterprise-v2.hj-halo-shell .hj-nav-section-toggle {
    min-height: 21px !important;
    padding-top: 2px !important;
    padding-bottom: 4px !important;
  }
}
