/* Pipsy embed isolation on builder single pages.
   Pipsy injects Tailwind/global CSS that can override theme .grid (flex) layouts above the widget. */

.builder-single__available-homes {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.builder-single__available-homes__embed {
  width: 100%;
  max-width: 100%;
}

.builder-single__available-homes__embed iframe {
  max-width: 100%;
}

/* Restore theme flex-grid behavior inside main when third-party CSS loads */
body.colton-wp main .grid,
body.colton-wp main [class*='__cols-wrap'] {
  display: flex !important;
  flex-wrap: wrap !important;
  box-sizing: border-box !important;
}

body.colton-wp main [class*='col-'] {
  box-sizing: border-box !important;
  flex: none !important;
  max-width: none !important;
  grid-column: auto !important;
}

@media (min-width: 992px) {
  body.colton-wp main .col-md-5 {
    width: 41.6666666667% !important;
  }

  body.colton-wp main .col-md-6 {
    width: 50% !important;
  }

  body.colton-wp main .offset-md-1 {
    margin-left: 8.3333333333% !important;
  }

  body.colton-wp main .col-lg-5 {
    width: 41.6666666667% !important;
  }

  body.colton-wp main .col-lg-6 {
    width: 50% !important;
  }

  body.colton-wp main .offset-lg-1 {
    margin-left: 8.3333333333% !important;
  }

  body.colton-wp main .builder-single__main__cols.grid {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
}

@media (min-width: 1200px) {
  body.colton-wp main .text-images .grid.text-images__cols-wrap {
    flex-direction: row !important;
  }

  body.colton-wp main .text-images.combo-text-right .grid.text-images__cols-wrap {
    flex-direction: row-reverse !important;
  }

  body.colton-wp main .video-feature .grid.video-feature__cols-wrap {
    flex-direction: row !important;
  }

  body.colton-wp main .video-feature.video-text-right .grid.video-feature__cols-wrap {
    flex-direction: row-reverse !important;
  }
}

@media (max-width: 1199px) {
  body.colton-wp main .text-images .grid.text-images__cols-wrap {
    flex-direction: column-reverse !important;
  }

  body.colton-wp main .video-feature .grid.video-feature__cols-wrap {
    flex-direction: column-reverse !important;
  }
}
