.web-skin-picker {
  position: relative;
  flex: 0 0 auto;
}

#lg-toolbar:has(#web-skin-options:not([hidden])) {
  z-index: 10;
}

@media (max-width: 760px) {
  /* The shared stylesheet hides the sidebar at this width. */
  html.lg-shell #app-view:has(.web-skin-picker) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (max-width: 500px) {
  #lg-toolbar:has(.web-skin-picker) {
    /* Keep the floating status bar clear of the controls on narrow screens. */
    box-sizing: border-box;
    height: 95px;
    min-height: 95px;
    padding-block-start: 50px;
  }
}

#web-skin-toggle {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 8px;
  padding: 5px;
  color: #536578;
  background: transparent;
}

#web-skin-toggle svg {
  width: 17px;
  height: 17px;
}

#web-skin-toggle:is(:hover, [aria-expanded="true"]) {
  background: #5e80901c;
}

#web-skin-options {
  position: absolute;
  z-index: 20;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  width: 154px;
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid #829aad47;
  border-radius: 12px;
  background: #f9fcff;
  box-shadow: 0 10px 32px #182c4c35;
}

#web-skin-options[hidden] {
  display: none;
}

#web-skin-options > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 0;
  color: #23354a;
  background: transparent;
  font-size: 13px;
  text-align: start;
}

#web-skin-options > button:is(:hover, [aria-pressed="true"]) {
  background: #e5edf6;
}

#web-skin-options > button[aria-pressed="true"]::after {
  content: '';
  width: 8px;
  height: 4px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

#web-skin-options .web-skin-download-status {
  margin: 4px 6px;
  color: var(--jelly-muted, #536578);
  font-size: 12px;
  line-height: 1.5;
}

:is(#web-skin-toggle, #web-skin-options > button):focus-visible {
  outline: 2px solid #006bc4;
  outline-offset: 1px;
}

html.lg-dark #web-skin-toggle {
  color: #c6d7e8;
}

html.lg-dark #web-skin-options {
  background: #253348;
  border-color: #8da8c75e;
}

html.lg-dark #web-skin-options > button {
  color: #edf5ff;
}

html.lg-dark #web-skin-options > button:is(:hover, [aria-pressed="true"]) {
  background: #354962;
}
