/* Desktop sidebar grip. Independent from the mobile menu button. */
.lpc-sidebar-grip {
  display: none;
}

@media (min-width: 1025px) {
  body.lpc-product-clean :where(.sidebar, #sidebarNav) {
    transition: width 180ms ease, padding 180ms ease, border-color 180ms ease !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) {
    width: 68px !important;
    min-width: 68px !important;
    flex-basis: 68px !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
    overflow-x: hidden !important;
    border-right-color: #e5e7eb !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) > * {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .logo.sidebar-profile-host {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .sidebar-profile-cluster {
    width: 44px !important;
    padding: 4px !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .sidebar-profile-cluster :where(.user-chip, .user-profile, .profile-menu) {
    width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .sidebar-profile-cluster :where(.user-chip, .user-profile) > div:not(.profile-dropdown),
  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .lpc-sidebar-nav-label,
  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .lpc-sidebar-section-label,
  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .case-nav-caret,
  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .case-nav-dropdown,
  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .sidebar-footer {
    display: none !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) nav {
    align-items: center !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) nav :where(a, button) {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 42px !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 10px !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .sidebar-nav-icon {
    width: 20px !important;
    height: 20px !important;
    flex-basis: 20px !important;
  }

  body.lpc-product-clean.nav-collapsed :where(.sidebar, #sidebarNav) .sidebar-bottom {
    display: none !important;
  }

  body.lpc-product-clean .sidebar-toggle {
    display: none !important;
  }

  body.lpc-product-clean .lpc-sidebar-grip {
    position: fixed;
    top: 50%;
    left: var(--lpc-sidebar-grip-left, 242px);
    z-index: 2200;
    width: 28px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    color: #53627a;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
    transition: left 180ms ease;
  }

  body.lpc-product-clean .lpc-sidebar-grip__line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 28px;
    flex: none;
    display: block;
    background: #8792a8;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    transition: width 180ms ease, height 180ms ease, background 180ms ease;
  }

  body.lpc-product-clean .lpc-sidebar-grip__label {
    position: absolute;
    top: 50%;
    right: calc(100% + 5px);
    display: block;
    padding: 5px 7px;
    color: #53627a;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.72rem;
    font-weight: 300;
    line-height: 1;
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(6px, -50%);
    transition: max-width 220ms ease, opacity 160ms ease, transform 220ms ease;
  }

  body.lpc-product-clean .lpc-sidebar-grip:hover .lpc-sidebar-grip__line,
  body.lpc-product-clean .lpc-sidebar-grip:focus-visible .lpc-sidebar-grip__line {
    width: 4px;
    height: 36px;
    background: #53627a;
    box-shadow: none;
  }

  body.lpc-product-clean .lpc-sidebar-grip:hover .lpc-sidebar-grip__label,
  body.lpc-product-clean .lpc-sidebar-grip:focus-visible .lpc-sidebar-grip__label {
    max-width: 72px;
    opacity: 1;
    transform: translate(0, -50%);
  }

  body.lpc-product-clean .lpc-sidebar-grip:focus-visible {
    outline: none;
  }
}
