/* ==========================================================================
   VYSHNAV OS - Window Manager & Traffic Light Controls
   ========================================================================== */

.mac-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--bg-window);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: var(--radius-window);
  box-shadow: var(--shadow-window);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.window-opening {
  opacity: 0;
  transform: scale(0.92);
}

.window-closing {
  opacity: 0;
  transform: scale(0.92);
}

.window-minimized {
  opacity: 0;
  transform: translateY(120px) scale(0.2);
  pointer-events: none;
}

.window-inactive {
  opacity: 0.92;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 14px;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border-subtle);
  cursor: grab;
}

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

.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  outline: none;
  position: relative;
}

.light-red { background: #ff5f56; border: 1px solid #e0443e; }
.light-yellow { background: #ffbd2e; border: 1px solid #dea123; }
.light-green { background: #27c93f; border: 1px solid #1aab29; }

.traffic-light:hover::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.6);
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-main);
}

.window-body {
  flex: 1;
  position: relative;
  overflow: auto;
  background: var(--bg-window-solid);
}

/* Resizing handles */
.resize-handle {
  position: absolute;
  z-index: 10;
}
.handle-r { top: 0; right: 0; width: 6px; height: 100%; cursor: e-resize; }
.handle-b { bottom: 0; left: 0; width: 100%; height: 6px; cursor: s-resize; }
.handle-br { bottom: 0; right: 0; width: 12px; height: 12px; cursor: se-resize; }
