/**
 * SnapTrip Plugin Pages — Global Overrides
 * Loads on every plugin-driven page (journey single/archive,
 * destination single/archive, wizard/booking, checkout, thank-you).
 * Fixes cross-page issues like the footer padding.
 */


/* ============================================
   TOP PADDING FIX
   Elementor's Single template applies e-con-inner padding
   to the content wrapper on ALL plugin pages. Strip it so the
   plugin's own page-header sits flush against the site header.
   Same rule the journey page uses — applied here to
   archives, destinations, wizard, checkout, etc.
   ============================================ */
body.snaptrip-plugin-page .elementor-location-single .e-con-inner,
body.snaptrip-plugin-page .elementor-location-single .e-con,
body.snaptrip-plugin-page .elementor-location-archive .e-con-inner,
body.snaptrip-plugin-page .elementor-location-archive .e-con {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
}

/* ============================================
   COLLAPSE EMPTY HEADER SPACE
   If the theme's Elementor header container renders but stays empty
   (or is set to hide on this template), it still reserves vertical
   space — showing as blank whitespace above our hero. Collapse any
   empty header/main wrapper so the plugin content sits flush.
   ============================================ */
body.snaptrip-plugin-page .elementor-location-header:empty,
body.snaptrip-plugin-page [data-elementor-type="header"]:empty,
body.snaptrip-plugin-page header:empty {
    display: none !important;
}
/* Also strip any leading main/content wrapper padding on plugin pages */
body.snaptrip-plugin-page > main,
body.snaptrip-plugin-page > div > main,
body.snaptrip-plugin-page .site-main,
body.snaptrip-plugin-page #main,
body.snaptrip-plugin-page #content,
body.snaptrip-plugin-page #primary {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
/* And on the wrappers Elementor / block themes commonly insert */
body.snaptrip-plugin-page .elementor,
body.snaptrip-plugin-page .wp-site-blocks,
body.snaptrip-plugin-page .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
