/* windows.css — XP Luna 多窗口管理器与通用复古控件样式 */

.xp-window {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--xp-surface);
  border: 3px solid var(--xp-blue-mid);
  border-top-width: 0;
  border-radius: var(--radius-win) var(--radius-win) 3px 3px;
  box-shadow: var(--win-shadow-inactive);
  min-width: 320px;
  min-height: 220px;
  overflow: hidden;
  transition: box-shadow 0.14s ease, opacity 0.14s ease;
}

.xp-window.focused {
  border-color: var(--xp-blue-mid);
  box-shadow: var(--win-shadow-active);
}

.xp-window.inactive {
  border-color: #7c97dc;
}

.xp-window.minimized {
  display: none;
}

.xp-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

/* 窗口标题栏 */
.xp-titlebar {
  height: 30px;
  flex-shrink: 0;
  padding: 0 6px 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: move;
  background: linear-gradient(
    180deg,
    #3d95ff 0%,
    #0e61e6 14%,
    #0a54d6 78%,
    #053db0 100%
  );
  border-top: 1px solid #7ab7ff;
  color: #ffffff;
}

.xp-window.inactive .xp-titlebar {
  background: linear-gradient(
    180deg,
    #a8bef0 0%,
    #7d99dd 20%,
    #7793d9 85%,
    #6884cb 100%
  );
  border-top-color: #ccd9f7;
  color: #e6eefc;
}

.xp-title-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  text-shadow: 1px 1px 1px rgba(0, 20, 68, 0.72);
}

.xp-title-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.xp-title-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.xp-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.xp-win-btn {
  width: 21px;
  height: 21px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #569dff, #2266dc 52%, #1953c4);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.xp-win-btn:hover {
  filter: brightness(1.12);
}
.xp-win-btn:active {
  filter: brightness(0.92);
}
.xp-win-btn.close {
  background: linear-gradient(180deg, #f27c69, #dc432e 50%, #ba2514);
}
.xp-window.inactive .xp-win-btn {
  opacity: 0.72;
}

/* 窗口内容容器 */
.xp-window-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--xp-surface);
}

/* 复古通用菜单栏 / 工具栏 / 状态栏 */
.xp-menubar {
  background: #ece9d8;
  border-bottom: 1px solid #d0cbb8;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #222;
  flex-shrink: 0;
}
.xp-toolbar {
  background: linear-gradient(180deg, #faf8f0, #ebe7d5);
  border-bottom: 1px solid #bfb9a4;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}
.xp-statusbar {
  background: #ece9d8;
  border-top: 1px solid #c9c4b1;
  padding: 3px 10px;
  font-size: 11.5px;
  color: #4f5563;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* 经典 XP 3D 按钮 */
.xp-btn {
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #f1efe7 55%, #e2dfd3 100%);
  color: #162033;
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 4px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: inset 0 1px 0 #ffffff;
  transition: filter 0.1s ease;
}
.xp-btn:hover:not(:disabled) {
  border-color: #d9822b;
  background: linear-gradient(180deg, #ffffff 0%, #fff7e6 55%, #f7e6c4 100%);
}
.xp-btn:active:not(:disabled) {
  background: #dfdacf;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.22);
}
.xp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.xp-btn.primary {
  border-color: #0b41a8;
  background: linear-gradient(180deg, #4b94ff, #1d64de 58%, #1650ba);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.xp-btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #63a4ff, #2973eb 58%, #1d5cce);
}
.xp-btn.danger {
  border-color: #9e1f1f;
  background: linear-gradient(180deg, #ef5c5c, #c92a2a);
  color: #fff;
  font-weight: 700;
}
.xp-btn.clue-pin-btn {
  border-color: #c27803;
  background: linear-gradient(180deg, #fff9db, #ffe066);
  color: #5c3700;
  font-weight: 700;
  font-size: 11.5px;
  padding: 2px 8px;
}
.xp-btn.clue-pin-btn.pinned {
  border-color: #2b8a3e;
  background: #ebfbee;
  color: #2b8a3e;
}

.xp-input {
  border: 1px solid #7f9db9;
  background: #ffffff;
  padding: 5px 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #1a1d24;
  border-radius: 2px;
  outline: none;
}
.xp-input:focus {
  border-color: #1d64de;
  box-shadow: 0 0 0 2px rgba(29, 100, 222, 0.16);
}

/* 内嵌复古弹窗遮罩（WinRAR 解压、结案报告、错误提示） */
.xp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(6, 16, 38, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.xp-modal-backdrop.open {
  display: flex;
}
.xp-dialog {
  width: min(520px, 94vw);
  max-height: 90vh;
  background: var(--xp-surface);
  border: 3px solid var(--xp-blue-mid);
  border-top: 0;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 18px 48px rgba(0, 12, 40, 0.62);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.xp-dialog.wide {
  width: min(860px, 94vw);
}
.xp-dialog-body {
  padding: 16px 18px;
  overflow-y: auto;
}
