/* NX Taskbar 2026-10-31: readable names, stable widths and accessible overflow.
 * Running apps and pinned (also closed) apps retain their existing behavior.
 * Ubuntu dock and compact touch layout remain unchanged.
 */
@media (min-width: 701px) {
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar {
    min-width: 0;
    gap: 6px;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent) 48%, var(--line)) transparent;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .pinned-task-buttons {
    flex: 0 1 auto;
    width: max-content;
    max-width: min(37%, 540px);
    padding-right: 3px;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .running-task-buttons {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-button {
    --nx-task-fixed-width: 168px;
    box-sizing: border-box;
    flex: 0 0 var(--nx-task-fixed-width);
    width: var(--nx-task-fixed-width);
    min-width: var(--nx-task-fixed-width);
    max-width: var(--nx-task-fixed-width);
    height: 40px;
    padding: 0 10px;
    text-align: left;
    justify-content: flex-start;
    gap: 7px;
    line-height: 1.15;
    scroll-snap-align: start;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-button.pinned-shortcut {
    --nx-task-fixed-width: 158px;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-button > span:last-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.12;
    max-height: 2.3em;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .pinned-glyph,
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-app-glyph,
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .program-glyph,
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-button > .file-icon {
    flex: 0 0 auto;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .taskbar-right,
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .start-button {
    flex: 0 0 auto;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .nx-taskbar-scroll {
    flex: 0 0 24px;
    width: 24px;
    height: 35px;
    padding: 0;
    margin: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: color-mix(in srgb, var(--panel-solid) 88%, var(--accent) 12%);
    color: var(--text);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .nx-taskbar-scroll[hidden] {
    display: none;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .nx-taskbar-scroll:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--panel-solid) 76%, var(--accent) 24%);
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar :is(.nx-taskbar-scroll,.task-button):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-buttons:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -1px;
  }
}
@media (max-width: 1100px) and (min-width: 701px) {
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .pinned-task-buttons {
    max-width: 33%;
  }
  body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .taskbar-status > span:last-child {
    display: none;
  }
}

@media (min-width:701px){
 body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-buttons::-webkit-scrollbar{height:4px}
 body:not(.shell-ubuntu):not([data-nx-layout="compact"]) .taskbar .task-buttons::-webkit-scrollbar-thumb{
   border-radius:4px;background:color-mix(in srgb,var(--accent) 48%,var(--line))
 }
}
