/* Platform controls: black, white, gray and the approved orange only.
   Color properties are enforced here because route/dialog styles load in varying
   orders. Component files still own layout, sizing and visibility. Gold belongs
   only to the explicitly approved .growth-status-stamp. */
:root {
  --xc-action-dark: #303030;
  --xc-action-hover: #474747;
  --xc-action-orange: #99502e;
  --xc-action-orange-hover: #884728;
  --xc-action-soft: #f7eee7;
}
body :is(.button,button.primary,.co-button,.xc-guide-entry,.xc-tour-prev,.xc-tour-next,.sqr-send) {
  --action-bg: #fff;
  --action-fg: var(--xc-action-dark);
  --action-border: #d4d4d4;
  background: var(--action-bg) !important;
  color: var(--action-fg) !important;
  border-color: var(--action-border) !important;
  filter: none !important;
  border-radius: 10px !important;
}
body :is(.button,button.primary,.co-button,.xc-guide-entry,.xc-tour-prev,.xc-tour-next,.sqr-send):hover {
  --action-bg: #f3f3f3;
  --action-border: #a9a9a9;
}
body :is(.button.primary,button.primary,.co-button-dark,.xc-tour-next,.sqr-send) {
  --action-bg: var(--xc-action-orange);
  --action-fg: #fff;
  --action-border: var(--xc-action-orange);
}
body :is(.button.primary,button.primary,.co-button-dark,.xc-tour-next,.sqr-send):hover {
  --action-bg: var(--xc-action-orange-hover);
  --action-border: var(--xc-action-orange-hover);
}
/* Welcome-page entry keeps its original dark fill within the shared rules. */
body .button.button-platform {
  --action-bg: var(--xc-ink, #242424);
  --action-fg: #fff;
  --action-border: var(--xc-ink, #242424);
}
body .button.button-platform:hover {
  --action-bg: var(--xc-action-hover);
  --action-border: var(--xc-action-hover);
}
/* Quiet text actions keep their shape and use the same neutral ink. */
body button.xc-guide-entry { --action-border: var(--xc-action-orange); }
body button.xc-guide-entry:hover {
  --action-bg: var(--xc-action-soft);
  --action-border: var(--xc-action-orange-hover);
}
body :is(.button.text-button,.sq-editor-ai .button,.sq-reader .reply-actions .button) {
  --action-bg: transparent;
  --action-fg: #606060;
  --action-border: transparent;
}
body :is(.button.text-button,.sq-editor-ai .button,.sq-reader .reply-actions .button):hover {
  --action-bg: #f2f2f2;
  --action-fg: #303030;
}
body .button:is(.danger,[aria-pressed=true],[data-active="1"]) {
  --action-bg: var(--xc-action-soft);
  --action-fg: var(--xc-action-orange);
  --action-border: var(--xc-action-orange);
}
body .button:is(.danger,[aria-pressed=true],[data-active="1"]):hover {
  --action-bg: #f0dfd3;
}
body :is(.sq-social-button,.sq-follow,.opc-compare-button)[aria-pressed=true] {
  background: var(--xc-action-soft) !important;
  color: var(--xc-action-orange) !important;
  border-color: var(--xc-action-orange) !important;
}
body :is(button,.button,.co-button):is(:disabled,[aria-disabled=true]) {
  --action-bg: #e8e8e8 !important;
  --action-fg: #777 !important;
  --action-border: #d0d0d0 !important;
  background: var(--action-bg) !important;
  color: var(--action-fg) !important;
  border-color: var(--action-border) !important;
  opacity: 1;
  box-shadow: none;
  filter: none !important;
  cursor: not-allowed;
}
body :is(button,.button,.co-button,[role=button]):focus-visible {
  outline: 2px solid var(--xc-action-orange) !important;
  outline-offset: 3px;
}
/* Search is one control group: the shell owns its outline, inner actions stay quiet.
   Keep action borders transparent at their original width so hover never shifts layout. */
body :is(.search-bar,.channel-search,.discovery-search) {
  --xc-search-radius: 18px;
  --xc-search-inset: 8px;
  border: 0 !important;
  border-radius: var(--xc-search-radius) !important;
  padding: var(--xc-search-inset) !important;
  box-shadow: inset 0 0 0 0.5px var(--xc-line,#ddd) !important;
}
/* Current channel toolbars keep their compact, approved seven-pixel corners. */
body :is(.channel-search,.discovery-search) {
  --xc-search-radius: 7px;
  --xc-search-inset: 3px;
}
body :is(.search-bar,.channel-search,.discovery-search):focus-within {
  border-color: transparent;
  box-shadow: inset 0 0 0 0.5px var(--xc-action-orange) !important;
}
body :is(.search-bar,.channel-search,.discovery-search) :is(input,.button) {
  border-radius: calc(var(--xc-search-radius) - var(--xc-search-inset)) !important;
}
body :is(.search-bar,.channel-search,.discovery-search) .button:not(:disabled):not([aria-disabled=true]) {
  --action-bg: transparent !important;
  --action-fg: var(--xc-action-dark) !important;
  --action-border: transparent !important;
  box-shadow: none;
}
body :is(.search-bar,.channel-search,.discovery-search) .button:not(:disabled):not([aria-disabled=true]):hover { --action-bg: #f3f3f3 !important; }
body :is(.search-bar,.channel-search,.discovery-search) input:focus { outline: none; }
body :is(.search-bar,.channel-search,.discovery-search) input:focus-visible {
  outline: 2px solid var(--xc-action-orange);
  outline-offset: -2px;
}
