/*
	Stuff we aren't quite ready to migrate yet or require new UI. 
	 - NOT for overwriting bootstrap5. If bootstrap defines it, do NOT overwrite here - try to migrate properly. 
   - If you must, scroll down to bottom for code that overwrite - don't globally overwrite, only local
   - Only touch top Navbar behavior as a last resort, that tries to stay as native BS5 as possible
  Original Snippets from :  
 * Bootstrap v3.3.1 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

/* Code Below Ovewrite Bootstrap 5 - Be careful and use sparingly - Try not to be generic and target */
/* We now have a Bootstrap3 body.fw_content_b3 in body that can be used to reimplement stuff that is needed */
/* Forms should be slowly moved to not use this
   pass 'bootstrap3_mode: True' in views enable all this code, or use Bootstrap3Mode(). report_wrapper automatically does this.
   if you want to make a report wrapper bootstrap5 only, use - bootstrap5:  True in context;
 */


/* Mostly meant to brige forms */


body.fw_content_b3 a:is(.btn-default, .btn, .btn-primary, .btn-warning, .btn-danger, .btn-xs, .btn-lg, .btn-sm) {
  border-radius: revert;
  text-decoration: initial!important;
}




/* Form Compatibility + compatibility, stuff not implemented in bootstrap 5. Should Port one day, but very code heavy */
/*  Forms will use regardless, but some divs can activate this code  */


body.fw_content_b3  :is(form.form-compact, form.form-horizontal) .form-group {
  margin-bottom:15px
}


/* Floating Left is relied for forms and some older code */

  @media (min-width: 1200px) {
    body.fw_content_b3 :is(form.form-compact, form.form-horizontal, .fw_bs3_compatibility, form.form-inline) :is(.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12) {
        float: left;
  }
}

@media (min-width: 992px) {
  body.fw_content_b3  :is(form.form-compact, form.form-horizontal, .fw_bs3_compatibility, form.form-inline) :is(.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12) {
    float: left;
  }
}

@media (min-width: 768px) {
  body.fw_content_b3  :is(form.form-compact, .fw_bs3_compatibility, form.form-inline) :is(.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12) {
        float: left;
    }
}

body.fw_content_b3 form.form-compact :is(.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12) {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

body.fw_content_b3 :is(form.form-compact, form.form-inline) legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
  font-size: 21px;
  line-height: inherit;
  color: #333;
  border: 0;
    border-bottom-color: currentcolor;
    border-bottom-style: none;
    border-bottom-width: 0px;
  border-bottom: 1px solid #e5e5e5;
}

/* Fixed Buttons on some forms */

body.fw_content_b3 :is(form.form-compact, form.form-inline) div.row input.btn {
  width: fit-content !important;
}

/* More form fixes  */

body.fw_content_b3  .form-horizontal .form-group:before,
body.fw_content_b3  .form-horizontal .form-group:after {
  display: table;
  content: " ";
}

/* Clear fix */
body.fw_content_b3 .form-horizontal .form-group:after {
  clear: both;
}

/* End Form Comptability  */

/* h3 more close */

body.fw_content_b3 :is(h1, .h1, h2, .h2, h3, .h3) {
  margin-top: 20px!important;
  margin-bottom: 10px!important;
}


body.fw_content_b3 .select2-container {
  min-width: fit-content !important
}

/* Common Elements Fixes - Prevents underline on everything */

body.fw_content_b3 a {
  text-decoration: none;
}

body.fw_content_b3 :is(a:hover, a:focus) {
  text-decoration: underline;
}

body.fw_content_b3 nav :is(a:hover, a:focus) {
  text-decoration: none;
}

@media (min-width: 768px) {
  body.fw_content_b3 .form-inline .form-group {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
  }
  body.fw_content_b3 .form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
  }
  body.fw_content_b3 .form-inline .form-control-static {
    display: inline-block;
  }
  body.fw_content_b3 .form-inline .input-group {
    display: inline-table;
    vertical-align: middle;
  }
  body.fw_content_b3 .form-inline .input-group .input-group-addon,
  body.fw_content_b3 .form-inline .input-group .input-group-btn,
  body.fw_content_b3 .form-inline .input-group .form-control {
    width: auto;
  }
  body.fw_content_b3 .form-inline .input-group > .form-control {
    width: 100%;
  }
  body.fw_content_b3 .form-inline .control-label {
    margin-bottom: 0;
    vertical-align: middle;
  }
  body.fw_content_b3 .form-inline .radio,
  body.fw_content_b3 .form-inline .checkbox {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
  }
  body.fw_content_b3 .form-inline .radio label,
  body.fw_content_b3 .form-inline .checkbox label {
    padding-left: 0;
  }
  body.fw_content_b3 .form-inline .radio input[type="radio"],
  body.fw_content_b3 .form-inline .checkbox input[type="checkbox"] {
    position: relative;
    margin-left: 0;
  }
  body.fw_content_b3 form-inline .has-feedback .form-control-feedback {
    top: 0;
  }
}

/* Bootstrap 3 to 5 offsets */
/* Bootstrap 5 renamed these */
/* adding as needed, currently only 4 is added */

@media (min-width: 1200px) {
  body.fw_content_b3 .col-lg-offset-4 {
    margin-left: 33.33333333%;
  }

}
