/* Action presentation only. Existing routes, form semantics and handlers remain
   in their renderers. This file intentionally follows every owner theme sheet. */
@media screen {
  html[data-sl-theme] {
    --sa-focus: #0757a6;
    --sa-focus-underlay: #ffffff;
    --sa-disabled-bg: #e3eaf2;
    --sa-disabled-text: #465b72;
    --sa-disabled-line: #8296ad;
  }

  html[data-sl-theme="dark"] {
    --sa-focus: #8ed2ff;
    --sa-focus-underlay: #111923;
    --sa-disabled-bg: #29374a;
    --sa-disabled-text: #bdcadb;
    --sa-disabled-line: #728ba7;
  }

  html[data-sl-theme] body :where([data-sl-action-kind], .demo-controls button[data-demo-action], .demo-dialog-close-form button[data-demo-action]) {
    --sa-from: #425772;
    --sa-to: #2d3f59;
  }

  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind],
  html[data-sl-theme] body .demo-controls button[data-demo-action],
  html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action] {
    --sa-edge: var(--sa-from);
    appearance: none;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px !important;
    min-width: 44px;
    max-width: 100%;
    padding: 9px 14px !important;
    border: 1px solid var(--sa-edge) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--sa-from), var(--sa-to)) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 750;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    text-decoration: none !important;
    vertical-align: middle;
    text-shadow: 0 1px 1px #080e1999 !important;
    box-shadow: 0 3px 8px #10223920, inset 0 1px 0 #ffffff24 !important;
    cursor: pointer;
    filter: none !important;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  }

  html[data-sl-theme="dark"] body :is(a, button, summary)[data-sl-action-kind],
  html[data-sl-theme="dark"] body .demo-controls button[data-demo-action],
  html[data-sl-theme="dark"] body .demo-dialog-close-form button[data-demo-action] {
    --sa-edge: #91abc6;
    box-shadow: 0 3px 8px #00000035, inset 0 1px 0 #ffffff24 !important;
  }

  html[data-sl-theme] body [data-sl-action-kind="email"] {
    --sa-from: #1d4ed8;
    --sa-to: #173aa8;
  }

  html[data-sl-theme] body :is([data-sl-action-kind="call"], [data-sl-action-kind="create"], [data-sl-action-kind="confirm"]) {
    --sa-from: #117243;
    --sa-to: #075838;
  }

  html[data-sl-theme] body [data-sl-action-kind="archive"],
  html[data-sl-theme] body .demo-controls [data-demo-action="reset"] {
    --sa-from: #8a5a12;
    --sa-to: #6c420b;
  }

  html[data-sl-theme] body [data-sl-action-kind="update"] {
    --sa-from: #4f46c5;
    --sa-to: #3730a3;
  }

  html[data-sl-theme] body :is([data-sl-action-kind="details"], [data-sl-action-kind="view"], [data-sl-action-kind="copy"], [data-sl-action-kind="export"]),
  html[data-sl-theme] body .demo-controls [data-demo-action="guide"] {
    --sa-from: #087482;
    --sa-to: #075c69;
  }

  html[data-sl-theme] body [data-sl-action-kind="delete"] {
    --sa-from: #be2340;
    --sa-to: #931a32;
  }

  html[data-sl-theme] body [data-sl-action-kind="chat"] {
    --sa-from: #8536be;
    --sa-to: #64239e;
  }

  html[data-sl-theme] body [data-sl-action-kind="booking"] {
    --sa-from: #b33f0c;
    --sa-to: #8f3009;
  }

  /* A label may contain an icon, counter or accessible supplemental span. */
  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind] :is(span, strong, b, em, small, i) {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    text-shadow: inherit !important;
  }

  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind]:is(:hover, :active),
  html[data-sl-theme] body .demo-controls button[data-demo-action]:is(:hover, :active),
  html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action]:is(:hover, :active) {
    background: linear-gradient(135deg, var(--sa-to), var(--sa-from)) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    filter: none !important;
  }

  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind]:is([aria-pressed="true"], [aria-expanded="true"]),
  html[data-sl-theme] body .demo-controls button[aria-pressed="true"] {
    box-shadow: inset 0 0 0 2px #ffffffd9, 0 3px 8px #10223924 !important;
  }

  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind]:focus-visible,
  html[data-sl-theme] body .demo-controls button[data-demo-action]:focus-visible,
  html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action]:focus-visible {
    outline: 3px solid var(--sa-focus) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px var(--sa-focus-underlay), 0 3px 8px #10223924 !important;
  }

  /* Native disabled controls and any existing aria-disabled actions stay inert
     according to their original handlers; this rule changes appearance only. */
  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind]:is(:disabled, [aria-disabled="true"]),
  html[data-sl-theme] body .demo-controls button[data-demo-action]:disabled,
  html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action]:disabled {
    background: var(--sa-disabled-bg) !important;
    color: var(--sa-disabled-text) !important;
    -webkit-text-fill-color: var(--sa-disabled-text) !important;
    border-color: var(--sa-disabled-line) !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    cursor: not-allowed;
  }

  /* Native upload pickers remain native inputs; style only their button. */
  html[data-sl-theme] body input[type="file"][data-sl-action-kind]::file-selector-button {
    box-sizing: border-box;
    min-height: 44px;
    padding: 9px 14px !important;
    margin-right: 12px;
    border: 1px solid var(--sa-from) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--sa-from), var(--sa-to)) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font: inherit;
    font-weight: 750;
    text-shadow: 0 1px 1px #080e1999 !important;
    cursor: pointer;
  }

  html[data-sl-theme="dark"] body input[type="file"][data-sl-action-kind]::file-selector-button {
    border-color: #91abc6 !important;
  }

  html[data-sl-theme] body input[type="file"][data-sl-action-kind]:focus-visible {
    outline: 3px solid var(--sa-focus) !important;
    outline-offset: 3px !important;
  }

  html[data-sl-theme] body input[type="file"][data-sl-action-kind]:disabled::file-selector-button {
    background: var(--sa-disabled-bg) !important;
    color: var(--sa-disabled-text) !important;
    -webkit-text-fill-color: var(--sa-disabled-text) !important;
    border-color: var(--sa-disabled-line) !important;
    text-shadow: none !important;
    cursor: not-allowed;
  }

  html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind][hidden],
  html[data-sl-theme] body .demo-controls button[data-demo-action][hidden],
  html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action][hidden] {
    display: none !important;
  }

  /* The classic renderer uses anchor actions. Give those anchors the same
     complete geometry as buttons while retaining the source flex layout. */
  html[data-sl-theme] body .classic-page .asset-actions .asset-btn[data-sl-action-kind] {
    flex: 1 1 104px;
  }

  /* Paired lead actions share a row height when a longer label wraps. */
  html[data-sl-theme] body .lead-page .card-actions {
    align-items: stretch;
  }

  @media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind]:not(:disabled):not([aria-disabled="true"]):not(:focus-visible):hover,
    html[data-sl-theme] body .demo-controls button[data-demo-action]:not(:disabled):not(:focus-visible):hover,
    html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action]:not(:disabled):not(:focus-visible):hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 13px #10223935, inset 0 1px 0 #ffffff30 !important;
    }

    html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind]:not(:disabled):not([aria-disabled="true"]):active,
    html[data-sl-theme] body .demo-controls button[data-demo-action]:not(:disabled):active,
    html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action]:not(:disabled):active {
      transform: translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html[data-sl-theme] body :is(a, button, summary)[data-sl-action-kind],
    html[data-sl-theme] body .demo-controls button[data-demo-action],
    html[data-sl-theme] body .demo-dialog-close-form button[data-demo-action] {
      transition: none !important;
      transform: none !important;
    }
  }
}
