/* R705 UI theme recovery.
   Root cause: r119-website-ui.css intentionally forces the whole document to its
   dark editorial palette for BOTH light and dark themes. The original r120/r122
   JavaScript used to add body.r120-rice-ui, which activates the light-mode repair
   rules in r122-ui-completion.css. Later performance builds removed that JavaScript,
   so the body lost r120-rice-ui while the dark r119 color remained active. That made
   white text inherit into light cards and caused the washed-out/gray appearance.

   This file restores the missing UI state without re-enabling the heavy observers,
   pointer effects, ambient animation, or repeated mutation work from the retired UI
   scripts. */

/* Never leave route/reveal animations in a half-transparent frame. */
.workflow-tab-page,
.workflow-tab-page *,
.global-digital-controls,
.global-digital-controls *,
[data-bx-reveal],
.luxury-reveal,
.fx-surface {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}
.workflow-tab-page,
[data-bx-reveal],
.luxury-reveal {
  transform: none !important;
  animation: none !important;
}

/* The command overlay must never dim the workspace unless it is explicitly open. */
.r119-command-overlay:not(.open) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Stable, readable light theme. These rules are intentionally scoped to the digital
   setup surfaces that were visibly broken in the screenshots/PDF. */
html[data-theme="light"] body.r120-rice-ui {
  color: #1d1725 !important;
}
html[data-theme="light"] body.r120-rice-ui .workflow-tab-page.digital,
html[data-theme="light"] body.r120-rice-ui .global-digital-controls,
html[data-theme="light"] body.r120-rice-ui .image-quality-choice-panel,
html[data-theme="light"] body.r120-rice-ui .digital-relationship-panel,
html[data-theme="light"] body.r120-rice-ui .digital-prompt-family-selector,
html[data-theme="light"] body.r120-rice-ui .digital-version-slider,
html[data-theme="light"] body.r120-rice-ui .digital-config-grid,
html[data-theme="light"] body.r120-rice-ui .workflow-page-hero,
html[data-theme="light"] body.r120-rice-ui .workflow-page-feature-grid > div {
  color: #1d1725 !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="light"] body.r120-rice-ui .global-digital-controls {
  background: rgba(245, 251, 249, .96) !important;
  border-color: rgba(14, 165, 161, .22) !important;
}
html[data-theme="light"] body.r120-rice-ui .image-quality-choice-panel,
html[data-theme="light"] body.r120-rice-ui .digital-prompt-family-selector,
html[data-theme="light"] body.r120-rice-ui .digital-version-slider {
  background: rgba(255, 255, 255, .96) !important;
  border-color: rgba(102, 84, 232, .22) !important;
}
html[data-theme="light"] body.r120-rice-ui .digital-relationship-panel {
  background: linear-gradient(145deg, rgba(249,247,240,.98), rgba(238,243,235,.96)) !important;
  border-color: rgba(87, 106, 82, .28) !important;
}

/* Explicit text colors prevent white inheritance from r119. */
html[data-theme="light"] body.r120-rice-ui :is(
  .global-digital-heading,
  .image-quality-choice-heading,
  .digital-relationship-heading,
  .digital-prompt-family-heading,
  .digital-version-slider-heading,
  .workflow-page-hero,
  .digital-config-grid
) :is(strong, h1, h2, h3, h4, label, summary) {
  color: #1d1725 !important;
  -webkit-text-fill-color: #1d1725 !important;
}
html[data-theme="light"] body.r120-rice-ui :is(
  .global-digital-heading,
  .image-quality-choice-heading,
  .digital-relationship-heading,
  .digital-prompt-family-heading,
  .digital-version-slider-heading,
  .workflow-page-hero,
  .digital-config-grid
) :is(p, small, .help, .muted) {
  color: #696273 !important;
  -webkit-text-fill-color: #696273 !important;
}

/* Keep the intentionally dark product-direction cards readable. */
html[data-theme="light"] body.r120-rice-ui .digital-relationship-option,
html[data-theme="light"] body.r120-rice-ui .digital-relationship-option * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Image-quality buttons are light cards, so they must never inherit white. */
html[data-theme="light"] body.r120-rice-ui .image-quality-choice-button {
  color: #1d1725 !important;
  -webkit-text-fill-color: #1d1725 !important;
  background: #fff !important;
}
html[data-theme="light"] body.r120-rice-ui .image-quality-choice-button small {
  color: #696273 !important;
  -webkit-text-fill-color: #696273 !important;
}
html[data-theme="light"] body.r120-rice-ui .image-quality-choice-button.active .image-quality-choice-icon,
html[data-theme="light"] body.r120-rice-ui .image-quality-choice-button.active .image-quality-choice-check,
html[data-theme="light"] body.r120-rice-ui .image-quality-current-pill {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Dark mode remains genuinely dark and readable instead of mixing light surfaces
   with inherited dark text. */
html[data-theme="dark"] body.r120-rice-ui .global-digital-controls,
html[data-theme="dark"] body.r120-rice-ui .image-quality-choice-panel,
html[data-theme="dark"] body.r120-rice-ui .digital-relationship-panel,
html[data-theme="dark"] body.r120-rice-ui .digital-prompt-family-selector,
html[data-theme="dark"] body.r120-rice-ui .digital-version-slider {
  color: #f6f5fb !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme="dark"] body.r120-rice-ui :is(
  .global-digital-heading,
  .image-quality-choice-heading,
  .digital-relationship-heading,
  .digital-prompt-family-heading,
  .digital-version-slider-heading
) :is(strong, h1, h2, h3, h4, label, summary) {
  color: #f6f5fb !important;
  -webkit-text-fill-color: #f6f5fb !important;
}
html[data-theme="dark"] body.r120-rice-ui :is(
  .global-digital-heading,
  .image-quality-choice-heading,
  .digital-relationship-heading,
  .digital-prompt-family-heading,
  .digital-version-slider-heading
) :is(p, small, .help, .muted) {
  color: #b8b3c1 !important;
  -webkit-text-fill-color: #b8b3c1 !important;
}

/* Do not allow restoration/performance classes to visually dim the whole page. */
html.r701-restoring body,
body.r696-runtime-lite,
html.r696-runtime-lite body {
  opacity: 1 !important;
  filter: none !important;
}
