/* The homepage and public WordPress templates share this role palette. */
@layer wn-public-buttons {
  html[data-wn-theme="dark"] {
    --wn-primary-label: #ffaefa;
    --wn-secondary-label: #ebbaea;
  }

  /* Unmarked utility controls are secondary. Main calls to action carry the
     button or primary class, or submit the current form. */
  html[data-wn-theme="dark"] :is(button, input[type="button"], input[type="reset"], [role="button"],
      .edition-secondary, .wn-service-secondary, .sandbox-action[data-retry]) {
    --wn-action-label: var(--wn-secondary-label);
  }
  html[data-wn-theme="dark"] :is(.button, .studio-primary, .account-primary, .wn-service-button,
      .wn-journal-shop-action, .sandbox-action[data-new], .demo-invitation, button[type="submit"],
      input[type="submit"], input[type="image"], .wp-block-button__link, .wp-element-button) {
    --wn-action-label: var(--wn-primary-label);
  }
  html[data-wn-theme="dark"] :is(.button,button,input,.wp-block-button__link):is(.quiet,.subtle,.secondary,.edition-secondary,.is-style-outline),
  html[data-wn-theme="dark"] .is-style-outline .wp-block-button__link {
    --wn-action-label: var(--wn-secondary-label);
  }
  html[data-wn-theme="dark"] :is(button, input:is([type="submit"],[type="image"],[type="button"],[type="reset"]),
      [role="button"], .button, .studio-primary, .account-primary, .edition-secondary, .wn-service-button,
      .wn-service-secondary, .wn-journal-shop-action, .sandbox-action, .demo-invitation,
      .wp-block-button__link, .wp-element-button):not(:disabled,[aria-disabled="true"],[data-wn-theme="light"] *) {
    color: var(--wn-action-label, var(--wn-secondary-label)) !important;
  }
  html[data-wn-theme="dark"] :is(.button,.studio-primary,.account-primary,.edition-secondary,button,
      .wn-service-button,.wn-service-secondary,.sandbox-action,.wp-block-button__link,.wp-element-button)
      :is([data-brand-word],[data-icon-label],.workspace-label,.wn-icon):not([data-wn-theme="light"] *) {
    color: inherit !important;
  }
  html[data-wn-theme="dark"] #scratch-copy:enabled:is(:hover,:focus-visible) {
    color: #ffc6fc !important;
  }
}

/* Both public mastheads paint the dropdown through the same fill variable. */
@media screen and (min-width: 701px) and (forced-colors: none) {
  html[data-wn-theme="dark"] .wn-dd-panel.is-open {
    --menu-fill: linear-gradient(90deg, #203636, #167A73 calc(100% - 32px),
      rgb(22 122 115 / 85%) calc(100% - 24px), rgb(22 122 115 / 15%) calc(100% - 8px),
      rgb(22 122 115 / 0%) 100%);
  }
}
