/*
 * Bootstrap 3 → 5 Compatibility Layer
 * Maps old BS3 classes to BS5 equivalents
 */

/* Pull classes → Float */
.pull-right { float: right !important; }
.pull-left { float: left !important; }

/* Hidden/Visible responsive classes */
.hidden-xs { display: none !important; }
@media (min-width: 576px) { .hidden-xs { display: block !important; } }
@media (min-width: 576px) { .hidden-sm { display: none !important; } }
@media (min-width: 768px) { .hidden-sm { display: block !important; } }
@media (min-width: 768px) { .hidden-md { display: none !important; } }
@media (min-width: 992px) { .hidden-md { display: block !important; } }
@media (min-width: 992px) { .hidden-lg { display: none !important; } }
@media (min-width: 1200px) { .hidden-lg { display: block !important; } }

.vissible-xs, .visible-xs { display: block !important; }
@media (min-width: 576px) { .vissible-xs, .visible-xs { display: none !important; } }

/* img-responsive → img-fluid */
.img-responsive { max-width: 100%; height: auto; display: block; }

/* btn-default → BS5 style */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
.btn-default:hover, .btn-default:focus {
    color: #333;
    background-color: #e6e6e6;
    border-color: #adadad;
}

/* form-horizontal compatibility */
.form-horizontal .control-label { text-align: right; }
@media (max-width: 767px) { .form-horizontal .control-label { text-align: left; } }

/* form-control1 custom (not BS but used in the app) */
.form-control1 {
    font-size: 14px;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    height: 34px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* input-sm compatibility */
.input-sm, .form-control.input-sm {
    height: 30px;
    padding: 5px 10px;
    font-size: 12px;
}

/* Panel → Card mapping */
.panel { border: 1px solid #ddd; border-radius: 4px; margin-bottom: 20px; background: #fff; }
.panel-primary { border-color: #337ab7; }
.panel-primary > .panel-heading { background-color: #337ab7; color: #fff; }
.panel-heading { padding: 10px 15px; border-bottom: 1px solid #ddd; border-radius: 3px 3px 0 0; }
.panel-body { padding: 15px; }
.panel-footer { padding: 10px 15px; background: #f5f5f5; border-top: 1px solid #ddd; border-radius: 0 0 3px 3px; }
.panel-group { margin-bottom: 20px; }

/* col-md-offset → offset-md compatibility */
.col-md-offset-1 { margin-left: 8.333333%; }
.col-md-offset-2 { margin-left: 16.666667%; }
.col-md-offset-3 { margin-left: 25%; }
.col-md-offset-4 { margin-left: 33.333333%; }
.col-md-offset-5 { margin-left: 41.666667%; }
.col-md-offset-6 { margin-left: 50%; }
.col-sm-offset-6 { margin-left: 50%; }

/* col-xs → col mapping (BS5 uses col- for xs) */
.col-xs-1 { flex: 0 0 auto; width: 8.333333%; }
.col-xs-2 { flex: 0 0 auto; width: 16.666667%; }
.col-xs-3 { flex: 0 0 auto; width: 25%; }
.col-xs-4 { flex: 0 0 auto; width: 33.333333%; }
.col-xs-5 { flex: 0 0 auto; width: 41.666667%; }
.col-xs-6 { flex: 0 0 auto; width: 50%; }
.col-xs-7 { flex: 0 0 auto; width: 58.333333%; }
.col-xs-8 { flex: 0 0 auto; width: 66.666667%; }
.col-xs-9 { flex: 0 0 auto; width: 75%; }
.col-xs-10 { flex: 0 0 auto; width: 83.333333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.666667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%; }

/* Navbar compatibility */
.navbar-inverse-blue {
    background-color: #0F7800;
}
.navbar-inner, .navbar-inner_1 {
    padding: 0;
}
.navbar-toggle1 {
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
}
.navbar-toggle1:hover {
    background: rgba(255,255,255,0.1);
}
.navbar-toggle1 .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #fff;
    margin: 3px 0;
}

/* Badge colors */
.badge-pending { background-color: #f0ad4e !important; }
.badge-active { background-color: #5cb85c !important; }
.badge-rejected { background-color: #d9534f !important; }
.badge-suspended { background-color: #777 !important; }

/* btn-flat */
.btn-flat { border-radius: 0; }

/* Clearfix */
.clearfix::after { content: ""; display: table; clear: both; }

/* BS3 label styling (not badge) */
label { font-weight: 700; margin-bottom: 5px; }

/* Fix form-group spacing for BS5 */
.form-group { margin-bottom: 15px; }

/* No-padding utilities */
.no-padding { padding: 0 !important; }
.no-right-padding { padding-right: 0 !important; padding-left: 15px !important; }
.no-left-padding { padding-left: 0 !important; padding-right: 15px !important; }

/* Alert link */
.alert-link { font-weight: bold; text-decoration: underline; }

/* BS3 .close button compatibility */
.close {
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .2;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.close:hover { opacity: .5; }

/* Modal header close button fix */
.modal-header .close { margin: -2px -2px -2px auto; }

/* BS5 navbar collapse fix for BS3 markup */
.navbar-collapse.collapsing,
.navbar-collapse.show {
    display: block !important;
}
.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
}

/* Table compatibility */
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
    vertical-align: middle;
}
