/* Bootstrap 4 seems to cause some sitefinity backend design modals to malfunction.
 * The following are the fixes that I can find. Feel free to add in or report any
 * other malfunctions that bootstrap 4 cause.
 */

/* fix the back to pages button supposed to be red */
.sfPageEditor a.sfCancel {
    color: #f00;
}

.sfPageEditor .zeDockZoneEmpty {
  width: 100%;
}

.sf-backend-wrp .form-horizontal .control-label {
  padding-top: 0;
}

/* fix designer modal not opening */
.sfPageEditor.modal-open .sf-backend-wrp.modal.fade {
    opacity: 1;
}

/* fix select options' height which became shorter */
.sfPageEditor.modal-open .sf-backend-wrp .modal-dialog select.form-control {
    height: 34px;
}

/* fix modal header where it became clumped due to flex */
.sfPageEditor.modal-open .sf-backend-wrp .modal-dialog .sf-widget-header.modal-header {
    display: block;
}
.sfPageEditor.modal-open .sf-backend-wrp .modal-dialog .ng-scope.modal-header {
    display: block;
}

/* fix modal footer where the buttons clumped due to flex */
.sfPageEditor.modal-open .sf-backend-wrp .modal-dialog .modal-footer {
    display: block;
}

/* fix document link modal */
.sfPageEditor.modal-open .modal-dialog {
  max-width: unset;
}
.sfPageEditor.modal-open .modal-dialog .modal-content {
  width: unset;
}

/* fix library list to show as column list */
.sfPageEditor.modal-open .sf-backend-wrp .nav {
    flex-direction: column;
}

/* on front-end */
/* sf-resets */
.sfimageWrp img, .sfContentBlock img, .sf_colsIn img {
	max-width: 100%;
}

@media (min-width: 768px) {
    .sf_cols .sf_colsOut:first-child .sf_colsIn {
      padding-left: 0.5rem;
    }
    .sf_cols .sf_colsOut .sf_colsIn {
      margin-left: 0;
      padding-left: 0.5rem;
      padding-right: 0.5rem;
    }
    .sf_cols .sf_colsOut.sf_3cols_2_34, .sf_cols .sf_colsOut.sf_3cols_1_33, .sf_cols .sf_colsOut.sf_3cols_3_33 {
      width: 33.333%;
    }
}


@media (max-width: 767px) {
  .sf_colsOut[class^="sf_2cols_"],
  .sf_colsOut[class*=" sf_2cols_"],
  .sf_colsOut[class^="sf_3cols_"],
  .sf_colsOut[class*=" sf_3cols_"],
  .sf_colsOut[class^="sf_4cols_"],
  .sf_colsOut[class*=" sf_4cols_"],
  .sf_colsOut[class^="sf_5cols_"],
  .sf_colsOut[class*=" sf_5cols_"]{
    width: 100% !important;
    margin-left: 0 !important
  }

  .sf_colsIn[class^="sf_1cols_"],
  .sf_colsIn[class^=" sf_1cols_"],
  .sf_colsIn[class^="sf_2cols_"],
	.sf_colsIn[class*=" sf_2cols_"],
	.sf_colsIn[class^="sf_3cols_"],
	.sf_colsIn[class*=" sf_3cols_"],
	.sf_colsIn[class^="sf_4cols_"],
	.sf_colsIn[class*=" sf_4cols_"],
  .sf_colsIn[class^="sf_5cols_"],
  .sf_colsIn[class*=" sf_5cols_"]{
    margin-left: 0 !important;
    padding-right: 0 !important;
	}
}

.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-xs-1 {
  -ms-flex: 0 0 8.333333%;
  flex: 0 0 8.333333%;
  max-width: 8.333333%;
}

.col-xs-2 {
  -ms-flex: 0 0 16.666667%;
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
}

.col-xs-3 {
  -ms-flex: 0 0 25%;
  flex: 0 0 25%;
  max-width: 25%;
}

.col-xs-4 {
  -ms-flex: 0 0 33.333333%;
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}

.col-xs-5 {
  -ms-flex: 0 0 41.666667%;
  flex: 0 0 41.666667%;
  max-width: 41.666667%;
}

.col-xs-6 {
  -ms-flex: 0 0 50%;
  flex: 0 0 50%;
  max-width: 50%;
}

.col-xs-7 {
  -ms-flex: 0 0 58.333333%;
  flex: 0 0 58.333333%;
  max-width: 58.333333%;
}

.col-xs-8 {
  -ms-flex: 0 0 66.666667%;
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}

.col-xs-9 {
  -ms-flex: 0 0 75%;
  flex: 0 0 75%;
  max-width: 75%;
}

.col-xs-10 {
  -ms-flex: 0 0 83.333333%;
  flex: 0 0 83.333333%;
  max-width: 83.333333%;
}

.col-xs-11 {
  -ms-flex: 0 0 91.666667%;
  flex: 0 0 91.666667%;
  max-width: 91.666667%;
}

.col-xs-12 {
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
}
