/*
 * Bootstrap 3 to Bootstrap 5 Migration Compatibility Layer
 * This file provides compatibility for Bootstrap 3 classes used in the existing markup
 */

/* Container fluid compatibility */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Row compatibility - Bootstrap 3 used negative margins */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* WPBakery Page Builder column classes compatibility */
/* These are custom classes from Visual Composer/WPBakery, not standard Bootstrap */
.vc_col-xs-1, .vc_col-xs-2, .vc_col-xs-3, .vc_col-xs-4,
.vc_col-xs-5, .vc_col-xs-6, .vc_col-xs-7, .vc_col-xs-8,
.vc_col-xs-9, .vc_col-xs-10, .vc_col-xs-11, .vc_col-xs-12,
.vc_col-sm-1, .vc_col-sm-2, .vc_col-sm-3, .vc_col-sm-4,
.vc_col-sm-5, .vc_col-sm-6, .vc_col-sm-7, .vc_col-sm-8,
.vc_col-sm-9, .vc_col-sm-10, .vc_col-sm-11, .vc_col-sm-12,
.vc_col-md-1, .vc_col-md-2, .vc_col-md-3, .vc_col-md-4,
.vc_col-md-5, .vc_col-md-6, .vc_col-md-7, .vc_col-md-8,
.vc_col-md-9, .vc_col-md-10, .vc_col-md-11, .vc_col-md-12,
.vc_col-lg-1, .vc_col-lg-2, .vc_col-lg-3, .vc_col-lg-4,
.vc_col-lg-5, .vc_col-lg-6, .vc_col-lg-7, .vc_col-lg-8,
.vc_col-lg-9, .vc_col-lg-10, .vc_col-lg-11, .vc_col-lg-12 {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
}

/* Full width columns */
.vc_col-xs-12 { width: 100%; }
.vc_col-xs-11 { width: 91.66666667%; }
.vc_col-xs-10 { width: 83.33333333%; }
.vc_col-xs-9 { width: 75%; }
.vc_col-xs-8 { width: 66.66666667%; }
.vc_col-xs-7 { width: 58.33333333%; }
.vc_col-xs-6 { width: 50%; }
.vc_col-xs-5 { width: 41.66666667%; }
.vc_col-xs-4 { width: 33.33333333%; }
.vc_col-xs-3 { width: 25%; }
.vc_col-xs-2 { width: 16.66666667%; }
.vc_col-xs-1 { width: 8.33333333%; }

/* Small devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .vc_col-sm-12 { width: 100%; }
    .vc_col-sm-11 { width: 91.66666667%; }
    .vc_col-sm-10 { width: 83.33333333%; }
    .vc_col-sm-9 { width: 75%; }
    .vc_col-sm-8 { width: 66.66666667%; }
    .vc_col-sm-7 { width: 58.33333333%; }
    .vc_col-sm-6 { width: 50%; }
    .vc_col-sm-5 { width: 41.66666667%; }
    .vc_col-sm-4 { width: 33.33333333%; }
    .vc_col-sm-3 { width: 25%; }
    .vc_col-sm-2 { width: 16.66666667%; }
    .vc_col-sm-1 { width: 8.33333333%; }
}

/* Medium devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .vc_col-md-12 { width: 100%; }
    .vc_col-md-11 { width: 91.66666667%; }
    .vc_col-md-10 { width: 83.33333333%; }
    .vc_col-md-9 { width: 75%; }
    .vc_col-md-8 { width: 66.66666667%; }
    .vc_col-md-7 { width: 58.33333333%; }
    .vc_col-md-6 { width: 50%; }
    .vc_col-md-5 { width: 41.66666667%; }
    .vc_col-md-4 { width: 33.33333333%; }
    .vc_col-md-3 { width: 25%; }
    .vc_col-md-2 { width: 16.66666667%; }
    .vc_col-md-1 { width: 8.33333333%; }
}

/* Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .vc_col-lg-12 { width: 100%; }
    .vc_col-lg-11 { width: 91.66666667%; }
    .vc_col-lg-10 { width: 83.33333333%; }
    .vc_col-lg-9 { width: 75%; }
    .vc_col-lg-8 { width: 66.66666667%; }
    .vc_col-lg-7 { width: 58.33333333%; }
    .vc_col-lg-6 { width: 50%; }
    .vc_col-lg-5 { width: 41.66666667%; }
    .vc_col-lg-4 { width: 33.33333333%; }
    .vc_col-lg-3 { width: 25%; }
    .vc_col-lg-2 { width: 16.66666667%; }
    .vc_col-lg-1 { width: 8.33333333%; }
}

/* Bootstrap 3 pull/push classes compatibility */
.col-xs-pull-12 { right: 100%; }
.col-xs-pull-11 { right: 91.66666667%; }
.col-xs-pull-10 { right: 83.33333333%; }
.col-xs-pull-9 { right: 75%; }
.col-xs-pull-8 { right: 66.66666667%; }
.col-xs-pull-7 { right: 58.33333333%; }
.col-xs-pull-6 { right: 50%; }
.col-xs-pull-5 { right: 41.66666667%; }
.col-xs-pull-4 { right: 33.33333333%; }
.col-xs-pull-3 { right: 25%; }
.col-xs-pull-2 { right: 16.66666667%; }
.col-xs-pull-1 { right: 8.33333333%; }
.col-xs-pull-0 { right: auto; }

.col-xs-push-12 { left: 100%; }
.col-xs-push-11 { left: 91.66666667%; }
.col-xs-push-10 { left: 83.33333333%; }
.col-xs-push-9 { left: 75%; }
.col-xs-push-8 { left: 66.66666667%; }
.col-xs-push-7 { left: 58.33333333%; }
.col-xs-push-6 { left: 50%; }
.col-xs-push-5 { left: 41.66666667%; }
.col-xs-push-4 { left: 33.33333333%; }
.col-xs-push-3 { left: 25%; }
.col-xs-push-2 { left: 16.66666667%; }
.col-xs-push-1 { left: 8.33333333%; }
.col-xs-push-0 { left: auto; }

/* Bootstrap 3 offset classes compatibility */
.col-xs-offset-12 { margin-left: 100%; }
.col-xs-offset-11 { margin-left: 91.66666667%; }
.col-xs-offset-10 { margin-left: 83.33333333%; }
.col-xs-offset-9 { margin-left: 75%; }
.col-xs-offset-8 { margin-left: 66.66666667%; }
.col-xs-offset-7 { margin-left: 58.33333333%; }
.col-xs-offset-6 { margin-left: 50%; }
.col-xs-offset-5 { margin-left: 41.66666667%; }
.col-xs-offset-4 { margin-left: 33.33333333%; }
.col-xs-offset-3 { margin-left: 25%; }
.col-xs-offset-2 { margin-left: 16.66666667%; }
.col-xs-offset-1 { margin-left: 8.33333333%; }
.col-xs-offset-0 { margin-left: 0; }

/* Bootstrap 3 to 5: data-toggle to data-bs-toggle migration handled via JS */
/* Bootstrap 5 uses data-bs-toggle, data-bs-target instead of data-toggle, data-target */

/* Hidden classes compatibility */
.hidden-xs, .hidden-sm, .hidden-md, .hidden-lg {
    display: none !important;
}

@media (min-width: 768px) {
    .hidden-xs { display: block !important; }
}

@media (min-width: 992px) {
    .hidden-sm { display: block !important; }
}

@media (min-width: 1200px) {
    .hidden-md { display: block !important; }
}

@media (min-width: 1400px) {
    .hidden-lg { display: block !important; }
}

/* Visible classes compatibility */
.visible-xs, .visible-sm, .visible-md, .visible-lg {
    display: none !important;
}

@media (max-width: 767px) {
    .visible-xs { display: block !important; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .visible-sm { display: block !important; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .visible-md { display: block !important; }
}

@media (min-width: 1200px) {
    .visible-lg { display: block !important; }
}

/* Bootstrap 3 panel compatibility */
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
}

.panel-default {
    border-color: #ddd;
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.panel-body {
    padding: 15px;
}

/* Bootstrap 3 wells compatibility */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}

/* Bootstrap 3 thumbnail compatibility */
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border .2s ease-in-out;
}

.thumbnail > img {
    margin-right: auto;
    margin-left: auto;
}

/* Bootstrap 3 form control compatibility enhancements */
.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Input group compatibility */
.input-group {
    position: relative;
    display: table;
    border-collapse: separate;
}

.input-group-addon {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
}
