/**
 * Elementor canvas / preview — match front-end bridal layout.
 */

/* Kill Elementor + Astra gutters on our flush sections */
.elementor-section.as-flush > .elementor-container,
.elementor-section.as-flush > .elementor-container > .elementor-row,
.elementor-section.as-flush .elementor-column.as-flush-col > .elementor-widget-wrap,
.elementor-section.as-flush .elementor-element-populated {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.elementor-section.as-flush .elementor-widget:not(.elementor-widget__width-auto):not(.elementor-widget__width-initial) {
  max-width: none !important;
}

.elementor-section.as-flush .elementor-widget-html,
.elementor-section.as-flush .elementor-widget-html > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Page shell inside Elementor */
body.elementor-editor-preview.as-luxury,
body.elementor-editor-active .elementor-editor-preview,
body.as-luxury.elementor-page {
  background: var(--as-page-bg, #fff);
}

body.as-luxury .elementor,
body.elementor-editor-preview .elementor {
  overflow: clip;
}

body.as-luxury .elementor-section.as-flush,
.elementor-editor-preview .elementor-section.as-flush {
  overflow: visible;
}

/* Keep luxury type inside Elementor widgets */
.elementor-editor-preview .as-page,
.elementor-editor-preview .as-hero-os,
.elementor-editor-preview .as-portfolio,
.elementor-editor-preview .as-offers-os,
body.as-luxury .elementor .as-page {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Hide Astra leftovers in Elementor full-width template */
body.elementor-template-full-width .entry-header,
body.elementor-page .entry-header,
.elementor-editor-preview .entry-header {
  display: none !important;
}

/* Preview: don't hide nav under Elementor UI */
.elementor-editor-preview .as-nav {
  z-index: 10;
}

/* Editor panel hint — make HTML sections clickable targets clearer */
.elementor-editor-active .elementor-widget-html.elementor-element-editable {
  outline: 1px dashed rgba(0, 0, 0, 0.12);
  outline-offset: -1px;
}

/*
 * Critical: [data-reveal] starts at opacity:0 until JS adds .is-in.
 * In Elementor canvas IntersectionObserver often never fires → blank page.
 * Force everything visible while editing / previewing in Elementor.
 */
body.elementor-editor-active [data-reveal],
body.elementor-editor-preview [data-reveal],
.elementor-editor-preview [data-reveal],
body.elementor-editor-active .as-mega__list li,
body.elementor-editor-preview .as-mega__list li {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  transition: none !important;
}

/* Hero must paint in the iframe even if the slider JS hasn't run */
body.elementor-editor-preview .as-hero-os,
.elementor-editor-preview .as-hero-os {
  min-height: 70vh;
  height: auto;
  max-height: none;
}
body.elementor-editor-preview .as-hero-os__slide.is-active,
.elementor-editor-preview .as-hero-os__slide.is-active {
  opacity: 1 !important;
}
body.elementor-editor-preview .as-hero-os__slide.is-active img,
.elementor-editor-preview .as-hero-os__slide.is-active img {
  display: block;
  width: 100%;
  height: min(78vh, 900px);
  object-fit: cover;
}

/* Don't show our frontend edit bar inside Elementor */
body.elementor-editor-active .as-edit-bar,
body.elementor-editor-preview .as-edit-bar,
.elementor-editor-preview .as-edit-bar {
  display: none !important;
}

/* Portfolio grid readable in editor */
body.elementor-editor-preview .as-portfolio__grid,
.elementor-editor-preview .as-portfolio__grid {
  opacity: 1;
}
