/* Windows 2000 desktop. Only applies once desktop.js adds body.os.
   Colour tokens (--face, --hi, --shadow, --dark, --navy, --desk) come from article.css. */

body.os { overflow: hidden; }
body.os > .bar,
body.os > #article { display: none; }

.desktop {
  position: fixed;
  inset: 0;
  background: var(--desk);
  color: #000;
  font: 12px Tahoma, Verdana, sans-serif;
  user-select: none;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 4px;
  z-index: 10000;
  padding: 4px 8px;
  background: #ffffe1;
  border: 1px solid #000;
  color: #000;
}
.skip:focus { left: 4px; }

/* Icons */
.icons {
  list-style: none;
  margin: 0;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100px;
}
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 88px;
  padding: 2px;
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: default;
}
.icon:focus { outline: none; }
.ico { display: inline-flex; flex: none; }
.ico svg { width: 32px; height: 32px; }
.icon__label {
  padding: 1px 3px;
  text-align: center;
  text-shadow: 1px 1px 1px #000;
  overflow-wrap: anywhere;
}
.icon:focus .icon__label {
  background: var(--navy);
  text-shadow: none;
  outline: 1px dotted #fff;
}
.icon:focus .ico { opacity: 0.6; }

/* Windows */
.layer { position: absolute; inset: 0 0 30px 0; pointer-events: none; }

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 260px;
  min-height: 120px;
  padding: 2px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--face) var(--dark) var(--dark) var(--face);
  box-shadow: inset 1px 1px var(--hi), inset -1px -1px var(--shadow), 1px 1px 0 #000;
  pointer-events: auto;
}
.win:focus { outline: none; }
.win[hidden] { display: none; }
.win--max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }

.win__title {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  padding: 0 2px 0 4px;
  color: #d4d0c8;
  background: linear-gradient(90deg, #808080, #c0c0c0);
  font-weight: bold;
  touch-action: none;
}
.win--active .win__title {
  color: #fff;
  background: linear-gradient(90deg, var(--navy), #a6caf0);
}
.win__name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.win__btn,
.btn,
.start,
.task {
  background: var(--face);
  border: 1px solid;
  border-color: var(--hi) var(--dark) var(--dark) var(--hi);
  box-shadow: inset -1px -1px var(--shadow);
  color: #000;
}
.win__btn:active,
.btn:active,
.start[aria-expanded="true"],
.task--active {
  border-color: var(--dark) var(--hi) var(--hi) var(--dark);
  box-shadow: inset 1px 1px var(--shadow);
}

.win__btn {
  width: 16px;
  height: 14px;
  padding: 0;
  display: grid;
  place-items: center;
  font: bold 10px/1 Tahoma, sans-serif;
}
.win__btn--close { margin-left: 2px; }

.win__body {
  flex: 1;
  margin-top: 2px;
  padding: 12px 18px;
  overflow: auto;
  background: #fff;
  border: 2px solid;
  border-color: var(--shadow) var(--hi) var(--hi) var(--shadow);
  box-shadow: inset 1px 1px var(--dark);
  font: 14px/1.55 Tahoma, Verdana, sans-serif;
  overflow-wrap: anywhere;
  user-select: text;
}
.win__body h1 { font-size: 1.35rem; }
.win--notepad .win__body { padding: 6px 8px; }

.win__grip {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 13px;
  height: 13px;
  cursor: nwse-resize;
  touch-action: none;
  background: linear-gradient(135deg,
    transparent 45%, var(--shadow) 45% 55%, transparent 55% 65%,
    var(--shadow) 65% 75%, transparent 75% 85%, var(--shadow) 85%);
}
.win--max .win__grip { display: none; }

/* Error dialog */
.win--dialog .win__body { background: var(--face); border: 0; box-shadow: none; font-size: 12px; }
.dialog__msg { display: flex; align-items: center; gap: 12px; }
.dialog__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #c00;
  color: #fff;
  font-weight: bold;
}
.dialog__buttons { text-align: center; }
.btn { min-width: 75px; padding: 3px 8px; font: 12px Tahoma, sans-serif; }

/* Taskbar */
.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  background: var(--face);
  box-shadow: inset 0 1px var(--hi);
}
.start {
  height: 24px;
  padding: 0 8px;
  font: bold 12px Tahoma, sans-serif;
}
.tasks { flex: 1; display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.task {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 160px;
  min-width: 0;
  height: 24px;
  padding: 0 6px;
  font: 12px Tahoma, sans-serif;
  text-align: left;
}
.task .ico svg { width: 16px; height: 16px; }
.task__label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task--active {
  font-weight: bold;
  background: repeating-conic-gradient(var(--hi) 0 25%, var(--face) 0 50%) 0 0 / 2px 2px;
}
.tray {
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid;
  border-color: var(--shadow) var(--hi) var(--hi) var(--shadow);
}

/* Start menu */
.startmenu {
  position: absolute;
  left: 2px;
  bottom: 28px;
  z-index: 9500;
  display: flex;
  min-width: 210px;
  padding: 2px;
  background: var(--face);
  border: 1px solid;
  border-color: var(--face) var(--dark) var(--dark) var(--face);
  box-shadow: inset 1px 1px var(--hi), inset -1px -1px var(--shadow), 1px 1px 0 #000;
}
.startmenu[hidden] { display: none; }
.startmenu__side {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 3px;
  color: #fff;
  font: bold 18px Tahoma, sans-serif;
  background: linear-gradient(0deg, var(--navy), #1084d0);
}
.startmenu__items { display: flex; flex-direction: column; flex: 1; }
.startmenu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 18px 5px 6px;
  background: none;
  border: 0;
  color: #000;
  font: 12px Tahoma, sans-serif;
  text-align: left;
  text-decoration: none;
}
.startmenu__item:hover,
.startmenu__item:focus { background: var(--navy); color: #fff; outline: none; }
.startmenu__item .ico svg { width: 24px; height: 24px; }
.startmenu hr {
  width: 100%;
  margin: 2px 0;
  border: 0;
  border-top: 1px solid var(--shadow);
  border-bottom: 1px solid var(--hi);
}
