/* Semantic color role styles.
 *
 * Layout widths are handled in block-layout.css. This file owns semantic color
 * roles that need to stay stable across light/dark palette modes.
 */

.site-footer {
	background: var(--sc-color-contrast);
	color: var(--sc-color-on-contrast);
}

.site-footer--style-surface {
	background: var(--sc-color-surface);
	color: var(--sc-color-text);
	border-top: 1px solid var(--sc-color-border);
}

.site-footer--style-minimal {
	background: transparent;
	color: var(--sc-color-text);
	border-top: 1px solid var(--sc-color-border);
}

.entry__content .sc-pattern-media-section--contrast,
.entry__content .sc-pattern-media-section.has-contrast-background-color,
.editor-styles-wrapper .sc-pattern-media-section--contrast,
.editor-styles-wrapper .sc-pattern-media-section.has-contrast-background-color {
	background-color: var(--sc-color-contrast) !important;
	background-color: color-mix(in srgb, var(--sc-color-contrast) 84%, #000) !important;
}

.entry__content .has-background-background-color:not(.has-text-color),
.entry__content .has-background-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-background-background-color:not(.has-text-color),
.editor-styles-wrapper .has-background-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.entry__content .has-surface-background-color:not(.has-text-color),
.entry__content .has-surface-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-surface-background-color:not(.has-text-color),
.editor-styles-wrapper .has-surface-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)) {
	color: var(--sc-color-text);
}

.entry__content .has-contrast-background-color,
.entry__content .has-contrast-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-contrast-background-color,
.editor-styles-wrapper .has-contrast-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)) {
	color: var(--sc-color-on-contrast);
}

.entry__content .has-text-background-color,
.entry__content .has-text-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-text-background-color,
.editor-styles-wrapper .has-text-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)) {
	color: var(--sc-color-background);
}

.entry__content .has-muted-background-color,
.entry__content .has-muted-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-muted-background-color,
.editor-styles-wrapper .has-muted-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)) {
	color: var(--sc-color-background);
}

.entry__content .has-background-background-color.has-background-color,
.entry__content .has-background-background-color.has-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-background-background-color.has-background-color,
.editor-styles-wrapper .has-background-background-color.has-background-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.entry__content .has-surface-background-color.has-surface-color,
.entry__content .has-surface-background-color.has-surface-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-surface-background-color.has-surface-color,
.editor-styles-wrapper .has-surface-background-color.has-surface-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)) {
	color: var(--sc-color-text) !important;
}

.entry__content .has-text-background-color.has-text-color,
.entry__content .has-text-background-color.has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-text-background-color.has-text-color,
.editor-styles-wrapper .has-text-background-color.has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.entry__content .has-contrast-background-color.has-contrast-color,
.entry__content .has-contrast-background-color.has-contrast-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-contrast-background-color.has-contrast-color,
.editor-styles-wrapper .has-contrast-background-color.has-contrast-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, figcaption, summary, label, a:not(.wp-block-button__link)) {
	color: var(--sc-color-background) !important;
}

.entry__content .wp-block-cover:not(.has-text-color),
.entry__content .wp-block-cover:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)),
.editor-styles-wrapper .wp-block-cover:not(.has-text-color),
.editor-styles-wrapper .wp-block-cover:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)) {
	color: #fff;
}

/* Un elemento che dichiara un colore di testo proprio apre un contesto di
   colore: quello che sta dentro eredita da lui, non dalla sezione che lo
   contiene. Serve :is() e non :where() perche' le regole di sezione qui sopra
   valgono 0,3,0 — la classe dello sfondo piu' quella dentro :not() — e con
   :where() (0,2,0) la sezione vincerebbe anche dentro una fascia annidata:
   un titolo su fondo accent dentro un gruppo surface si vedrebbe i propri link
   ridipinti del colore del gruppo, illeggibili sulla fascia. Con :is() la
   regola vale 0,3,1 e il contesto piu' interno ha la precedenza. */
.entry__content .has-text-color,
.entry__content .has-text-color :is(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-text-color,
.editor-styles-wrapper .has-text-color :is(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)) {
	color: inherit;
}

/* Un titolo che e' anche un collegamento non va sottolineato a riposo: la
   sottolineatura dei link di testo, dichiarata in theme.json, sui titoli
   spezza la linea di base ed e' fuori scala. Resta sul passaggio del mouse. */
.entry__content :is(h1, h2, h3, h4, h5, h6) a:not(.wp-block-button__link),
.editor-styles-wrapper :is(h1, h2, h3, h4, h5, h6) a:not(.wp-block-button__link) {
	text-decoration: none;
}

.entry__content :is(h1, h2, h3, h4, h5, h6) a:not(.wp-block-button__link):hover,
.entry__content :is(h1, h2, h3, h4, h5, h6) a:not(.wp-block-button__link):focus-visible {
	text-decoration: underline;
}

.entry__content .has-accent-background-color:not(.has-text-color),
.entry__content .has-accent-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-accent-background-color:not(.has-text-color),
.editor-styles-wrapper .has-accent-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)) {
	color: var(--sc-color-on-accent) !important;
}

.entry__content .has-accent-background-color.has-background-color.has-text-color,
.entry__content .has-accent-background-color.has-background-color.has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-accent-background-color.has-background-color.has-text-color,
.editor-styles-wrapper .has-accent-background-color.has-background-color.has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)) {
	color: var(--sc-color-on-accent) !important;
}

/* Secondary accent.
   Emitted only when the Customizer color is set, so these rules are inert
   on sites that do not use the role. */
.entry__content .has-accent-2-background-color:not(.has-text-color),
.entry__content .has-accent-2-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-accent-2-background-color:not(.has-text-color),
.editor-styles-wrapper .has-accent-2-background-color:not(.has-text-color) :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)) {
	color: var(--sc-color-on-accent-2) !important;
}

.entry__content .has-accent-2-background-color.has-background-color.has-text-color,
.entry__content .has-accent-2-background-color.has-background-color.has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)),
.editor-styles-wrapper .has-accent-2-background-color.has-background-color.has-text-color,
.editor-styles-wrapper .has-accent-2-background-color.has-background-color.has-text-color :where(h1, h2, h3, h4, h5, h6, p, li, cite, a:not(.wp-block-button__link)) {
	color: var(--sc-color-on-accent-2) !important;
}

/* Sulla fascia accent-2 il pulsante prende la coppia di contrasto della fascia,
   ma solo se i colori dei pulsanti non sono stati scelti nel Personalizza: se
   --sc-button-bg esiste e' una decisione esplicita, e la fascia non deve
   cancellarla. La variabile fa da interruttore, senza bisogno di due fogli. */
.entry__content .has-accent-2-background-color .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
.editor-styles-wrapper .has-accent-2-background-color .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
	background-color: var(--sc-button-bg, var(--sc-color-on-accent-2));
	color: var(--sc-button-ink, var(--sc-color-accent-2)) !important;
}

.entry__content .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-accent-2-background-color,
.editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-accent-2-background-color {
	color: var(--sc-color-on-accent-2) !important;
}

.entry__content .has-text-background-color .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .has-text-background-color .wp-block-button__link:not(.has-text-color) {
	color: var(--sc-color-text);
}

.entry__content .has-contrast-background-color .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .has-contrast-background-color .wp-block-button__link:not(.has-text-color) {
	color: var(--sc-color-on-accent);
}

.entry__content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color),
.entry__content .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-accent-background-color,
.editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-accent-background-color {
	color: var(--sc-button-ink, var(--sc-color-on-accent)) !important;
}

.entry__content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
.editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
	background-color: var(--sc-button-bg, var(--sc-color-accent));
}

.entry__content .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
	color: var(--sc-button-outline-ink, currentColor);
}