.theme-control,
.button.theme-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid var(--color-light-border);
  border-radius: var(--border-radius);
  background: var(--color-button);
  color: var(--color-text);
  font: 500 14px/20px var(--fonts-proportional);
  white-space: nowrap;
  cursor: pointer;
}

.button.theme-control-wide {
  padding: 5px 16px;
}

.button.theme-control-small {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 18px;
}

.theme-control:hover {
  background: var(--color-hover);
}

.theme-control:focus-visible {
  outline: 2px solid var(--github-fgColor-accent);
  outline-offset: 2px;
}

.theme-icon-button {
  appearance: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  background: transparent;
  color: var(--color-text-light-1);
  cursor: pointer;
  list-style: none;
}
.theme-icon-button:hover {
  background: var(--github-control-transparent-bgColor-hover);
}
.theme-icon-button[aria-expanded="true"],
.theme-menu[open] > .theme-icon-button {
  background: var(--github-control-transparent-bgColor-active);
}
.theme-icon-button-outlined {
  border-color: var(--color-light-border);
  background: var(--color-button);
}
.theme-icon-button > svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
}
.theme-icon-button:focus-visible {
  outline: 2px solid var(--github-fgColor-accent);
  outline-offset: 2px;
}

/*
 * Native controls: Forgejo's own buttons that cannot take the theme-control class get the same
 * 32px control size here. To size another native button, add it to the list.
 */
:is(
  .review-box-panel form > .ui.ui.ui.button,
  .comment-code-cloud .field.footer .ui.ui.ui.button,
  .comment-code-cloud :is(.button-row, .button-sequence):has(.comment-form-reply) .ui.ui.ui.button,
  .page-content.repository.new.issue.github-issue-new .issue-content-left .text.right .ui.ui.ui.button,
  .page-content.repository.new.release .ui.form .ui.ui.ui.button:not(.mini)
) {
  height: 32px;
  min-height: 32px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
