/* BioStudio AI — Task View (virtual desktop overview) */

.task-view {
  position: absolute;
  inset: 0;
  z-index: 9400;
  display: flex;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.task-view.visible { opacity: 1; }

.tv-scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 30, 0.55);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
}

.tv-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 36px 24px;
  gap: 24px;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.task-view.visible .tv-inner { transform: translateY(0); }

/* --- Window thumbnails --------------------------------------------------- */
.tv-windows {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 22px;
  overflow: auto;
  padding: 10px;
}

.tv-window {
  width: 300px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.tv-window:hover { transform: translateY(-4px) scale(1.015); border-color: rgba(255, 255, 255, 0.6); }
.tv-window.dragging { opacity: 0.5; }

.tv-thumb {
  height: 174px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  display: grid;
  place-items: center;
}
.tv-thumb > .window {
  transform: scale(0.32) !important;
  transform-origin: top left;
  width: 312% !important;
  height: 312% !important;
}

.tv-window-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 10px;
  font-size: 12.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
}
.tv-window-head .icon { width: 16px; height: 16px; }
.tv-window-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-window-close {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center; color: #fff; opacity: 0.8;
}
.tv-window-close svg { width: 14px; height: 14px; }
.tv-window-close:hover { background: #e81123; opacity: 1; }

.tv-empty {
  margin: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.tv-empty .icon { color: rgba(255, 255, 255, 0.7); }
.tv-empty-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }

/* --- Desktop strip ------------------------------------------------------- */
.tv-desktops {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.tv-desktop {
  position: relative;
  width: 200px;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.tv-desktop:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.tv-desktop.active { border-color: var(--accent, #2f6bff); }
.tv-desktop.drop { border-color: #fff; background: rgba(255, 255, 255, 0.24); }

.tv-desktop-preview {
  position: relative;
  height: 96px;
  border-radius: 6px;
  background:
    radial-gradient(700px 400px at 70% 20%, rgba(120, 170, 255, 0.45), transparent 60%),
    linear-gradient(140deg, #143084, #2f6bff);
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 10px;
}
.tv-mini-win {
  width: 38px;
  height: 26px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.tv-desktop-name {
  text-align: center;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 4px 3px;
}
.tv-desktop-rename {
  width: 100%;
  margin: 5px 0 2px;
  text-align: center;
  font-size: 12.5px;
  border: 1px solid var(--accent, #2f6bff);
  border-radius: 5px;
  padding: 2px 4px;
  outline: none;
}
.tv-desktop-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.tv-desktop:hover .tv-desktop-remove { opacity: 1; }
.tv-desktop-remove svg { width: 12px; height: 12px; }
.tv-desktop-remove:hover { background: #e81123; }

.tv-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 130px;
  height: 124px;
  border-radius: 10px;
  border: 1.5px dashed rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 600;
}
.tv-add:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.7); }
.tv-add .icon { color: #fff; }
