/* Shared example copy only. Keep entered values, authored content, metadata,
   warnings, primary labels, media and printed output in their existing colors.
   The important layer handles older component placeholder overrides without
   rewriting those rules or relying on a growing list of input IDs. */
@layer orumup-example-text {
  @media screen {
    :root {
      --oreumup-example-on-light: #5e6e65;
      --oreumup-example-on-dark: #9bad9f;
      --oreumup-example-ink: var(--oreumup-example-on-light);
    }

    /* Only pages with the full screen palette follow intermediate brightness.
       Independent storefronts keep their original light surfaces. */
    html[data-oreumup-example-palette="adaptive"][data-oreumup-theme="dark"] {
      --oreumup-example-ink: var(--oreumup-example-on-dark);
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="10"],
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="20"] {
      --oreumup-example-ink: #9bad9f;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="30"] {
      --oreumup-example-ink: #c1cdc4;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="40"] {
      --oreumup-example-ink: #eff2ef;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="50"] {
      --oreumup-example-ink: #080909;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="60"] {
      --oreumup-example-ink: #272c28;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="70"] {
      --oreumup-example-ink: #3b423c;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="80"] {
      --oreumup-example-ink: #4b544d;
    }
    html[data-oreumup-example-palette="adaptive"][data-oreumup-tone="90"] {
      --oreumup-example-ink: #5b655d;
    }

    :is(input, textarea)[placeholder]::placeholder {
      color: var(--oreumup-example-local, var(--oreumup-example-ink)) !important;
      opacity: 1 !important;
    }

    /* Non-button helper copy only: leave card and button captions at their original colors. */
    :is(
      .shortcut-hint,
      .plus-library-head small,
      .orumup-ai-help-text,
      .orumup-ai-panel-copy small,
      .collaboration-intro,
      .collaboration-duration,
      #sameScreenHelp,
      #requestDialog .dialog-note,
      html[data-oreumup-ui-a="customer"] .import-copy p
    ) {
      color: var(--oreumup-example-local, var(--oreumup-example-ink)) !important;
    }

    /* These AI examples keep a fixed green surface at every intermediate tone. */
    html[data-oreumup-theme="dark"] .orumup-ai-help-text {
      --oreumup-example-local: var(--oreumup-example-on-dark);
    }
    html[data-oreumup-theme="dark"]:not([data-oreumup-example-palette="adaptive"])
      .orumup-ai-panel,
    html[data-oreumup-theme="dark"][data-oreumup-dark-page] .orumup-ai-panel,
    html[data-oreumup-theme="dark"][data-oreumup-ui-a="customer"] .orumup-ai-panel,
    html[data-oreumup-theme="dark"] body.trade-fresh-ui .orumup-ai-panel {
      --oreumup-example-local: var(--oreumup-example-on-dark);
    }
    /* Customer UI-A recolors the input itself, while the AI caption stays on
       its original dark panel. Use each element's actual surface palette. */
    html[data-oreumup-theme="dark"][data-oreumup-ui-a="customer"]
      .orumup-ai-panel :is(input, textarea) {
      --oreumup-example-local: var(--oreumup-example-ink);
    }

    .atlas-sub {
      color: var(--oreumup-example-on-light) !important;
    }
  }

  /* These independent screens follow the operating system, including when
     the device-local app theme is light. Limit the override to their surfaces. */
  @media screen and (prefers-color-scheme: dark) {
    :is(
      .compose[aria-label="공통업무 등록"],
      section.compose > details > form#createForm,
      form#requestForm > textarea#command,
      #board.board,
      #dotWorkboxForm,
      #dotWorkboxList,
      #sameScreenHelp,
      label[for="ownerPin"] > #ownerPin,
      #advancedManagement,
      .oauth-card
    ) {
      --oreumup-example-local: var(--oreumup-example-on-dark);
    }
  }
}
