/* ════════════════════════════════
   WINDOWS
   ════════════════════════════════ */
.window {
  position: absolute;
  background-color: var(--c-material);
  border: none;
  box-shadow: var(--shadow-window-frame), var(--shadow-window-drop);
  min-width: 220px;
  min-height: 160px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 4px;
  gap: 4px;
}
.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100vh - 40px) !important;
}

/* Title bar */
.window-titlebar {
  background: var(--c-header-inactive);
  height: 33px;
  line-height: 33px;
  display: flex;
  align-items: center;
  padding-left: 4px;
  padding-right: 3px;
  cursor: move;
  flex-shrink: 0;
  gap: 4px;
  border: 2px solid var(--c-material);
}
.window.active .window-titlebar {
  background: var(--c-header);
}
.window-title-icon {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.window-title {
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 18px;
  font-weight: normal;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 4px;
}

/* Window control buttons */
.window-controls {
  display: flex;
  gap: 2px;
  margin-left: 4px;
  align-items: center;
}
.win-btn {
  width: 22px;
  height: 22px;
  background-color: #c0c0c0;
  border: none;
  box-shadow: inset -1px -1px 0px #000000, inset 1px 1px 0px #ffffff, inset -2px -2px 0px #818181;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.win-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  overflow: visible;
  flex-shrink: 0;
}
.win-btn svg[width][height] {
  width: revert;
  height: revert;
}
.win-btn:active {
  box-shadow: inset 1px 1px 0px #000000, inset -1px -1px 0px #ffffff, inset 2px 2px 0px #818181;
}
.win-btn:active svg {
  transform: translate(1px, 1px);
}
.win-btn-close { width: 22px; margin-left: 2px; }
.win-btn-minimize {
  background-image: url('../img/minimize-btn.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: none;
  background-color: transparent;
}

/* Menubar */
.window-menubar {
  display: flex;
  padding: 2px 0 1px;
  border-bottom: 1px solid var(--c-gray-300);
  flex-shrink: 0;
  background: var(--c-gray-200);
}
.menu-item {
  padding: 2px 7px;
  cursor: pointer;
  font-size: 16px;
  font-weight: normal;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  border: 1px solid transparent;
}
.menu-item:hover {
  background-color: #000080;
  color: #fff;
}

/* Toolbar */
.window-toolbar {
  display: flex;
  align-items: center;
  padding: 2px 0;
  gap: 2px;
  border-bottom: 1px solid var(--c-gray-300);
  flex-shrink: 0;
  background: var(--c-gray-200);
}
.toolbar-btn {
  width: 22px;
  height: 20px;
  background-color: var(--c-gray-200);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.toolbar-btn:hover {
  box-shadow: var(--shadow-btn);
}
.toolbar-btn:active {
  box-shadow: var(--shadow-btn-active);
}
.toolbar-sep {
  width: 4px;
  height: 18px;
  box-shadow: inset -1px 0 0 var(--c-white), inset 1px 0 0 var(--c-gray-300);
  margin: 0 2px;
}

/* Address bar */
.address-bar {
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  border-bottom: 1px solid var(--c-gray-300);
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 11px;
  flex-shrink: 0;
  background: var(--c-gray-200);
}
.address-label { font-weight: bold; white-space: nowrap; }
.address-input {
  flex: 1;
  box-shadow: var(--shadow-input);
  border: none;
  padding: 0 3px;
  font-size: 11px;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  height: 18px;
  background: #fff;
  outline: none;
  margin-right: 4px;
}

/* Window body */
.window-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.window-content {
  flex: 1;
  overflow: auto;
  background-color: var(--c-canvas);
  border: none;
  box-shadow: var(--shadow-input);
}

/* File grid */
.file-grid {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0;
  padding: 12px;
  min-height: 100%;
}
.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px 8px;
  cursor: url('../img/cursor-default.png') 0 0, default;
  width: 110px;
}
.file-item.selected .file-label {
  background-color: #000080;
  color: #fff;
  outline: 1px dotted #fff;
}
.file-item img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}
.file-label {
  font-size: 13px;
  text-align: center;
  margin-top: 6px;
  word-break: break-word;
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  padding: 1px 3px;
  line-height: 1.3;
  color: #000;
}

/* Recycle bin empty state */
.recycle-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--c-gray-300);
  font-family: "w95fa", 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 12px;
  gap: 14px;
  padding: 20px;
}

/* Resize grip */
.resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  cursor: nwse-resize;
  background-image: url('../img/resize-grip.png');
  background-size: 13px 13px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
