/* The controls are drawn on their buttons so the artwork and hit targets stay aligned. */
body[data-mode][data-appearance^="artist-"] .window:not(.dashboard-page-window) .titlebar {
  background: linear-gradient(to bottom, var(--artist-header) calc(100% - 4px), transparent calc(100% - 4px));
}

body[data-mode][data-appearance] .window .titlebar > .window-controls {
  display: flex;
  align-items: center;
  flex: none;
  gap: 1px;
  margin: 0;
  padding: 0;
}

body[data-mode][data-appearance] .window .titlebar > .window-controls > button:nth-child(n) {
  display: grid;
  place-items: center;
  width: 42px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--theme-ink);
  background: transparent !important;
  box-shadow: none;
}
body[data-mode][data-appearance^="artist-"] .window .titlebar > .window-controls > button:nth-child(n) { color: #fff; }
body[data-mode][data-appearance="artist-gray"] .window .titlebar > .window-controls > button:nth-child(n) { color: #303030; }

.window .window-controls > button svg {
  display: block;
  width: 29px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
body[data-mode][data-appearance] .window .window-controls > button:hover { background: #80808033 !important; }
body[data-mode][data-appearance] .window .window-controls > button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}

body[data-mode][data-appearance] .desktop > .window.expanded:not(.dashboard-page-window) {
  position: absolute;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  resize: none;
  transform: none;
}
body[data-mode][data-appearance] .desktop > .window.expanded:not(.hidden,.dashboard-page-window) {
  display: flex;
  flex-direction: column;
}
body[data-mode][data-appearance] .window.expanded > :is(.content,.folder-layout) {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

body[data-mode="phone"][data-appearance] .window .window-controls > button:first-child { display: none !important; }
body[data-mode="phone"]:has(.desktop > .window.expanded:not(.hidden)) .dock-wrap { visibility: hidden; }
