/* Look of the blocks available to blog editors (Titolo, Testo, Immagine, Immagine e testo, Elenco, Citazione,
 * Pulsante, Video, Separatore). Loaded on the article page AND inside the editor canvas, so what you build is
 * what readers see. */
:is(.post-body, .editor-styles-wrapper) {
  --nxp-orange: #ff5a00; --nxp-line: rgba(255,255,255,.18); --nxp-muted: rgba(247,244,238,.56);
}

/* Image */
:is(.post-body, .editor-styles-wrapper) .wp-block-image { margin: .4em 0 1.8em; }
:is(.post-body, .editor-styles-wrapper) .wp-block-image img { border-radius: 14px; margin: 0; max-width: 100%; height: auto; }
:is(.post-body, .editor-styles-wrapper) .wp-element-caption,
:is(.post-body, .editor-styles-wrapper) figcaption { font-size: 13px; line-height: 1.5; color: var(--nxp-muted); text-align: center; margin: 10px 0 0; }

/* Image + text */
:is(.post-body, .editor-styles-wrapper) .wp-block-media-text { margin: .4em 0 1.8em; gap: 0 32px; grid-template-columns: 45% 1fr; }
:is(.post-body, .editor-styles-wrapper) .wp-block-media-text.has-media-on-the-right { grid-template-columns: 1fr 45%; }
:is(.post-body, .editor-styles-wrapper) .wp-block-media-text__media img { border-radius: 14px; margin: 0; }
:is(.post-body, .editor-styles-wrapper) .wp-block-media-text__content { padding: 0; }
:is(.post-body, .editor-styles-wrapper) .wp-block-media-text__content > :last-child { margin-bottom: 0; }

/* Button: filled, no border, arrow icon (site-wide button rule) */
:is(.post-body, .editor-styles-wrapper) .wp-block-buttons { margin: .6em 0 1.8em; gap: 12px; }
:is(.post-body, .editor-styles-wrapper) .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px;
  padding: 13px 21px; background: var(--nxp-orange); color: #fff !important;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-decoration: none !important;
  transition: background .2s, transform .2s;
}
:is(.post-body, .editor-styles-wrapper) .wp-block-button__link::after {
  content: ""; width: 13px; height: 13px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='7' y1='17' x2='17' y2='7'/%3E%3Cpolyline points='7 7 17 7 17 17'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='7' y1='17' x2='17' y2='7'/%3E%3Cpolyline points='7 7 17 7 17 17'/%3E%3C/svg%3E") center / contain no-repeat;
}
:is(.post-body, .editor-styles-wrapper) .wp-block-button__link:hover { background: #ff7a2e; transform: translateY(-1px); }

/* Video (YouTube) */
:is(.post-body, .editor-styles-wrapper) .wp-block-embed { margin: .4em 0 1.8em; }
:is(.post-body, .editor-styles-wrapper) .wp-block-embed iframe { border-radius: 14px; max-width: 100%; }
:is(.post-body, .editor-styles-wrapper) .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper { border-radius: 14px; overflow: hidden; }

/* Separator */
:is(.post-body, .editor-styles-wrapper) .wp-block-separator { border: 0; border-top: 1px solid var(--nxp-line); background: none; height: 0; width: 100%; max-width: none; margin: 2.4em 0; opacity: 1; }

/* Quote */
:is(.post-body, .editor-styles-wrapper) .wp-block-quote { margin: 1.8em 0; padding: 4px 4px 4px 22px; border: 0; border-left: 3px solid var(--nxp-orange); font-style: italic; color: var(--nxp-muted); }
:is(.post-body, .editor-styles-wrapper) .wp-block-quote p { margin: 0 0 .6em; color: inherit; }
:is(.post-body, .editor-styles-wrapper) .wp-block-quote cite { display: block; font-size: 13px; font-style: normal; text-transform: uppercase; letter-spacing: .08em; }

/* Cover (editor only): sits under the title, like on the live article */
.editor-styles-wrapper .wp-block-post-featured-image { margin: 0 0 2em; }
.editor-styles-wrapper .wp-block-post-featured-image img { width: 100%; height: auto; border-radius: 20px; display: block; }
.editor-styles-wrapper .wp-block-post-featured-image .components-placeholder {
  min-height: 240px; border-radius: 20px; background: #141414; color: rgba(247,244,238,.7);
  border: 1px dashed rgba(255,255,255,.28); box-shadow: none; display: flex; align-items: center; justify-content: center;
}
.editor-styles-wrapper .wp-block-post-featured-image .components-placeholder .components-placeholder__label,
.editor-styles-wrapper .wp-block-post-featured-image .components-placeholder .components-placeholder__instructions { color: rgba(247,244,238,.7); }
.editor-styles-wrapper .wp-block-post-featured-image .components-placeholder { position: relative; }
.editor-styles-wrapper .wp-block-post-featured-image .components-placeholder::after {
  content: "Copertina — clicca per caricare o scegliere un'immagine"; position: absolute; left: 0; right: 0; bottom: 22px;
  text-align: center; font-size: 13px; color: rgba(247,244,238,.6); pointer-events: none;
}
