/* Shared action hierarchy. Payment decisions keep their separate state tokens. */
:root {
  --action-primary: #155b3f;
  --action-hover: #104b34;
  --action-active: #0c3c2a;
  --action-ink: #fffdf8;
  --action-disabled: #e2e7dc;
  --action-disabled-ink: #59645d;
  --action-height: 2.875rem;
  --action-radius: .5rem;
  --action-padding-inline: 1.125rem;
  --action-font-size: .9375rem;
}
:root[data-theme="dark"] {
  --action-primary: #c8e584;
  --action-hover: #d6efa0;
  --action-active: #b6d475;
  --action-ink: #17220c;
  --action-disabled: #232520;
  --action-disabled-ink: #a2ab9e;
}
/* The real public shells give shared controls precedence over page-specific skins. */
:root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button, .ws-button, .dw-button, .we-button),
:root[data-theme] #haltseal-site .pill {
  position: relative;
  min-height: var(--action-height);
  max-width: 100%;
  padding: .75rem var(--action-padding-inline);
  border-radius: var(--action-radius);
  font-family: var(--font-sans);
  font-size: var(--action-font-size);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
/* Compact navigation leaves room for a full label when text is enlarged. */
@media (max-width: 26rem) {
  .site-header [data-auth-cta] { --action-padding-inline: .625rem; --action-font-size: .875rem; }
}
@container (max-width: 20rem) {
  .site-header [data-auth-cta] { --action-padding-inline: .625rem; --action-font-size: .875rem; }
}
.dw { --action-secondary-ink: var(--dw-ink); --action-secondary-hover: var(--dw-tint); }
/* The support action stays readable beside both homepage themes. */
.hana-launcher, #haltseal-site .hana-launcher {
  background: var(--surface);
  color: var(--ink-strong);
  border-color: var(--rule-strong);
}
/* Explicit theme and component selectors also cover the historical home shell. */
:root[data-theme] :is(body, #haltseal-site, #main-content) .button.button--primary,
:root[data-theme] :is(body, #haltseal-site, #main-content) .ws-button:not(.ws-button--quiet),
:root[data-theme] :is(body, #haltseal-site, #main-content) .dw-button:not(.dw-button--secondary),
:root[data-theme] :is(body, #haltseal-site, #main-content) .we-button:not(.we-button--quiet),
:root[data-theme] body:not([data-page="home"]) .header-commercial,
:root[data-theme] #haltseal-site .pill:not(.outline),
:root[data-theme] #haltseal-site .header-commercial {
  --action-feedback-ink: var(--action-ink);
  --action-label: var(--action-ink);
  background: var(--action-primary);
  border: 1px solid var(--action-primary);
  color: var(--action-ink);
}
:root[data-theme] :is(body, #haltseal-site, #main-content) .button:is(.button--secondary, .button--quiet),
:root[data-theme] :is(body, #haltseal-site, #main-content) .ws-button--quiet,
:root[data-theme] :is(body, #haltseal-site, #main-content) .dw-button--secondary,
:root[data-theme] :is(body, #haltseal-site, #main-content) .we-button--quiet,
:root[data-theme] #haltseal-site .pill.outline {
  --action-feedback-ink: var(--action-secondary-ink, var(--ink-strong));
  --action-label: var(--action-secondary-ink, var(--ink-strong));
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--action-secondary-ink, var(--ink-strong));
}
/* The legacy demo declares important foregrounds. Keep that adapter state-aware. */
:root[data-theme] .dw .dw-button { color: var(--action-label, var(--action-ink)) !important; }
@media (hover: hover) {
  :root[data-theme] :is(body, #haltseal-site, #main-content) .button.button--primary:not(:disabled):not([aria-disabled="true"]):hover,
  :root[data-theme] :is(body, #haltseal-site, #main-content) .ws-button:not(.ws-button--quiet):not(:disabled):not([aria-disabled="true"]):hover,
  :root[data-theme] :is(body, #haltseal-site, #main-content) .dw-button:not(.dw-button--secondary):not(:disabled):not([aria-disabled="true"]):hover,
  :root[data-theme] :is(body, #haltseal-site, #main-content) .we-button:not(.we-button--quiet):not(:disabled):not([aria-disabled="true"]):hover,
  :root[data-theme] body:not([data-page="home"]) .header-commercial:hover,
  :root[data-theme] #haltseal-site .pill:not(.outline):hover,
  :root[data-theme] #haltseal-site .header-commercial:hover {
    background: var(--action-hover);
    border-color: var(--action-hover);
    color: var(--action-ink);
  }
  :root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button--secondary,.button--quiet,.ws-button--quiet,.dw-button--secondary,.we-button--quiet):not(:disabled):not([aria-disabled="true"]):hover,
  :root[data-theme] #haltseal-site .pill.outline:hover {
    background: var(--action-secondary-hover, var(--surface-raised));
    border-color: var(--ink-subtle);
    color: var(--action-secondary-ink, var(--ink-strong));
  }
}
:root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button.button--primary,.ws-button:not(.ws-button--quiet),.dw-button:not(.dw-button--secondary),.we-button:not(.we-button--quiet)):not(:disabled):not([aria-disabled="true"]):active,
:root[data-theme] body:not([data-page="home"]) .header-commercial:active,
:root[data-theme] #haltseal-site .pill:not(.outline):active {
  background: var(--action-active);
  border-color: var(--action-active);
  color: var(--action-ink);
}
:root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button):focus-visible,
:root[data-theme] #haltseal-site .pill:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
:root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button):is(:disabled,[aria-disabled="true"]):not([data-action-pending]),
:root[data-theme] #haltseal-site .pill:is(:disabled,[aria-disabled="true"]):not([data-action-pending]) {
  background: var(--action-disabled);
  --action-label: var(--action-disabled-ink);
  border-color: var(--rule-strong);
  color: var(--action-disabled-ink);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}
/* The accessible label and layout stay in place while existing request code is busy. */
:root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button)[data-action-pending],
:root[data-theme] #haltseal-site .pill[data-action-pending] {
  color: transparent;
  --action-label: transparent;
  opacity: 1;
  cursor: progress;
  transition: none;
}
[data-action-pending] > * { opacity: 0; }
[data-action-pending]::after {
  position: absolute;
  inset: 0;
  width: 1rem;
  height: 1rem;
  margin: auto;
  border: 2px solid var(--action-feedback-ink, var(--ink-strong));
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: action-progress 700ms linear infinite;
}
@keyframes action-progress { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  :root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button),
  :root[data-theme] #haltseal-site .pill { transition: none; }
  [data-action-pending]::after { animation: none; }
}
@media (forced-colors: active) {
  :root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button),
  :root[data-theme] body:not([data-page="home"]) .header-commercial,
  :root[data-theme] #haltseal-site .pill {
    background: ButtonFace;
    border-color: ButtonText;
    color: ButtonText;
    --action-label: ButtonText;
    forced-color-adjust: auto;
  }
  :root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button):is(:disabled,[aria-disabled="true"]):not([data-action-pending]) {
    border-color: GrayText;
    color: GrayText;
    --action-label: GrayText;
  }
  :root[data-theme] :is(body, #haltseal-site, #main-content) :is(.button,.ws-button,.dw-button,.we-button)[data-action-pending],
  :root[data-theme] #haltseal-site .pill[data-action-pending] { color: transparent; --action-label: transparent; }
  [data-action-pending]::after { border-color: ButtonText; border-right-color: transparent; }
}
