/* Window Maker / NeXTSTEP Window Manager Skin */
[data-wm-style="windowmaker"].webos-window {
  border-radius: 0;
  border: 1px solid #000000;
  box-shadow: inset 0 0 0 1px #ffffff, 4px 4px 0 rgba(0, 0, 0, 0.8), 0 12px 30px rgba(0, 0, 0, 0.6);
  background: #2b2b36;
  color: #ffffff;
}

[data-wm-style="windowmaker"] > .window-header {
  background: linear-gradient(135deg, #4d4d62 0%, #1f1f2a 100%);
  color: #ffffff;
  padding: 2px 4px;
  height: 22px;
  min-height: 22px;
  border-top: 1px solid #7c7c94;
  border-bottom: 1px solid #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  cursor: grab;
}

/* Allow buttons inside .window-traffic-lights to split between Left and Right */
[data-wm-style="windowmaker"] > .window-header > .window-traffic-lights {
  display: contents;
}

/* 1. NeXT Close Button 'X' (on the FAR LEFT) */
[data-wm-style="windowmaker"] > .window-header .win-btn.win-close {
  order: 1;
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: 2px outset #8a8a9e;
  background: #3c3c4e;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #000000;
  color: #ffffff !important;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 9px !important;
  font-weight: 900;
  padding: 0;
  margin: 0 4px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none !important;
  filter: none !important;
  cursor: pointer;
}

[data-wm-style="windowmaker"] > .window-header .win-btn.win-close:active {
  border-style: inset;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #ffffff !important;
  padding: 1px 0 0 1px;
}

/* 2. Centered NeXTSTEP Title */
[data-wm-style="windowmaker"] > .window-header > .window-title-group {
  order: 2;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  font-family: "Helvetica Neue", "Arial", sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  text-shadow: 1px 1px 1px #000000;
  cursor: grab;
}

[data-wm-style="windowmaker"] > .window-header > .window-title-group > .window-title-text {
  color: #ffffff;
}

/* 3. Window Actions */
[data-wm-style="windowmaker"] > .window-header > .window-header-actions {
  order: 3;
}

/* 4. Miniaturize Button (on the FAR RIGHT) */
[data-wm-style="windowmaker"] > .window-header .win-btn.win-minimize {
  order: 4;
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: 2px outset #8a8a9e;
  background: #3c3c4e;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #000000;
  color: #ffffff !important;
  font-size: 0 !important;
  padding: 0;
  margin: 0 2px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none !important;
  filter: none !important;
  cursor: pointer;
}

[data-wm-style="windowmaker"] > .window-header .win-btn.win-minimize::after {
  content: '';
  width: 8px;
  height: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4' viewBox='0 0 8 4'%3E%3Crect width='8' height='1' fill='%23fff'/%3E%3Crect y='3' width='8' height='1' fill='%23fff'/%3E%3C/svg%3E") no-repeat center;
}

[data-wm-style="windowmaker"] > .window-header .win-btn.win-minimize:active {
  border-style: inset;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #ffffff !important;
  padding: 1px 0 0 1px;
}

/* 5. Maximize / Zoom Button (on the FAR RIGHT) */
[data-wm-style="windowmaker"] > .window-header .win-btn.win-maximize {
  order: 5;
  width: 16px;
  height: 16px;
  border-radius: 0;
  border: 2px outset #8a8a9e;
  background: #3c3c4e;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #000000;
  color: #ffffff !important;
  font-size: 0 !important;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none !important;
  filter: none !important;
  cursor: pointer;
}

[data-wm-style="windowmaker"] > .window-header .win-btn.win-maximize::after {
  content: '';
  width: 8px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Crect x='0.5' y='0.5' width='7' height='7' fill='none' stroke='%23fff'/%3E%3C/svg%3E") no-repeat center;
}

[data-wm-style="windowmaker"] > .window-header .win-btn.win-maximize:active {
  border-style: inset;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #ffffff !important;
  padding: 1px 0 0 1px;
}

/* WindowMaker Window Body */
[data-wm-style="windowmaker"] > .window-body {
  border: 1px solid #1a1a24;
  background: #1e1e28;
  color: #ffffff;
}

/* WindowMaker Resize Handle */
[data-wm-style="windowmaker"] .win-resize-handle.res-se {
  width: 12px;
  height: 12px;
  bottom: 1px;
  right: 1px;
  background: #3c3c4e;
  border: 1px solid #7c7c94;
}
