/* Menu laterale GeQo - HOVER FIX V9 - nessun override --menu-hover */

:root {
  --menu-background: #f8fafc;
  --menu-surface: #ffffff;
  --menu-text: #273444;
  --menu-border: #e1e7ee;
  --menu-expanded: #f0f5fa;
  --menu-selected: #e8f2fc;
  --menu-selected-border: #cfe1f5;
  --menu-primary: #1976d2;
  --menu-radius: 10px;
  --menu-row-height: 42px;
}

/* Sidebar */
#westViewPortId {
  background: var(--menu-background);
  border-right: 1px solid var(--menu-border) !important;
  box-shadow: 3px 0 14px rgb(30 60 90 / 8%);
}

#westViewPortId_header {
  background: var(--menu-surface) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--menu-border) !important;
  box-shadow: none !important;
}

#westViewPortId-body {
  background: var(--menu-background) !important;
  border: 0 !important;
}

#westViewPortId .menu-logo {
  max-width: calc(100% - 24px);
  object-fit: contain;
  margin: 6px 12px 8px !important;
}

/* Treelist */
#Menu.x-treelist {
  min-width: 0;
  padding: 4px 6px 14px;
  overflow-x: hidden !important;
  border: 0 !important;
  background: transparent !important;
  box-sizing: border-box;
}

#Menu .x-treelist-item {
  border: 0 !important;
}

#Menu .x-treelist-item-expanded {
  background: transparent;
}

#Menu .x-treelist-row {
  position: relative;
  min-height: var(--menu-row-height);
  margin: 2px 0;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--menu-radius);
  background: transparent;
  box-sizing: border-box;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}

#Menu .x-treelist-item-wrap {
  min-height: calc(var(--menu-row-height) - 2px);
}

#Menu .x-treelist-item-text {
  min-width: 0;
  margin-left: 40px;
  margin-right: 34px;
  color: var(--menu-text);
  font-size: 13px;
  font-weight: 500;
  line-height: calc(var(--menu-row-height) - 2px);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#Menu .x-treelist-item-icon {
  width: 24px;
  font-size: 17px;
  text-align: center;
}

#Menu .x-treelist-item-icon,
#Menu .x-treelist-item-icon::before,
#Menu .x-treelist-item-expander,
#Menu .x-treelist-item-expander::after {
  line-height: calc(var(--menu-row-height) - 2px);
}

#Menu .x-treelist-item-expander {
  right: 0;
  width: 28px;
  color: #8996a3;
}

#Menu .x-treelist-item-expander::after {
  font-size: 12px;
}

/* La gerarchia usa il rientro nativo di Ext JS, senza sommarne altri. */
#Menu .x-treelist-container,
#Menu .x-treelist-item-expanded > .x-treelist-container {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Sezione aperta */
#Menu .x-treelist-item-expanded > .x-treelist-row {
  background: var(--menu-expanded);
}

#Menu .x-treelist-item-expanded > .x-treelist-row .x-treelist-item-text {
  font-weight: 600;
}

/* Percorso o voce selezionata */
#Menu .x-treelist-item-selected > .x-treelist-row {
  /* background: var(--menu-selected) !important; */
  border-color: var(--menu-selected-border);
  box-shadow: none;
}

#Menu .x-treelist-item-selected > .x-treelist-row::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -1px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--menu-primary);
}

#Menu .x-treelist-item-selected > .x-treelist-row .x-treelist-item-text {
  font-weight: 600;
}

/* Hover */
#Menu .x-treelist-row-over {
  opacity: 0.9;
  box-shadow: 0 2px 8px rgb(25 118 210 / 8%);
  transform: translateX(2px);
}

#Menu .x-treelist-row-over .x-treelist-item-icon {
  transform: scale(1.06);
}

/* Menu compatto */
#Menu .x-treelist-toolstrip {
  background: var(--menu-surface);
  border-right: 1px solid var(--menu-border);
}

#Menu .x-treelist-item-tool {
  border-radius: 8px;
  color: var(--menu-text);
  transition:
    color 120ms ease,
    background-color 120ms ease;
}

#Menu .x-treelist-item-tool,
#Menu .x-treelist-item-tool::before {
  line-height: var(--menu-row-height);
}

#Menu .x-treelist-item-tool:hover {
  color: var(--menu-primary);
  background: var(--menu-selected);
}

#Menu .x-treelist-item-tool.x-treelist-item-selected {
  color: #ffffff;
  background: var(--menu-primary);
}

/* Comandi nell'header */
#westViewPortId_header .x-tool {
  border-radius: 50%;
  transition: background-color 120ms ease;
}

#westViewPortId_header .x-tool:hover {
  background: var(--menu-selected);
}

#westViewPortId_header .x-tool-tool-el {
  opacity: 0.72;
}

#westViewPortId_header .x-tool:hover .x-tool-tool-el {
  opacity: 1;
}

/* Scrollbar */
#westViewPortId-body,
#Menu.x-treelist {
  scrollbar-width: thin;
  scrollbar-color: #b7c5d2 transparent;
}

#westViewPortId-body::-webkit-scrollbar,
#Menu.x-treelist::-webkit-scrollbar {
  width: 7px;
}

#westViewPortId-body::-webkit-scrollbar-track,
#Menu.x-treelist::-webkit-scrollbar-track {
  background: transparent;
}

#westViewPortId-body::-webkit-scrollbar-thumb,
#Menu.x-treelist::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 10px;
  background: #b7c5d2;
  background-clip: padding-box;
}

#westViewPortId-body::-webkit-scrollbar-thumb:hover,
#Menu.x-treelist::-webkit-scrollbar-thumb:hover {
  background: #8fa3b5;
  background-clip: padding-box;
}

@media (prefers-reduced-motion: reduce) {
  #Menu .x-treelist-row,
  #Menu .x-treelist-item-tool,
  #westViewPortId_header .x-tool {
    transition: none;
  }
}


*:has(> #Menu) {
  border-width: 1px 0 0 0;
}


#MenuSearch-triggerWrap, #MenuSearch-inputEl {
  border-radius: 20px
}

#MenuSearch-inputEl {
  padding: 10px
}
