/* Shared callout presentation for the website and editor canvas.
 * Legacy classes remain supported; new callouts use native Group block styles.
 * Colours are supporting cues: keep a meaningful written label in the content.
 */
.wnc-callout,
.wnc-callout-default,
.wnc-callout-info,
.wnc-callout-tip,
.wnc-callout-important,
.wnc-callout-caution,
.wnc-callout-warning,
.is-style-wnc-callout-default,
.is-style-wnc-callout-info,
.is-style-wnc-callout-tip,
.is-style-wnc-callout-important,
.is-style-wnc-callout-caution,
.is-style-wnc-callout-warning {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
    border-radius: 0 var(--wp--custom--border-radius--default) var(--wp--custom--border-radius--default) 0;
}

.wnc-callout p:first-child,
[class*="wnc-callout-"] p:first-child { margin-top: 0; }

.wnc-callout > :first-child,
[class*="wnc-callout-"] > :first-child { margin-top: 0; margin-block-start: 0; }

.wnc-callout > :last-child,
[class*="wnc-callout-"] > :last-child { margin-bottom: 0; margin-block-end: 0; }

.wnc-callout,
.wnc-callout-default   { border-color: var(--wp--preset--color--text-secondary); background: var(--wp--custom--callout-bg--default); }
.wnc-callout-info      { border-color: var(--wp--preset--color--callout-info); background: var(--wp--custom--callout-bg--info); }
.wnc-callout-tip       { border-color: var(--wp--preset--color--callout-tip); background: var(--wp--custom--callout-bg--tip); }
.wnc-callout-important { border-color: var(--wp--preset--color--callout-important); background: var(--wp--custom--callout-bg--important); }
.wnc-callout-caution   { border-color: var(--wp--preset--color--callout-caution); background: var(--wp--custom--callout-bg--caution); }
.wnc-callout-warning   { border-color: var(--wp--preset--color--callout-warning); background: var(--wp--custom--callout-bg--warning); }

/* Native Group styles take precedence over retained legacy classes. */
.is-style-wnc-callout-default { border-color: var(--wp--preset--color--text-secondary); background: var(--wp--custom--callout-bg--default); }
.is-style-wnc-callout-info { border-color: var(--wp--preset--color--callout-info); background: var(--wp--custom--callout-bg--info); }
.is-style-wnc-callout-tip { border-color: var(--wp--preset--color--callout-tip); background: var(--wp--custom--callout-bg--tip); }
.is-style-wnc-callout-important { border-color: var(--wp--preset--color--callout-important); background: var(--wp--custom--callout-bg--important); }
.is-style-wnc-callout-caution { border-color: var(--wp--preset--color--callout-caution); background: var(--wp--custom--callout-bg--caution); }
.is-style-wnc-callout-warning { border-color: var(--wp--preset--color--callout-warning); background: var(--wp--custom--callout-bg--warning); }

/* Core Group's editor wrappers are structural, not callout content. */
.editor-styles-wrapper :is(.wnc-callout, .wnc-callout-default, .wnc-callout-info, .wnc-callout-tip, .wnc-callout-important, .wnc-callout-caution, .wnc-callout-warning, .is-style-wnc-callout-default, .is-style-wnc-callout-info, .is-style-wnc-callout-tip, .is-style-wnc-callout-important, .is-style-wnc-callout-caution, .is-style-wnc-callout-warning) > .block-editor-inner-blocks > .block-editor-block-list__layout > :first-child {
    margin-block-start: 0;
}
.editor-styles-wrapper :is(.wnc-callout, .wnc-callout-default, .wnc-callout-info, .wnc-callout-tip, .wnc-callout-important, .wnc-callout-caution, .wnc-callout-warning, .is-style-wnc-callout-default, .is-style-wnc-callout-info, .is-style-wnc-callout-tip, .is-style-wnc-callout-important, .is-style-wnc-callout-caution, .is-style-wnc-callout-warning) > .block-editor-inner-blocks > .block-editor-block-list__layout > :last-child {
    margin-block-end: 0;
}

@media print {
    /* Restore the callout edge after the theme's general Group print reset. */
    .wp-block-group:is(.wnc-callout, .wnc-callout-default, .wnc-callout-info, .wnc-callout-tip, .wnc-callout-important, .wnc-callout-caution, .wnc-callout-warning, .is-style-wnc-callout-default, .is-style-wnc-callout-info, .is-style-wnc-callout-tip, .is-style-wnc-callout-important, .is-style-wnc-callout-caution, .is-style-wnc-callout-warning),
    :is(.wnc-callout, .wnc-callout-default, .wnc-callout-info, .wnc-callout-tip, .wnc-callout-important, .wnc-callout-caution, .wnc-callout-warning, .is-style-wnc-callout-default, .is-style-wnc-callout-info, .is-style-wnc-callout-tip, .is-style-wnc-callout-important, .is-style-wnc-callout-caution, .is-style-wnc-callout-warning) {
        background: none !important;
        color: #000 !important;
        padding: 0.75rem 1rem !important;
        margin: 1rem 0 !important;
        border-left: 3px solid #666 !important;
        break-inside: avoid;
    }
}
