/* R123 light-mode contrast repair for ONLY the button groups shown by the user.
   Exact IDs and anchored containers intentionally outrank the older global
   light-theme button rule that forced white button surfaces. */


/* Repair the underlying light-theme primary-button rule across the studio.
   This only changes primary action buttons that the older theme made white
   while leaving navigation, theme controls, secondary, ghost, and danger
   controls on their existing styles. */
html[data-theme="light"] body.r120-rice-ui button:not(.secondary):not(.ghost):not(.danger):not(.nav-item):not(.rail-logo):not(.rail-create):not(.rail-footer-button):not(.premium-theme-switcher button):not(.r119-dock-button):not(.r120-notification):not(.r122-home-button):not(.r119-command-trigger),
body.light.r120-rice-ui button:not(.secondary):not(.ghost):not(.danger):not(.nav-item):not(.rail-logo):not(.rail-create):not(.rail-footer-button):not(.premium-theme-switcher button):not(.r119-dock-button):not(.r120-notification):not(.r122-home-button):not(.r119-command-trigger) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #111111 !important;
  background-color: #111111 !important;
  background-image: none !important;
  border-color: #111111 !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.r120-rice-ui button:not(.secondary):not(.ghost):not(.danger):not(.nav-item):not(.rail-logo):not(.rail-create):not(.rail-footer-button):not(.premium-theme-switcher button):not(.r119-dock-button):not(.r120-notification):not(.r122-home-button):not(.r119-command-trigger) *,
body.light.r120-rice-ui button:not(.secondary):not(.ghost):not(.danger):not(.nav-item):not(.rail-logo):not(.rail-create):not(.rail-footer-button):not(.premium-theme-switcher button):not(.r119-dock-button):not(.r120-notification):not(.r122-home-button):not(.r119-command-trigger) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.r120-rice-ui :is(
  #luxuryStartAutomation,
  #luxuryViewResults,
  #automationPickButton,
  #automationRunButton,
  #automationContinueButton,
  #openBatchResultsButton,
  #selectDigitalSamePromptSetButton,
  #selectDigitalRelatedPromptSetButton,
  #showPriorProductHistory,
  #showBatchProductResults
),
body.light.r120-rice-ui :is(
  #luxuryStartAutomation,
  #luxuryViewResults,
  #automationPickButton,
  #automationRunButton,
  #automationContinueButton,
  #openBatchResultsButton,
  #selectDigitalSamePromptSetButton,
  #selectDigitalRelatedPromptSetButton,
  #showPriorProductHistory,
  #showBatchProductResults
),
html[data-theme="light"] body.r120-rice-ui #dashboardHome .r123-dashboard-record-actions > button,
body.light.r120-rice-ui #dashboardHome .r123-dashboard-record-actions > button,
html[data-theme="light"] body.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-approve-candidate],
html[data-theme="light"] body.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-decline-candidate],
body.light.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-approve-candidate],
body.light.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-decline-candidate] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #111111 !important;
  background-color: #111111 !important;
  background-image: none !important;
  border-color: #111111 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] body.r120-rice-ui :is(
  #luxuryStartAutomation,
  #luxuryViewResults,
  #automationPickButton,
  #automationRunButton,
  #automationContinueButton,
  #openBatchResultsButton,
  #selectDigitalSamePromptSetButton,
  #selectDigitalRelatedPromptSetButton,
  #showPriorProductHistory,
  #showBatchProductResults
) *,
body.light.r120-rice-ui :is(
  #luxuryStartAutomation,
  #luxuryViewResults,
  #automationPickButton,
  #automationRunButton,
  #automationContinueButton,
  #openBatchResultsButton,
  #selectDigitalSamePromptSetButton,
  #selectDigitalRelatedPromptSetButton,
  #showPriorProductHistory,
  #showBatchProductResults
) *,
html[data-theme="light"] body.r120-rice-ui #dashboardHome .r123-dashboard-record-actions > button *,
body.light.r120-rice-ui #dashboardHome .r123-dashboard-record-actions > button *,
html[data-theme="light"] body.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-approve-candidate] *,
html[data-theme="light"] body.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-decline-candidate] *,
body.light.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-approve-candidate] *,
body.light.r120-rice-ui #automationApprovalList .approval-product-actions > button[data-decline-candidate] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

/* Keep every state black in light mode, including the disabled Run button. */
html[data-theme="light"] body.r120-rice-ui :is(
  #luxuryStartAutomation,
  #luxuryViewResults,
  #automationPickButton,
  #automationRunButton,
  #automationContinueButton,
  #openBatchResultsButton,
  #selectDigitalSamePromptSetButton,
  #selectDigitalRelatedPromptSetButton,
  #showPriorProductHistory,
  #showBatchProductResults
):is(:hover, :focus-visible, :active, :disabled, .active),
body.light.r120-rice-ui :is(
  #luxuryStartAutomation,
  #luxuryViewResults,
  #automationPickButton,
  #automationRunButton,
  #automationContinueButton,
  #openBatchResultsButton,
  #selectDigitalSamePromptSetButton,
  #selectDigitalRelatedPromptSetButton,
  #showPriorProductHistory,
  #showBatchProductResults
):is(:hover, :focus-visible, :active, :disabled, .active),
html[data-theme="light"] body.r120-rice-ui #dashboardHome .r123-dashboard-record-actions > button:is(:hover, :focus-visible, :active),
body.light.r120-rice-ui #dashboardHome .r123-dashboard-record-actions > button:is(:hover, :focus-visible, :active),
html[data-theme="light"] body.r120-rice-ui #automationApprovalList .approval-product-actions > button:is([data-approve-candidate], [data-decline-candidate]):is(:hover, :focus-visible, :active, :disabled),
body.light.r120-rice-ui #automationApprovalList .approval-product-actions > button:is([data-approve-candidate], [data-decline-candidate]):is(:hover, :focus-visible, :active, :disabled) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #111111 !important;
  background-color: #111111 !important;
  background-image: none !important;
  border-color: #111111 !important;
  opacity: 1 !important;
}

/* R123 final all-page light-mode button pass.
   Covers the remaining secondary, ghost, danger, dynamic history, digital,
   physical, variation, research, extraction, SEO, image, and deployment
   actions that older theme layers could still leave white or transparent.
   Only workspace/dashboard buttons and workspace button-style links change. */
html[data-theme="light"] body.r120-rice-ui :is(#dashboardHome, .layout main, .layout aside) button,
body.light.r120-rice-ui :is(#dashboardHome, .layout main, .layout aside) button,
html[data-theme="light"] body.r120-rice-ui .layout :is(main, aside) :is(a.button, a.button-link, a.secondary, a.ghost, a.danger),
body.light.r120-rice-ui .layout :is(main, aside) :is(a.button, a.button-link, a.secondary, a.ghost, a.danger) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #111111 !important;
  background-color: #111111 !important;
  background-image: none !important;
  border-color: #111111 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] body.r120-rice-ui :is(#dashboardHome, .layout main, .layout aside) button *,
body.light.r120-rice-ui :is(#dashboardHome, .layout main, .layout aside) button *,
html[data-theme="light"] body.r120-rice-ui .layout :is(main, aside) :is(a.button, a.button-link, a.secondary, a.ghost, a.danger) *,
body.light.r120-rice-ui .layout :is(main, aside) :is(a.button, a.button-link, a.secondary, a.ghost, a.danger) * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* Keep the black/white treatment through every interaction and disabled state. */
html[data-theme="light"] body.r120-rice-ui :is(#dashboardHome, .layout main, .layout aside) button:is(:hover, :focus, :focus-visible, :active, :disabled, .active, [aria-pressed="true"], [aria-selected="true"]),
body.light.r120-rice-ui :is(#dashboardHome, .layout main, .layout aside) button:is(:hover, :focus, :focus-visible, :active, :disabled, .active, [aria-pressed="true"], [aria-selected="true"]),
html[data-theme="light"] body.r120-rice-ui .layout :is(main, aside) :is(a.button, a.button-link, a.secondary, a.ghost, a.danger):is(:hover, :focus, :focus-visible, :active, .active),
body.light.r120-rice-ui .layout :is(main, aside) :is(a.button, a.button-link, a.secondary, a.ghost, a.danger):is(:hover, :focus, :focus-visible, :active, .active) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #111111 !important;
  background-color: #111111 !important;
  background-image: none !important;
  border-color: #111111 !important;
  opacity: 1 !important;
}
