/* Shared by every theme. The layout always renders the window chrome and
   the taskbar extras; each theme turns on the parts it uses. */

.title-bar,
.status-bar,
.start-logo,
.mac-logo,
.tray {
  display: none;
}

/* Home sits in the Start menu / menu bar only. */
.site-header .nav-link.nav-home {
  display: none;
}

/* Window controls, the taskbar button and the desktop icon are real
   buttons; drop the global button styles from main.css. The :root prefix
   outranks main.css's button:hover. */
:root .title-bar-button,
:root .task-button,
:root .desktop-icon {
  all: unset;
  box-sizing: border-box;
  cursor: default;
}

:root .task-button,
:root .desktop-icon {
  display: none;
}

:root .title-bar-button:focus-visible,
:root .task-button:focus-visible,
:root .desktop-icon:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: 1px;
}

/* Window states set by desktop.js */
.window {
  position: relative;
  z-index: 1;
}

.window.is-hidden {
  display: none;
}

.window.is-dragging {
  user-select: none;
  -webkit-user-select: none;
}

.title-bar {
  user-select: none;
  -webkit-user-select: none;
}

.page-content > .container:has(.window.is-maximized) {
  max-width: none;
}

html[data-window="hidden"] .desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: fixed;
  width: 84px;
  text-align: center;
  z-index: 0;
}

/* Theme picker. A native select so keyboards and phones get their own UI. */
.theme-picker {
  display: inline-flex;
  align-items: center;
  justify-self: end;
}

.theme-picker select {
  min-width: 0;
  height: 28px;
  padding: 0 24px 0 10px;
  font: inherit;
  font-size: 12px;
  color: inherit;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 768px) {
  .theme-picker {
    order: 1;
    margin-left: auto;
    margin-right: 4px;
  }

  .site-nav {
    order: 2;
  }
}
