/**
 * X Theme / Cornerstone Overrides for Elementor
 *
 * Purpose: Neutralize X Theme and Cornerstone CSS rules that
 * interfere with Elementor widget output.
 *
 * Scoped to Elementor selectors only so legacy pages using
 * X Theme / Cornerstone natively are not affected.
 *
 * REMOVAL: Delete this file and its enqueue in menus.php
 * when migrating from X Theme to Hello Elementor.
 */

/* X Theme integrity stack adds margin-top: 4em to .hentry posts.
   This creates large gaps between Loop Grid items. */
.elementor-loop-container .hentry {
  margin-top: 0;
}

/* X Theme adds margin-top to .widget inside .x-main and .x-sidebar.
   Can affect Elementor widgets nested in those wrappers. */
.elementor .x-main .widget,
.elementor .x-sidebar .widget {
  margin-top: 0;
}

/* ================================================
   X Theme heading resets for Elementor content
   integrity-light.css sets bare h1-h6 with
   percentage font-sizes, margins, and line-heights.
   X Theme Customizer inline CSS adds font-family:
   "Lato", font-weight: 900, color: #343434.
   These resets return control to Elementor's kit
   typography and widget-level settings.
   ================================================ */
.elementor h1,
.elementor h2,
.elementor h3,
.elementor h4,
.elementor h5,
.elementor h6 {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  text-transform: none;
}

/* X Theme Customizer sets body { font-family: "Roboto" }
   which competes with Elementor Kit's Inter font. */
.elementor {
  font-family: inherit;
}

/* .entry-content { margin-top: 1.25em } from integrity-light.css
   adds unwanted spacing inside Elementor single templates. */
.elementor .entry-content {
  margin-top: 0;
}

/* .hentry { margin-top: 4em } on single post pages.
   Existing rule only covers .elementor-loop-container. */
.elementor.hentry {
  margin-top: 0;
}

/* X Theme styles [type="submit"] with its own colors
   and border-radius, hitting Elementor form buttons. */
.elementor [type="submit"],
.elementor .x-btn,
.elementor .button {
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  background-color: inherit;
  border: inherit;
  border-radius: inherit;
}
