/* Explicit Gutenberg choices always win over the theme's editorial defaults. */
:where(.prose, .editor-styles-wrapper) .has-text-align-left { text-align: left !important; }
:where(.prose, .editor-styles-wrapper) .has-text-align-center { text-align: center !important; }
:where(.prose, .editor-styles-wrapper) .has-text-align-right { text-align: right !important; }
:where(.prose, .editor-styles-wrapper) .has-text-align-justify { text-align: justify !important; }

:where(.prose, .editor-styles-wrapper) .has-primary-color { color: var(--cdv-primary) !important; }
:where(.prose, .editor-styles-wrapper) .has-secondary-color { color: var(--cdv-secondary) !important; }
:where(.prose, .editor-styles-wrapper) .has-accent-color { color: var(--cdv-accent) !important; }
:where(.prose, .editor-styles-wrapper) .has-ink-color { color: var(--cdv-ink) !important; }
:where(.prose, .editor-styles-wrapper) .has-muted-color { color: var(--cdv-muted) !important; }
:where(.prose, .editor-styles-wrapper) .has-background-color { color: var(--cdv-paper) !important; }
:where(.prose, .editor-styles-wrapper) .has-surface-color { color: var(--cdv-surface) !important; }
:where(.prose, .editor-styles-wrapper) .has-border-color { color: var(--cdv-line) !important; }
:where(.prose, .editor-styles-wrapper) .has-link-tone-color { color: var(--cdv-link) !important; }
:where(.prose, .editor-styles-wrapper) .has-ivoire-color { color: var(--cdv-paper) !important; }
:where(.prose, .editor-styles-wrapper) .has-blanc-casse-color { color: var(--cdv-surface) !important; }
:where(.prose, .editor-styles-wrapper) .has-encre-color { color: var(--cdv-ink) !important; }
:where(.prose, .editor-styles-wrapper) .has-brun-color { color: var(--cdv-primary) !important; }
:where(.prose, .editor-styles-wrapper) .has-bronze-color { color: var(--cdv-accent) !important; }
:where(.prose, .editor-styles-wrapper) .has-sourd-color { color: var(--cdv-muted) !important; }

:where(.prose, .editor-styles-wrapper) .has-primary-background-color { background-color: var(--cdv-primary) !important; }
:where(.prose, .editor-styles-wrapper) .has-secondary-background-color { background-color: var(--cdv-secondary) !important; }
:where(.prose, .editor-styles-wrapper) .has-accent-background-color { background-color: var(--cdv-accent) !important; }
:where(.prose, .editor-styles-wrapper) .has-ink-background-color { background-color: var(--cdv-ink) !important; }
:where(.prose, .editor-styles-wrapper) .has-muted-background-color { background-color: var(--cdv-muted) !important; }
:where(.prose, .editor-styles-wrapper) .has-background-background-color { background-color: var(--cdv-paper) !important; }
:where(.prose, .editor-styles-wrapper) .has-surface-background-color { background-color: var(--cdv-surface) !important; }
:where(.prose, .editor-styles-wrapper) .has-border-background-color { background-color: var(--cdv-line) !important; }
:where(.prose, .editor-styles-wrapper) .has-link-tone-background-color { background-color: var(--cdv-link) !important; }
:where(.prose, .editor-styles-wrapper) .has-ivoire-background-color { background-color: var(--cdv-paper) !important; }
:where(.prose, .editor-styles-wrapper) .has-blanc-casse-background-color { background-color: var(--cdv-surface) !important; }
:where(.prose, .editor-styles-wrapper) .has-encre-background-color { background-color: var(--cdv-ink) !important; }
:where(.prose, .editor-styles-wrapper) .has-brun-background-color { background-color: var(--cdv-primary) !important; }
:where(.prose, .editor-styles-wrapper) .has-bronze-background-color { background-color: var(--cdv-accent) !important; }
:where(.prose, .editor-styles-wrapper) .has-sourd-background-color { background-color: var(--cdv-muted) !important; }

:where(.prose, .editor-styles-wrapper) .has-small-font-size { font-size: var(--wp--preset--font-size--small) !important; }
:where(.prose, .editor-styles-wrapper) .has-medium-font-size { font-size: var(--wp--preset--font-size--medium) !important; }
:where(.prose, .editor-styles-wrapper) .has-large-font-size { font-size: var(--wp--preset--font-size--large) !important; }
:where(.prose, .editor-styles-wrapper) .has-x-large-font-size { font-size: var(--wp--preset--font-size--x-large) !important; }
:where(.prose, .editor-styles-wrapper) .has-display-font-size { font-size: var(--wp--preset--font-size--display) !important; }
:where(.prose, .editor-styles-wrapper) .has-body-font-family { font-family: var(--cdv-font-body) !important; }
:where(.prose, .editor-styles-wrapper) .has-heading-font-family { font-family: var(--cdv-font-heading) !important; }

:where(.prose, .editor-styles-wrapper) :is(strong, b) { font-weight: var(--cdv-font-weight-bold, 700); }
:where(.prose, .editor-styles-wrapper) :is(em, i) { font-style: italic; }
:where(.prose, .editor-styles-wrapper) s { text-decoration: line-through; }
:where(.prose, .editor-styles-wrapper) u { text-decoration: underline; }

/* Composable native block styles. */
:where(.prose, .editor-styles-wrapper) .is-style-cdv-section {
    padding: var(--cdv-section-space) max(var(--cdv-space-md), 4vw);
    border-top: 1px solid var(--cdv-line);
}

:where(.prose, .editor-styles-wrapper) .is-style-cdv-surface:not(.has-background) {
    padding: clamp(var(--cdv-space-lg), 6vw, var(--cdv-section-space));
    background: var(--cdv-surface);
}

:where(.prose, .editor-styles-wrapper) .is-style-cdv-dark:not(.has-background) {
    padding: clamp(var(--cdv-space-lg), 7vw, var(--cdv-section-space));
    color: var(--cdv-footer-text);
    background: var(--cdv-primary);
}

:where(.prose, .editor-styles-wrapper) .is-style-cdv-dark a:not(.wp-block-button__link) {
    color: inherit;
}

:where(.prose, .editor-styles-wrapper) .is-style-cdv-panel {
    min-height: 100%;
    padding: clamp(var(--cdv-space-md), 4vw, var(--cdv-space-lg));
    background: var(--cdv-surface);
    border: 1px solid var(--cdv-line);
    border-radius: var(--cdv-radius-card);
    box-shadow: var(--cdv-shadow);
}

:where(.prose, .editor-styles-wrapper) .wp-block-columns.is-style-cdv-split {
    gap: clamp(var(--cdv-space-lg), 7vw, calc(var(--cdv-section-space) * .8));
    align-items: center !important;
}

:where(.prose, .editor-styles-wrapper) .wp-block-columns.is-style-cdv-cards {
    gap: var(--cdv-grid-gap);
    align-items: stretch !important;
}

:where(.prose, .editor-styles-wrapper) .wp-block-columns.is-style-cdv-cards > .wp-block-column {
    padding: clamp(var(--cdv-space-md), 3vw, var(--cdv-space-lg));
    background: var(--cdv-surface);
    border: 1px solid var(--cdv-line);
    border-radius: var(--cdv-radius-card);
}

:where(.prose, .editor-styles-wrapper) .wp-block-image.is-style-cdv-editorial img {
    width: 100%;
    max-height: 86svh;
    object-fit: cover;
}

:where(.prose, .editor-styles-wrapper) .wp-block-image.is-style-cdv-framed {
    padding: var(--cdv-space-sm);
    background: var(--cdv-surface);
    border: 1px solid var(--cdv-line);
}

:where(.prose, .editor-styles-wrapper) .wp-block-quote.is-style-cdv-feature {
    padding: clamp(var(--cdv-space-lg), 6vw, var(--cdv-section-space));
    color: var(--cdv-ink);
    background: var(--cdv-surface);
    border: 0;
    border-top: 2px solid var(--cdv-accent);
}

:where(.prose, .editor-styles-wrapper) .wp-block-list.is-style-cdv-divided {
    padding: 0;
    list-style-position: inside;
    border-top: 1px solid var(--cdv-line);
}

:where(.prose, .editor-styles-wrapper) .wp-block-list.is-style-cdv-divided > li {
    padding: var(--cdv-space-sm) 0;
    border-bottom: 1px solid var(--cdv-line);
}

:where(.prose, .editor-styles-wrapper) .wp-block-button.is-style-cdv-link .wp-block-button__link {
    min-height: 0;
    padding: .35em 0;
    color: var(--cdv-link);
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
}

@media (max-width: 781px) {
    :where(.prose, .editor-styles-wrapper) .is-style-cdv-section,
    :where(.prose, .editor-styles-wrapper) .is-style-cdv-surface,
    :where(.prose, .editor-styles-wrapper) .is-style-cdv-dark {
        padding-right: var(--cdv-space-md);
        padding-left: var(--cdv-space-md);
    }
}
