/* 3088: default-on button affordances. Loaded after Tailwind and page CSS.
 * Colour declarations use tokens. Important paint beats the older 2956 fill
 * guard, Bootstrap utilities and asynchronously inserted CDN preflight.
 * Component-owned exemptions match qa.button_style.EXEMPT_SELECTOR exactly.
 * Native hidden/display rules and all click/submit semantics are untouched.
 */
/* @sc-tokens:start */
:root, .keep-light {
  --sc-button-secondary-bg: var(--scott-surface);
  --sc-button-secondary-ink: var(--scott-primary);
  --sc-button-secondary-border: #9aa5b1;
  --sc-button-secondary-hover: var(--scott-primary-light);
  --sc-button-secondary-hover-border: var(--scott-primary);
  --sc-button-focus: #93c5fd;
  --sc-button-min-height: 44px;
  /* Existing component disabled opacity; visual reference verification pending. */
  --sc-button-disabled-opacity: .5;
}
[data-theme="dark"] {
  --sc-button-secondary-bg: var(--scott-surface);
  --sc-button-secondary-ink: var(--scott-link-dark);
  --sc-button-secondary-border: var(--scott-border-strong);
  --sc-button-secondary-hover: var(--scott-surface-2);
  --sc-button-secondary-hover-border: var(--scott-link-dark);
}
[data-theme="dark"] .keep-light {
  --sc-button-secondary-ink: var(--scott-primary);
  --sc-button-secondary-border: #9aa5b1;
  --sc-button-secondary-hover: var(--scott-primary-light);
  --sc-button-secondary-hover-border: var(--scott-primary);
}
/* @sc-tokens:end */

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)) {
  --sc-button-bg: var(--sc-button-secondary-bg);
  --sc-button-ink: var(--sc-button-secondary-ink);
  --sc-button-border: var(--sc-button-secondary-border);
  --sc-button-hover: var(--sc-button-secondary-hover);
  --sc-button-hover-border: var(--sc-button-secondary-hover-border);
  box-sizing: border-box;
  min-height: var(--sc-button-min-height) !important;
  padding: var(--scott-space-3) var(--scott-space-4) !important;
  border-radius: var(--scott-radius-sm) !important;
  font-family: var(--scott-font-sans) !important;
  font-size: var(--scott-text-base) !important;
  font-weight: var(--scott-weight-semibold) !important;
  line-height: 1 !important;
  cursor: pointer;
  text-decoration: none !important;
}

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):is(.btn-primary, .btn-success, .btn-info, .btn-dark, .scott-btn--primary, .sc-onboarding-tour__btn--primary, .sc-ask-scott__submit, .sc-bulk-bar-apply) {
  --sc-button-bg: var(--scott-primary);
  --sc-button-ink: var(--scott-on-primary);
  --sc-button-border: var(--scott-primary);
  --sc-button-hover: var(--scott-primary-hover);
  --sc-button-hover-border: var(--scott-primary-hover);
}

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):is(.btn-danger, .btn-outline-danger, .scott-btn--destructive, .scott-btn--danger) {
  --sc-button-bg: var(--scott-error);
  --sc-button-ink: var(--scott-on-error);
  --sc-button-border: var(--scott-error);
  --sc-button-hover: var(--scott-error-hover);
  --sc-button-hover-border: var(--scott-error-hover);
}

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):not(:where([class^="bg-"]:not(.btn, .scott-btn, [class^="btn-"], [class*=" btn-"], .scott-btn--primary, .scott-btn--secondary, .scott-btn--danger, .scott-btn--destructive), [class*=" bg-"]:not(.btn, .scott-btn, [class^="btn-"], [class*=" btn-"], .scott-btn--primary, .scott-btn--secondary, .scott-btn--danger, .scott-btn--destructive))) {
  background-color: var(--sc-button-bg) !important;
  background-image: none !important;
  color: var(--sc-button-ink) !important;
  border: 1px solid var(--sc-button-border) !important;
  box-shadow: none;
}

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):not(:where([class^="bg-"]:not(.btn, .scott-btn, [class^="btn-"], [class*=" btn-"], .scott-btn--primary, .scott-btn--secondary, .scott-btn--danger, .scott-btn--destructive), [class*=" bg-"]:not(.btn, .scott-btn, [class^="btn-"], [class*=" btn-"], .scott-btn--primary, .scott-btn--secondary, .scott-btn--danger, .scott-btn--destructive))):hover:not(:disabled, [aria-disabled="true"], .disabled) {
  background-color: var(--sc-button-hover) !important;
  border-color: var(--sc-button-hover-border) !important;
  color: var(--sc-button-ink) !important;
  filter: none !important;
}

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):focus-visible {
  outline: 3px solid var(--sc-button-focus) !important;
  outline-offset: 2px;
  box-shadow: none !important;
}

:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):is(:disabled, [aria-disabled="true"], .disabled) {
  opacity: var(--sc-button-disabled-opacity) !important;
  cursor: not-allowed;
  filter: none !important;
}


/* Button-role/class anchors need a real box for the minimum touch target. */
:root body[data-sc-button-style] :is(button, input[type="submit"], input[type="button"], input[type="reset"], a[role="button"], .btn, .scott-btn, a[class^="btn-"], a[class*=" btn-"]):not(:where([data-sc-button-exempt], .sc-button-exempt, [role="tab"], [data-bs-toggle="tab"], [data-bs-toggle="pill"], .btn-close, .theme-toggle, .sr2-sb-collapse, .sr2-header-menu, .sr2-sb-item, .sr2-status-pill__btn, .sc-pin-toggle, .sc-palette-trigger, .sc-mega-menu-trigger, .sc-mega-menu__close, .sc-drawer__close, .sc-fleet__trigger, .sc-pilot-help, .sc-pilot-button, .sc-ask-scott__voice-btn, .sc-bulk-bar-clear, .sc-fab-btn, .sc-ask-scott-trigger, .sc-pw-toggle)):where(a:not([hidden], .hidden)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--scott-space-2);
  vertical-align: middle;
}
