/* Window Component */
.nexus-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: var(--window-border);
  border-radius: var(--window-radius);
  box-shadow: var(--window-shadow);
  overflow: hidden;
  min-width: 320px;
  min-height: 200px;
}

.nexus-window.dragging {
  opacity: 0.92;
  cursor: grabbing;
}

.nexus-window.maximized {
  border-radius: 0;
}

/* Title Bar */
.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 32px;
  background: var(--bg);
  border-bottom: 1px solid rgba(0, 255, 200, 0.08);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.window-icon {
  color: var(--accent-primary);
  font-size: 10px;
}

.window-title {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}

.window-title-dots {
  flex: 1;
  border-bottom: 1px dotted var(--bg-elevated);
  height: 1px;
  margin: 0 8px;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.win-ctrl {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-dim);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.win-ctrl:hover {
  background: var(--bg-elevated);
  color: var(--text-bright);
}

.win-ctrl.win-close:hover {
  background: var(--status-error);
  color: #fff;
}

/* Content */
.window-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 12px;
  line-height: 1.7;
}

/* Opening / Closing animations */
.window-opening {
  animation: windowOpen 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.window-closing {
  animation: windowClose 0.2s ease forwards;
}

@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes windowClose {
  to {
    opacity: 0;
    transform: scale(0.95) translateY(5px);
  }
}
