/*
 * Elementor compatibility (loaded only when Elementor is active).
 *
 * The theme's Tailwind build includes its "preflight" reset, which strips list bullets, link colours/underlines,
 * paragraph and heading margins, and button backgrounds. Elementor's own widgets mostly style themselves, but rich
 * text typed into Text Editor / Theme Builder content would lose all of that. :where() keeps the specificity at zero,
 * so every Elementor control (and Yellow Pencil / Additional CSS rule) still wins.
 */
:where(.elementor) :where(.elementor-widget-text-editor, .elementor-widget-theme-post-content, .elementor-tab-content, .elementor-toggle-content, .elementor-accordion-content) :where(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6) {
  margin-block: 0 1em;
}
:where(.elementor) :where(.elementor-widget-text-editor, .elementor-widget-theme-post-content, .elementor-tab-content, .elementor-toggle-content, .elementor-accordion-content) ul { list-style: disc; padding-inline-start: 1.5em; }
:where(.elementor) :where(.elementor-widget-text-editor, .elementor-widget-theme-post-content, .elementor-tab-content, .elementor-toggle-content, .elementor-accordion-content) ol { list-style: decimal; padding-inline-start: 1.5em; }
:where(.elementor) :where(.elementor-widget-text-editor, .elementor-widget-theme-post-content, .elementor-tab-content, .elementor-toggle-content, .elementor-accordion-content) a { text-decoration: underline; }
:where(.elementor) :where(.elementor-widget-text-editor, .elementor-widget-theme-post-content) :where(h1, h2, h3, h4, h5, h6) { font-weight: 700; }
:where(.elementor) :where(.elementor-widget-text-editor) h1 { font-size: 2em; }
:where(.elementor) :where(.elementor-widget-text-editor) h2 { font-size: 1.6em; }
:where(.elementor) :where(.elementor-widget-text-editor) h3 { font-size: 1.3em; }
:where(.elementor) :where(.elementor-widget-text-editor) blockquote { border-inline-start: 3px solid currentColor; padding-inline-start: 1em; opacity: .85; }

/* Elementor's own headings / buttons: size and weight come from the Elementor controls, not from Tailwind's reset or style.css. */

:where(.elementor) :where(.elementor-heading-title) { line-height: 1.2; }
:where(.elementor) .elementor-button { cursor: pointer; }

/* Buttons and fields inside Elementor forms: Tailwind's reset makes them borderless and transparent. */
:where(.elementor) :where(.elementor-field-textual:not([type="submit"])) { border-style: solid; border-width: 1px; border-color: #d6d3d1; }
:where(.elementor) :where(.elementor-field-group .elementor-button) { background-color: #1c1917; color: #fff; }

/* Elementor editor / preview: never let the theme's body rules clip the editing handles. */
.elementor-editor-active .cct-main--elementor, .elementor-editor-preview .cct-main--elementor { overflow: visible; }
.elementor-editor-active #page { min-height: 0; }

/* Images and embedded media inside Elementor behave as Elementor expects. */
.elementor img { max-width: 100%; height: auto; }
