/* Taskbar: launcher (the WRM mark), running windows, tray. */

.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 6px;
  height: var(--taskbar-h);
  padding: 0 8px env(safe-area-inset-bottom);
  background: var(--surface);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border-top: 1px solid var(--line-2);
  box-shadow: var(--highlight);
}

.tb-launch {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px 0 10px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent;
  transition: background var(--dur-1) var(--ease-out);
}
.tb-launch:hover, .tb-launch[aria-expanded="true"] { background: var(--surface-3); border-color: var(--line); }
.tb-launch .mark { height: 18px; width: auto; }
.tb-launch .os-name { font-weight: 600; font-size: var(--fs-2); letter-spacing: 0.01em; color: var(--text); }

.tb-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; flex: none; }

.tb-tasks { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.tb-task {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  max-width: 190px; min-width: 44px; height: 38px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--text-2);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.tb-task:hover { background: var(--surface-3); color: var(--text); }
.tb-task .glyph { width: 16px; height: 16px; }
.tb-task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.tb-task.is-active { background: var(--surface-3); color: var(--text); border-color: var(--line); }
.tb-task::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; translate: -50% 0;
  width: 14px; height: 2px; border-radius: 2px; background: var(--text-3);
  transition: width var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}
.tb-task.is-active::after { width: 22px; background: var(--accent); }
.tb-task.is-min { opacity: 0.7; }

.tb-tray { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.tb-tray button {
  display: flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 9px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2);
}
.tb-tray button:hover { background: var(--surface-3); color: var(--text); }
.tb-tray .glyph { width: 17px; height: 17px; }
.tb-pulse .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.05); }
.tb-pulse[data-state="up"] .dot { background: var(--ok); }
.tb-pulse[data-state="slow"] .dot { background: var(--amber); }
.tb-pulse[data-state="down"] .dot { background: var(--red); }
.tb-pulse .n { font-size: var(--fs-1); font-variant-numeric: tabular-nums; }
.tb-clock { flex-direction: column; justify-content: center; gap: 0 !important; line-height: 1.15; font-variant-numeric: tabular-nums; text-align: right; }
.tb-clock .t { color: var(--text); font-weight: 500; font-size: var(--fs-2); }
.tb-clock .d { color: var(--text-3); font-size: 10.5px; }

@media (max-width: 720px) {
  .tb-launch .os-name, .tb-task span, .tb-clock .d, .tb-pulse .n { display: none; }
  .tb-task { padding: 0 10px; }
}
