:root {
  --action-blue: #2563eb;
  --action-blue-hover: #2969ef;
  --action-blue-active: #1d4ed8;
  --action-blue-fg: #fff;
  --action-blue-focus: #5487da;
}

:root.dark {
  --action-blue-focus: #75a6f8;
}

/* Only filled actions opt in. The primary and foreground theme tokens also
   drive text, media chrome and graphics elsewhere in the workbench. */
html :is(
  .fujiu-action-primary, .wk-primary, .we-btn.primary, button.op-primary,
  :where(button, a, [role="button"], [role="tab"], input[type="submit"],
         input[type="button"]):is(.bg-primary, .\!bg-primary, .bg-primary\/90,
                                  .bg-foreground, .bg-black, .bg-black\/55, .bg-\#000),
  :where(button, [role="checkbox"], [role="switch"]):is(
    [data-state="checked"][class~="data-[state=checked]:bg-primary"],
    [data-state="indeterminate"][class~="data-[state=indeterminate]:!bg-primary"]
  ),
  :where(.we-side nav .we-btn.active, .we-side .we-rail-active, .rs-workflow nav button[aria-current="step"]),
  .pagination-pager__num.is-active,
  .sw-specs button[aria-pressed="true"],
  :where(.preview-float-btn, .poster-play-btn, .play-button,
         .image-panel__ref-add, .image-panel__ref-remove, .canvas-keyboard-button),
  :where(.we-canvas-workbench) :where(
    .we-auth-header :is(.canvas-title-trigger, .canvas-member-list__trigger, .user-actions__notification, .credits-action),
    .we-head-left button, .we-head-right > button, .we-top :is(.we-back, .we-btn)
  )
) {
  --primary-foreground: var(--action-blue-fg);
  --primary-foreground-color: 255 255 255;
  background-color: var(--action-blue) !important;
  color: var(--action-blue-fg) !important;
  border-color: transparent;
  transition: background-color 150ms ease-out, box-shadow 150ms ease-out;

  @media (hover: hover) {
    &:not(:disabled, [disabled], [aria-disabled="true"]):hover {
      background-color: var(--action-blue-hover) !important;
      box-shadow: 0 2px 7px rgb(37 99 235 / 20%);
    }
  }

  &:not(:disabled, [disabled], [aria-disabled="true"]):active {
    background-color: var(--action-blue-active) !important;
    box-shadow: none;
  }

  &:is(:disabled, [disabled], [aria-disabled="true"]) {
    opacity: .55;
    box-shadow: none;
  }

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }
}

.list-card-item__preview .list-card-item__preview-actions button.list-card-item__preview-btn-inner {
  --control-focus: #a9d2ff;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #fff;
}
.list-card-item__preview-btn-inner svg {
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 70%));
}

button[data-act="sw-batch-all"] {
  background-color: #ce4c00 !important;
  color: #fff !important;
  border-color: transparent !important;
  font-weight: 400;
}
@media (hover: hover) {
  button[data-act="sw-batch-all"]:enabled:hover { background-color: #be4500 !important; }
}
button[data-act="sw-batch-all"]:enabled:active { background-color: #a73b00 !important; }
