/* Editor visuale dei testi (mattone rich-editor): colori dalle variabili del progetto, con un valore di riserva */
.rte { position: relative; display: grid; gap: 0; min-width: 0; border: 1.5px solid var(--border-strong, #c9d1dc); border-radius: 12px; background: var(--surface, #fff); overflow: hidden; }
.rte:focus-within { border-color: var(--blue, #2a78d6); box-shadow: 0 0 0 3px rgba(42, 120, 214, .15); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 6px; background: var(--blue-lighter, #f2f6fc); border-bottom: 1px solid var(--border, #d9dee6); }
.rte-btn { border: 0; background: none; border-radius: 6px; min-width: 30px; height: 28px; padding: 0 8px; font: 600 13px inherit; color: var(--gray, #4a5260); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rte-btn:hover, .rte-btn[aria-pressed="true"] { background: #e3ebf7; color: var(--blue, #2a78d6); }
.rte .rte-source { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0; pointer-events: none; }
.rte-area { padding: 10px 14px; font-size: 15px; line-height: 1.6; color: var(--text, #1f2733); outline: none; overflow-wrap: anywhere; cursor: text; max-height: 60vh; overflow-y: auto; }
.rte-area > :first-child { margin-top: 0; }
.rte-area > :last-child { margin-bottom: 0; }
.rte-area p { margin: 0 0 .7em; }
.rte-area h1, .rte-area h2, .rte-area h3, .rte-area h4, .rte-area h5, .rte-area h6 { margin: .9em 0 .35em; font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--text, #1f2733); }
.rte-area ul, .rte-area ol { margin: 0 0 .7em; padding-left: 1.4em; }
.rte-area a { color: var(--blue, #2a78d6); text-decoration: underline; }
.rte-area.is-empty::before { content: attr(data-placeholder); color: var(--muted, #6b7380); pointer-events: none; float: left; height: 0; }
.rte.is-invalid { border-color: var(--red, #e34948); }
.rte.is-disabled { background: #f4f6f9; }
.rte.is-disabled .rte-bar { display: none; }
.rte.is-disabled .rte-area { cursor: default; color: var(--gray, #4a5260); }
