/*
 * Transitional Bootstrap 3 compatibility for the existing Web Forms markup.
 * Keep this file loaded directly after Bootstrap 5. Remove rules gradually as
 * views are migrated to native Bootstrap 5 classes.
 */

.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.center-block {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.pull-left {
    float: left !important;
}

.pull-right {
    float: right !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.hidden {
    display: none !important;
}

.btn-default {
    --bs-btn-color: #333;
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #ccc;
    --bs-btn-hover-color: #333;
    --bs-btn-hover-bg: #e6e6e6;
    --bs-btn-hover-border-color: #adadad;
    --bs-btn-focus-shadow-rgb: 204, 204, 204;
    --bs-btn-active-color: #333;
    --bs-btn-active-bg: #e6e6e6;
    --bs-btn-active-border-color: #adadad;
    --bs-btn-disabled-color: #333;
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: #ccc;
}

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
    padding: 5px;
}

.close {
    float: right;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: .2;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    opacity: .5;
}

.modal-header {
    display: block;
}

.modal-header::after {
    display: table;
    clear: both;
    content: "";
}

.modal-header .close {
    margin-top: -2px;
}

.input-group-addon {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    text-align: center;
    white-space: nowrap;
}

/*
 * Bootstrap 3 allowed <ul class="nav ..."><li><a> without Bootstrap-specific
 * classes on the li/a elements. Bootstrap 5 styles only .nav-link, so retain
 * the legacy tab and pill contract until each Web Forms view is migrated.
 */
.nav > li {
    position: relative;
    display: block;
}

.nav > li > a:not(.nav-link) {
    position: relative;
    display: block;
    padding: 10px 15px;
    text-decoration: none;
}

.nav > li > a:not(.nav-link):hover,
.nav > li > a:not(.nav-link):focus {
    background-color: #eee;
    text-decoration: none;
}

.nav-tabs > li {
    margin-bottom: -1px;
}

.nav-tabs > li > a:not(.nav-link) {
    margin-right: 2px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    line-height: 1.42857143;
}

.nav-tabs > li > a:not(.nav-link):hover {
    border-color: #eee #eee #ddd;
}

.nav-tabs > li.active > a:not(.nav-link),
.nav-tabs > li.active > a:not(.nav-link):hover,
.nav-tabs > li.active > a:not(.nav-link):focus {
    border: 1px solid #ddd;
    border-bottom-color: transparent;
    background-color: #fff;
    color: #555;
    cursor: default;
}

.nav-pills > li > a:not(.nav-link) {
    border-radius: 4px;
}

.nav-pills > li + li {
    margin-left: 2px;
}

.nav-pills > li.active > a:not(.nav-link),
.nav-pills > li.active > a:not(.nav-link):hover,
.nav-pills > li.active > a:not(.nav-link):focus {
    background-color: #337ab7;
    color: #fff;
}

/* Custom .formtabs overrides .nav's flex display and therefore needs the
 * Bootstrap 3 float/clearfix behavior explicitly. */
.formtabs > li {
    float: left;
}

.formtabs::after {
    display: table;
    clear: both;
    content: "";
}

/* Generated admin rows already have their own legacy margins. Bootstrap 5's
 * .row > * rule otherwise adds a second full width and horizontal padding,
 * which makes each record wider than the header/container. */
.radposter-row > [class*="radposter-"] {
    flex: 0 0 calc(100% - var(--bs-gutter-x));
    width: calc(100% - var(--bs-gutter-x));
    max-width: calc(100% - var(--bs-gutter-x));
    margin-right: calc(var(--bs-gutter-x) * .5);
    margin-left: calc(var(--bs-gutter-x) * .5);
    padding-right: 0;
    padding-left: 0;
}

/* Bootstrap 5 uses flex items that only form columns inside .row. The legacy
 * Web Forms markup also nests columns directly inside columns, so restore the
 * Bootstrap 3 float grid and its original sm/md/lg breakpoints. */
[class*="col-xs-"],
[class*="col-sm-"],
[class*="col-md-"],
[class*="col-lg-"] {
    position: relative;
    flex: 0 0 auto;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
}

[class*="col-xs-"] {
    float: left;
}

.col-xs-1 { width: 8.33333333%; }
.col-xs-2 { width: 16.66666667%; }
.col-xs-3 { width: 25%; }
.col-xs-4 { width: 33.33333333%; }
.col-xs-5 { width: 41.66666667%; }
.col-xs-6 { width: 50%; }
.col-xs-7 { width: 58.33333333%; }
.col-xs-8 { width: 66.66666667%; }
.col-xs-9 { width: 75%; }
.col-xs-10 { width: 83.33333333%; }
.col-xs-11 { width: 91.66666667%; }
.col-xs-12 { width: 100%; }

/* Before their Bootstrap 3 breakpoint, responsive columns are full width. */
[class*="col-sm-"],
[class*="col-md-"],
[class*="col-lg-"] { width: 100%; }

@media (min-width: 768px) {
    [class*="col-sm-"] { float: left; }
    .col-sm-1 { width: 8.33333333%; }
    .col-sm-2 { width: 16.66666667%; }
    .col-sm-3 { width: 25%; }
    .col-sm-4 { width: 33.33333333%; }
    .col-sm-5 { width: 41.66666667%; }
    .col-sm-6 { width: 50%; }
    .col-sm-7 { width: 58.33333333%; }
    .col-sm-8 { width: 66.66666667%; }
    .col-sm-9 { width: 75%; }
    .col-sm-10 { width: 83.33333333%; }
    .col-sm-11 { width: 91.66666667%; }
    .col-sm-12 { width: 100%; }
}

@media (min-width: 992px) {
    [class*="col-md-"] { float: left; }
    .col-md-1 { width: 8.33333333%; }
    .col-md-2 { width: 16.66666667%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.33333333%; }
    .col-md-5 { width: 41.66666667%; }
    .col-md-6 { width: 50%; }
    .col-md-7 { width: 58.33333333%; }
    .col-md-8 { width: 66.66666667%; }
    .col-md-9 { width: 75%; }
    .col-md-10 { width: 83.33333333%; }
    .col-md-11 { width: 91.66666667%; }
    .col-md-12 { width: 100%; }
}

@media (min-width: 1200px) {
    [class*="col-lg-"] { float: left; }
    .col-lg-1 { width: 8.33333333%; }
    .col-lg-2 { width: 16.66666667%; }
    .col-lg-3 { width: 25%; }
    .col-lg-4 { width: 33.33333333%; }
    .col-lg-5 { width: 41.66666667%; }
    .col-lg-6 { width: 50%; }
    .col-lg-7 { width: 58.33333333%; }
    .col-lg-8 { width: 66.66666667%; }
    .col-lg-9 { width: 75%; }
    .col-lg-10 { width: 83.33333333%; }
    .col-lg-11 { width: 91.66666667%; }
    .col-lg-12 { width: 100%; }
}

.visible-xs,
.visible-sm,
.visible-md,
.visible-lg,
.visible-xs-block,
.visible-sm-block,
.visible-md-block,
.visible-lg-block,
.visible-xs-inline,
.visible-sm-inline,
.visible-md-inline,
.visible-lg-inline,
.visible-xs-inline-block,
.visible-sm-inline-block,
.visible-md-inline-block,
.visible-lg-inline-block {
    display: none !important;
}

@media (max-width: 767.98px) {
    .hidden-xs { display: none !important; }
    .visible-xs,
    .visible-xs-block { display: block !important; }
    .visible-xs-inline { display: inline !important; }
    .visible-xs-inline-block { display: inline-block !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-sm { display: none !important; }
    .visible-sm,
    .visible-sm-block { display: block !important; }
    .visible-sm-inline { display: inline !important; }
    .visible-sm-inline-block { display: inline-block !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .hidden-md { display: none !important; }
    .visible-md,
    .visible-md-block { display: block !important; }
    .visible-md-inline { display: inline !important; }
    .visible-md-inline-block { display: inline-block !important; }
}

@media (min-width: 1200px) {
    .hidden-lg { display: none !important; }
    .visible-lg,
    .visible-lg-block { display: block !important; }
    .visible-lg-inline { display: inline !important; }
    .visible-lg-inline-block { display: inline-block !important; }
}
