/* Window System Styles */

.window {
  position: absolute;
  background: var(--window-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 300px;
  min-height: 200px;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
  transform-origin: center;
}

/* Window opening animation */
.window.opening {
  animation: winOpen 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes winOpen {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Inactive window state */
.window.inactive {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.05);
}

.window.inactive .traffic-lights span {
  background-color: #555 !important;
  color: #555 !important;
}

.window-header {
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  position: relative;
  cursor: grab;
}

.window-header:active {
  cursor: grabbing;
}

.traffic-lights {
  display: flex;
  gap: 8px;
  margin-left: 12px;
  z-index: 2;
}

.t-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 8px;
  color: transparent;
  transition: 0.1s;
  cursor: default;
}

.traffic-lights:hover .t-btn {
  color: rgba(0, 0, 0, 0.6);
}

.close-btn {
  background: #ff5f56;
}

.min-btn {
  background: #ffbd2e;
}

.max-btn {
  background: #27c93f;
}

.window-title {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.window-content {
  flex: 1;
  overflow: auto;
  position: relative;
  user-select: text;
  /* Allow text selection inside apps */
}

/* jQuery UI Resizable Handle Fix */
.ui-resizable-se {
  bottom: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background: none;
}

