/* BioStudio AI — taskbar (Windows 11 style) */

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 8px;
  background: var(--taskbar-bg);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-top: 1px solid var(--taskbar-border);
  z-index: 9000;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

#os.taskbar-autohide .desktop-surface {
  inset: 0;
}

#os.taskbar-autohide.taskbar-revealed .desktop-surface,
#os.taskbar-autohide:has(.taskbar:focus-within) .desktop-surface,
#os.taskbar-autohide:has(.taskbar:hover) .desktop-surface {
  inset: 0 0 var(--taskbar-h) 0;
}

#os.taskbar-autohide .taskbar {
  transform: translateY(calc(100% - 4px));
  opacity: 0.22;
}

#os.taskbar-autohide.taskbar-revealed .taskbar,
#os.taskbar-autohide .taskbar:hover,
#os.taskbar-autohide:has(.taskbar:focus-within) .taskbar {
  transform: translateY(0);
  opacity: 1;
}

.taskbar-reveal-hotspot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  z-index: 8999;
  pointer-events: none;
}

#os:not(.taskbar-autohide) .taskbar-reveal-hotspot {
  pointer-events: none;
}

.fullscreen-message {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 10020;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(780px, calc(100vw - 32px));
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 16, 28, 0.68);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  font-size: 12.5px;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fullscreen-message.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.fullscreen-message.compact {
  top: 12px;
  right: 14px;
  left: auto;
  max-width: none;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  background: rgba(12, 16, 28, 0.48);
  transform: translate(0, 0);
}

.fullscreen-message.compact span {
  display: none;
}

.fullscreen-message.compact button {
  min-width: 112px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
}

.fullscreen-message.compact.subtle {
  opacity: 0.38;
}

.fullscreen-message.compact.subtle:hover,
.fullscreen-message.compact.subtle:focus-within {
  opacity: 1;
  background: rgba(12, 16, 28, 0.72);
}

.fullscreen-message span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fullscreen-message button {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 700;
}

.fullscreen-message button:hover {
  background: rgba(255, 255, 255, 0.26);
}

.fullscreen-message-close {
  color: rgba(255, 255, 255, 0.72) !important;
}

.taskbar-reveal-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--taskbar-h) + 14px);
  z-index: 10010;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 16, 28, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.taskbar-reveal-hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.taskbar-center {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
}

.taskbar-right {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

.tb-icon-btn,
.task-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  color: var(--ink);
  transition: background 0.12s ease, transform 0.08s ease;
}
.tb-icon-btn:hover,
.task-btn:hover { background: var(--tb-hover); }
.tb-icon-btn:active,
.task-btn:active { transform: scale(0.94); }
.tb-icon-btn .icon svg { width: 100%; height: 100%; }

.taskbar-start .icon { color: var(--accent); }
.dark .taskbar-start .icon { color: #4cc2ff; }

.taskbar-apps {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Virtual-desktop indicator pill */
.tb-desktop-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px 0 10px;
  margin: 0 2px;
  border-radius: 16px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  background: var(--tb-hover);
}
.tb-desktop-pill:hover { background: var(--tb-active); }
.tb-desktop-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.tb-desktop-label { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.task-btn-icon { width: 24px; height: 24px; display: grid; place-items: center; }
.task-btn-icon .icon { width: 24px; height: 24px; }

/* Running / active indicator pill (Win11) */
.task-btn-indicator {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--ink-soft);
  opacity: 0;
  transition: width 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}
.task-btn.running .task-btn-indicator { width: 7px; opacity: 0.75; }
.task-btn.active .task-btn-indicator { width: 17px; opacity: 1; background: var(--accent); }
.task-btn.multi.running .task-btn-indicator { box-shadow: 4px 0 0 -1px var(--ink-soft); }
.task-btn.active { background: var(--tb-active); }

/* System tray */
.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 4px;
}
.tray-chevron {
  width: 30px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}
.tray-chevron:hover { background: var(--tb-hover); }

.tb-style-toggle {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--tb-hover);
}
.tb-style-toggle:hover { background: var(--tb-active); }
.tb-style-toggle.mac { color: var(--accent); }

.tray-cluster {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--ink);
}
.tray-cluster .icon { width: 17px; height: 17px; }
.tray-cluster:hover { background: var(--tb-hover); }

.tray-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  line-height: 1.25;
  font-size: 12px;
  color: var(--ink);
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
}
.tray-clock:hover { background: var(--tb-hover); }
.clock-date { font-size: 11.5px; }

/* Show desktop sliver at the far right corner */
.tb-show-desktop {
  width: 6px;
  height: var(--taskbar-h);
  margin-left: 2px;
  border-left: 1px solid transparent;
}
.tb-show-desktop:hover { border-left-color: var(--taskbar-border); background: var(--tb-hover); }

/* Hover thumbnail previews */
.tb-preview-popover {
  position: fixed;
  z-index: 9700;
  padding: 8px;
  border-radius: 12px;
  background: var(--menu-bg, rgba(245, 246, 250, 0.9));
  backdrop-filter: blur(34px) saturate(1.5);
  -webkit-backdrop-filter: blur(34px) saturate(1.5);
  border: 1px solid var(--menu-border, rgba(255, 255, 255, 0.5));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.13s ease, transform 0.13s ease;
}
.tb-preview-popover.show { opacity: 1; transform: translateY(0); }
.tb-previews { display: flex; gap: 8px; }

.tb-preview {
  width: 200px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.tb-preview:hover { background: var(--tb-hover); }
.tb-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  font-size: 12px;
}
.tb-preview-head .icon { width: 16px; height: 16px; }
.tb-preview-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-preview-close {
  width: 24px; height: 24px; border-radius: 5px;
  display: grid; place-items: center; color: var(--ink-soft);
}
.tb-preview-close:hover { background: #e81123; color: #fff; }
.tb-preview-close svg { width: 14px; height: 14px; }

.tb-thumb-wrap {
  height: 118px;
  margin: 0 6px 6px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.tb-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.tb-thumb > .window {
  transform: scale(0.27) !important;
  transform-origin: top left;
  width: 370% !important;
  height: 370% !important;
}
