/* Windows 10 style floating window — for OpenNet `build` command */
#win10-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  font-family: "Segoe UI", "SegoeUI", Tahoma, Verdana, sans-serif;
}

#win10-layer .win10-window {
  pointer-events: auto;
  position: absolute;
  display: flex;
  flex-direction: column;
  background: #f3f3f3;
  border: 1px solid #0078d7;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  min-height: 220px;
  overflow: hidden;
  user-select: none;
}

#win10-layer .win10-window.maximized {
  border: none;
  box-shadow: none;
}

#win10-layer .win10-titlebar {
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: #ffffff;
  color: #000;
  cursor: default;
}

#win10-layer .win10-window.inactive .win10-titlebar {
  background: #f3f3f3;
  color: #555;
}

#win10-layer .win10-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
}

#win10-layer .win10-appicon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: #0078d7;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#win10-layer .win10-controls {
  display: flex;
  align-items: stretch;
}

#win10-layer .win10-btn {
  width: 46px;
  border: none;
  background: transparent;
  color: #000;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
}

#win10-layer .win10-window.inactive .win10-btn {
  color: #666;
}

#win10-layer .win10-btn:hover {
  background: #e5e5e5;
}

#win10-layer .win10-btn.close:hover {
  background: #e81123;
  color: #fff;
}

#win10-layer .win10-btn:active {
  background: #cacaca;
}

#win10-layer .win10-btn.close:active {
  background: #f1707a;
  color: #fff;
}

#win10-layer .win10-body {
  flex: 1;
  display: flex;
  min-height: 0;
  background: #fff;
  color: #111;
  user-select: text;
}

#win10-layer .win10-sidebar {
  width: 200px;
  flex: 0 0 200px;
  background: #efefef;
  border-right: 1px solid #dbdbdb;
  padding: 12px 0;
  font-size: 13px;
}

#win10-layer .win10-side-item {
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
}

#win10-layer .win10-side-item:hover {
  background: #e2e2e2;
}

#win10-layer .win10-side-item.active {
  background: #e2e2e2;
  border-left-color: #0078d7;
}

#win10-layer .win10-content {
  flex: 1;
  padding: 18px 22px;
  overflow: auto;
  font-size: 13px;
}

#win10-layer .win10-content h2 {
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 14px;
}

#win10-layer .win10-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

#win10-layer .win10-row:last-child {
  border-bottom: none;
}

#win10-layer .win10-label {
  font-weight: 600;
}

#win10-layer .win10-sub {
  color: #666;
  font-size: 12px;
  margin-top: 2px;
}

#win10-layer .win10-seg {
  display: flex;
  border: 1px solid #0078d7;
}

#win10-layer .win10-seg button {
  border: none;
  background: #fff;
  color: #0078d7;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}

#win10-layer .win10-seg button.active {
  background: #0078d7;
  color: #fff;
}

#win10-layer .win10-toggle {
  position: relative;
  width: 44px;
  height: 22px;
  background: #999;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

#win10-layer .win10-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}

#win10-layer .win10-toggle[aria-checked="true"] {
  background: #0078d7;
}

#win10-layer .win10-toggle[aria-checked="true"]::after {
  left: 24px;
}

#win10-layer .win10-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  background: #f3f3f3;
  border-top: 1px solid #dbdbdb;
}

#win10-layer .win10-footer button {
  min-width: 88px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid #adadad;
  background: #e1e1e1;
  cursor: pointer;
}

#win10-layer .win10-footer button:hover {
  border-color: #0078d7;
  background: #e5f1fb;
}

#win10-layer .win10-footer button.primary {
  border-color: #0078d7;
}

/* resize handles */
#win10-layer .win10-resize {
  position: absolute;
  z-index: 5;
}

#win10-layer .win10-resize.e {
  top: 32px;
  right: -3px;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
}

#win10-layer .win10-resize.s {
  left: 0;
  right: 0;
  bottom: -3px;
  height: 6px;
  cursor: ns-resize;
}

#win10-layer .win10-resize.se {
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #9a9a9a 50%, #9a9a9a 55%, transparent 55%, transparent 65%, #9a9a9a 65%, #9a9a9a 70%, transparent 70%);
}

#win10-layer .win10-window.maximized .win10-resize {
  display: none;
}

/* minimized tray */
#win10-min-tray {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

#win10-min-tray button {
  border: 1px solid #0078d7;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 560px) {
  #win10-layer .win10-sidebar {
    display: none;
  }
}
