/* ==========================================
   System 7 (Retro Apple) Theme Stylesheet
   ========================================== */
.theme-mac-retro {
  --desktop-bg: #778877;
  --window-bg: #dddddd;
  --window-border: #000000;
  --text-main: #000000;
  /* The accent, the surfaces, the bar and the second text of this look, which the desk's parts and a game in a window read; without them the first look's showed through. */
  --accent: #333333;
  --window-active-border: #000000;
  --surface: #ffffff;
  --surface-hover: #e6e6e6;
  --taskbar-bg: #dddddd;
  --text-secondary: #444444;
}

.theme-mac-retro #desktop {
  background: #778877;
}

/* --- Windows --- */
.theme-mac-retro .window {
  border: 2px solid #000000;
  border-radius: 0;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
  background: #dddddd;
  color: #000000;
}

.theme-mac-retro .window.active {
  box-shadow: 6px 6px 0px rgba(0,0,0,0.7);
  border-color: #000000;
}

.theme-mac-retro .window .titlebar {
  background: repeating-linear-gradient(
    to bottom,
    #ffffff,
    #ffffff 1px,
    #000000 1px,
    #000000 2px
  );
  color: #000000;
  border-bottom: 2px solid #000000;
  font-family: "Geneva", "Chicago", "Courier", monospace;
  font-weight: bold;
  height: 22px;
  padding: 0 4px;
}

/* The title plate is as wide as the title, centred on the stripes and
   clear of the boxes at the left (8px + four 13px boxes and their gaps, 78px). */
.theme-mac-retro .window .window-title {
  background: #dddddd;
  padding: 0 8px;
  flex: 0 1 auto;
  margin: 0 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 180px);
  color: #000000;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  border: 1px solid #000000;
}

.theme-mac-retro .window .window-controls {
  flex-direction: row-reverse;  /* close, minimize, zoom, code from the left, as on a Mac (the page has them the other way) */
  position: absolute;
  left: 8px;
  top: 4px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.theme-mac-retro .window .window-controls button {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  background: #dddddd;
  border: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #888888;
  border-radius: 0;
  color: #000000;
  font-size: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-mac-retro .window .window-controls .btn-close::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  background: #000000;
}

.theme-mac-retro .window .window-controls button:hover {
  background: #000000;
  color: #ffffff;
}

.theme-mac-retro .code-toolbar {
  background: #dddddd;
  border-top: 2px solid #000000;
}

.theme-mac-retro .code-tab {
  background: #ffffff;
  border: 1px solid #000000;
  color: #000000;
  border-radius: 0;
  font-family: "Geneva", monospace;
  font-weight: bold;
}

.theme-mac-retro .code-tab.active {
  background: #000000;
  color: #ffffff;
}

/* --- Taskbar --- */
.theme-mac-retro #taskbar {
  background: #dddddd;
  border-top: 2px solid #000000;
  color: #000000;
}

.theme-mac-retro .start-btn {
  background: #ffffff;
  border: 2px solid #000000;
  color: #000000;
  font-family: "Geneva", monospace;
  font-weight: bold;
  border-radius: 0;
}

.theme-mac-retro .taskbar-windows button {
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 0;
  color: #000000;
  font-family: "Geneva", monospace;
  font-weight: bold;
}

.theme-mac-retro .taskbar-windows button.active {
  background: #000000;
  color: #ffffff;
}

.theme-mac-retro .taskbar-tray {
  padding-right: 10px;  /* the tray has a border here; keep the clock off it */
  border: 1px solid #000000;
  background: #ffffff;
}

.theme-mac-retro .guide-btn,
.theme-mac-retro .tray-item,
.theme-mac-retro #clock {
  color: #000000 !important;
  font-weight: bold;
  font-family: "Geneva", monospace;
  text-shadow: none !important;
}

/* --- Context Menu & Start Menu --- */
.theme-mac-retro .context-menu {
  background: #ffffff;
  border: 2px solid #000000;
  border-radius: 0;
  box-shadow: 4px 4px 0px #000000;
  color: #000000;
}

.theme-mac-retro .context-menu-item {
  color: #000000;
  font-family: "Geneva", monospace;
  font-weight: bold;
  border-radius: 0;
}

.theme-mac-retro .context-menu-item:hover {
  background: #000000;
  color: #ffffff;
}

.theme-mac-retro .start-menu {
  background: #dddddd;
  border: 2px solid #000000;
  border-radius: 0;
  box-shadow: 6px 6px 0px #000000;
  color: #000000;
}

.theme-mac-retro .start-menu-header {
  background: #000000;
  color: #ffffff;
  border-radius: 0;
}

.theme-mac-retro .start-menu-username { color: #ffffff; font-family: monospace; }
.theme-mac-retro .start-menu-status { color: #aaaaaa; }
.theme-mac-retro .start-menu-section-title { color: #555555; }
.theme-mac-retro .start-menu-item { color: #000000; font-family: monospace; font-weight: bold; border-radius: 0; }
.theme-mac-retro .start-menu-item:hover { background: #000000; color: #ffffff; }
.theme-mac-retro .start-menu-footer { background: #cccccc; border-top: 2px solid #000000; }

/* close, minimize, zoom, then code from the left, as the other Macs */
.theme-mac-retro .window .window-controls .btn-maximize { order: -1; }
.theme-mac-retro .window .window-controls .btn-code { order: -2; }
/* System 7's zoom box: a small box drawn in the box */
.theme-mac-retro .window .window-controls .btn-maximize::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border: 1px solid #000000;
}
