/* Plugin-owned (not part of the maquette): how the maquette's markup sits inside Elementor's containers and widgets. */

/* A Prittio element that prints a piece of a section: its wrapper is not a box of the layout, the piece takes
   part in the parent's layout (grid, flex, absolute positions) as if it were a direct child of the parent. */
.elementor-widget.adb-frag { display: contents; }

/* A container of a section is a plain element like the one it stands for in the maquette (Elementor's default is a column of flex items,
   100 % wide, relative); the maquette's own rules (display, position, width…) still win, they come later. */
.e-con.adb-sec { --display: block; --flex-direction: row; --width: auto; --position: static; min-width: auto; }

/* In the Elementor editor the header bar sits in the flow, otherwise its container looks empty (the bar is fixed on the site). */
.elementor-editor-active #nav { position: relative !important; }

/* ADB (page header): Elementor's CSS of each element (.elementor-N .elementor-element.elementor-element-ID, three classes) sets --display:flex and
   --flex-direction:column on every container, which outranks `.e-con.adb-sec` above: outrank it, so a section and its wrappers really are plain blocks. */
.elementor .elementor-element.e-con.adb-sec { --display: block; --flex-direction: row; --width: auto; --position: static; }

/* ADB (home, testimonials): a section container printed with the `hidden` attribute stays hidden (`.e-con { display: var(--display) }` would show it). */
.e-con.adb-sec[hidden] { display: none; }

/* ADB (article, project pages): a section whose elements print nothing (no other article, no picture in the gallery, no partner, no other
   project; projet.js then removes the gallery and partners sections) is not shown on the site, like the former all-in-one widgets that printed nothing. In the editor it stays, so it can be filled. */
body:not(.elementor-editor-active) .e-con.related.adb-sec:not(:has(.ncards)),
body:not(.elementor-editor-active) .e-con.pjgal.adb-sec:not(:has(.pjfig)),
body:not(.elementor-editor-active) .e-con.pjpa.adb-sec:not(:has(.pjpa__item)),
body:not(.elementor-editor-active) .e-con.pnext.adb-sec:not(:has(.pnext__link)) { display: none; }

/* In the editor the background words of the hero lie over the big title: let a click reach the title (the words are selected from the Structure panel). */
.elementor-editor-active .hero__names { pointer-events: none; }

/* A background chosen in the container's Style tab replaces the design's own where that one is an opaque gradient that would hide it (the hero
   and the page headers). Elementor's own rule for an image or a gradient is more specific, so this only clears what the design painted.
   The glows other sections have (a translucent orange light) stay: a colour chosen shows under them. The class is printed by
   ADB_Prittio_Layout::render_attributes() (assets/editor/preview.js does the same in the editor). */
.e-con.adb-sec.hero.adb-has-bg,
.e-con.adb-sec.phero.adb-has-bg { background-image: none; }

/* Elementor editor: an element's wrapper has no box (display:contents), so Elementor cannot outline it: outline what it prints instead. */
.elementor-editor-active .adb-frag:hover > * { outline: 1px dashed #d30c5c; outline-offset: -1px; }
.elementor-editor-active .adb-frag.elementor-element-editable > * { outline: 2px solid #d30c5c; outline-offset: -2px; }
