/**
 * @file
 * Generic foreground color rules for SDC components.
 *
 * Transparent text blocks (.text-wrapper) inherit color from their placement
 * context (section, container, column, etc.).
 *
 * Nested containers establish a local color context — text inside them inherits
 * from the nearest component region, not from distant theme element selectors.
 */

/* Transparent text component: inherit from parent section/container */
.text-wrapper,
.text-wrapper [data-sdc-field="text"],
.text-wrapper [data-sdc-editable="true"].ck.ck-editor__editable_inline,
.text-wrapper :is(h1, h2, h3, h4, h5, h6, p, li, ul, ol, dl, dt, dd, blockquote) {
  color: inherit;
}

/* Lists: CKEditor sets its own list/marker colors — always follow parent foreground */
.text-wrapper [data-sdc-field="text"] :is(ul, ol, li),
.text-wrapper [data-sdc-editable="true"] :is(ul, ol, li),
[data-sdc-editable="true"] :is(ul, ol, li) {
  color: inherit;
}

/* Nested layout/card components: local foreground context */
[data-nested-container="true"] :is(h1, h2, h3, h4, h5, h6, p, li, ul, ol, dl, dt, dd, blockquote) {
  color: inherit;
}

[data-nested-container="true"] :is(ul, ol, li) {
  color: inherit;
}
