/* XP's own taskbar and tray bitmaps (28px tall) are stretched to 30px with
   the margins from the Luna theme, using border-image as a 9-slice.
   border-width stays 0 so the image takes no layout space;
   border-image-width (after the slash) sets the painted slice sizes. */

.taskbar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: var(--taskbar-height);
  border: 0 solid;
  border-image: url("../../../assets/ui/taskbar-bg.png") 15 0 11 0 fill / 15px 0 11px 0 repeat;
  color: var(--taskbar-text);
}

/* Start button: one sprite with the normal, hover and pressed states stacked
   30px apart, built from original XP parts (see ARCHITECTURE.md). One image
   means hover never flickers while a second file loads. */

.taskbar__start {
  flex-shrink: 0;
  width: 97px;
  height: 30px;
  padding: 0;
  border: 0;
  background: url("../../../assets/ui/start-button.png") 0 0 no-repeat;
}

.taskbar__start:hover {
  background-position: 0 -30px;
}

.taskbar__start:active {
  background-position: 0 -60px;
}

/* Window buttons: start at 160px and shrink down to 40px; past that the
   container clips them. */

.taskbar__buttons {
  display: flex;
  flex: 1;
  gap: 3px;
  min-width: 0;
  height: 100%;
  padding: 3px 6px;
  overflow: hidden;
}

.taskbar__button {
  flex: 0 1 160px;
  min-width: 40px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid var(--task-button-border);
  border-radius: 3px;
  background: var(--task-button-bg);
  color: #fff;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.taskbar__button:hover {
  background: var(--task-button-hover);
}

.taskbar__button--active {
  background: var(--task-button-pressed);
  box-shadow: inset 1px 1px 2px rgb(0 0 0 / 0.5);
}

/* Tray */

.taskbar__tray {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 100%;
  padding: 0 7px 0 19px; /* the theme's ContentMargins */
  border: 0 solid;
  border-image: url("../../../assets/ui/tray.png") 12 10 12 34 fill / 12px 10px 12px 34px stretch;
}

/* Each glyph is a 14px-tall window onto the sprite; clock.js sets width and x. */
.taskbar__clock {
  display: flex;
}

.taskbar__clock-glyph {
  height: 14px;
  background: url("../../../assets/ui/clock-glyphs.png") 0 0 no-repeat;
}
