/**
 * WPBakery compatibility layer.
 * Loaded only on singular content containing vc_* or wpb_* shortcodes.
 */

.pb4r-wpbakery-main{
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  overflow:visible;
}

.pb4r-wpbakery-content{
  width:100%;
  max-width:1280px;
  margin-right:auto;
  margin-left:auto;
  padding-right:15px;
  padding-left:15px;
  color:inherit;
  overflow:visible;
}

/* WPBakery rows use negative 15px gutters by default. */
.pb4r-wpbakery-content > .vc_row,
.pb4r-wpbakery-content > .vc_section{
  clear:both;
}

/* Preserve row-stretch calculations and prevent theme containers from clipping. */
.pb4r-wpbakery-content .vc_row[data-vc-full-width],
.pb4r-wpbakery-content .vc_section[data-vc-full-width],
.pb4r-wpbakery-content .vc_row.vc_row-o-full-height{
  overflow:visible;
}

.pb4r-wpbakery-content .vc_row[data-vc-full-width-init="true"]{
  position:relative;
}

/* Media and embeds should remain responsive inside old builder layouts. */
.pb4r-wpbakery-content img,
.pb4r-wpbakery-content video,
.pb4r-wpbakery-content iframe,
.pb4r-wpbakery-content embed,
.pb4r-wpbakery-content object{
  max-width:100%;
}

.pb4r-wpbakery-content img{
  height:auto;
}

/* Avoid generic theme typography overriding WPBakery element spacing. */
.pb4r-wpbakery-content .wpb_content_element,
.pb4r-wpbakery-content .vc_tta-container{
  box-sizing:border-box;
}

.pb4r-wpbakery-content .wpb_text_column > :first-child,
.pb4r-wpbakery-content .wpb_text_column .wpb_wrapper > :first-child{
  margin-top:0;
}

.pb4r-wpbakery-content .wpb_text_column > :last-child,
.pb4r-wpbakery-content .wpb_text_column .wpb_wrapper > :last-child{
  margin-bottom:0;
}

/* WPBakery canvas intentionally removes the theme's content-width constraint. */
.page-template-wpbakery-canvas .pb4r-wpbakery-content{
  max-width:none;
  padding-right:0;
  padding-left:0;
}

/* Admin bar plus frontend editor controls should not be hidden by the site header. */
body.compose-mode .generic-site-header,
body.vc_editor .generic-site-header{
  position:relative;
  z-index:20;
}

@media(max-width:782px){
  .pb4r-wpbakery-content{
    padding-right:12px;
    padding-left:12px;
  }

  .page-template-wpbakery-canvas .pb4r-wpbakery-content{
    padding-right:0;
    padding-left:0;
  }
}
