/* Preformatted front - Frontend styles */

/* Base styles for preformatted block */
.wp-block-preformatted,
pre.wp-block-preformatted {
    background-color: var(--wp--custom--semantic--color--background--surface--secondary, var(--wp--custom--primitive--color--neutral--100, #f4f5f6));
    color: var(--wp--custom--semantic--color--text--primary, var(--wp--custom--primitive--color--neutral--900, #121212));
    padding: var(--wp--custom--semantic--spacing--200, 16px);
    border-radius: var(--wp--custom--semantic--border--radius--base, 4px);
    font-family: monospace;
    font-size: 0.875em;
    line-height: 1.6;
    overflow-x: auto;
    overflow-y: visible;
    white-space: pre;
    word-wrap: normal;
}

/* Background colors - Text color adaptation */

/* Surface colors - Text color based on background */
.wp-block-preformatted.has-surface-brand-background-color,
pre.wp-block-preformatted.has-surface-brand-background-color {
    color: var(--wp--custom--semantic--color--text--inverse, #ffffff) !important;
}

.wp-block-preformatted.has-surface-body-background-color,
pre.wp-block-preformatted.has-surface-body-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-primary-background-color,
pre.wp-block-preformatted.has-surface-primary-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-secondary-background-color,
pre.wp-block-preformatted.has-surface-secondary-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-tertiary-background-color,
pre.wp-block-preformatted.has-surface-tertiary-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-inverse-background-color,
pre.wp-block-preformatted.has-surface-inverse-background-color {
    color: var(--wp--custom--semantic--color--text--inverse, #ffffff) !important;
}

/* Surface Accent colors - Text color based on background */
.wp-block-preformatted.has-surface-accent-lightest-background-color,
pre.wp-block-preformatted.has-surface-accent-lightest-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-accent-lighter-background-color,
pre.wp-block-preformatted.has-surface-accent-lighter-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-accent-light-background-color,
pre.wp-block-preformatted.has-surface-accent-light-background-color {
    color: var(--wp--custom--semantic--color--text--primary, #121212) !important;
}

.wp-block-preformatted.has-surface-accent-dark-background-color,
pre.wp-block-preformatted.has-surface-accent-dark-background-color {
    color: var(--wp--custom--semantic--color--text--inverse, #ffffff) !important;
}

.wp-block-preformatted.has-surface-accent-darker-background-color,
pre.wp-block-preformatted.has-surface-accent-darker-background-color {
    color: var(--wp--custom--semantic--color--text--inverse, #ffffff) !important;
}

.wp-block-preformatted.has-surface-accent-darkest-background-color,
pre.wp-block-preformatted.has-surface-accent-darkest-background-color {
    color: var(--wp--custom--semantic--color--text--inverse, #ffffff) !important;
}
