/*
 * Bootstrap 3 markup compatibility for the Walz site.
 * Colors, backgrounds, artwork and typography remain in the site stylesheets.
 */

.container,
.row {
    --bs-gutter-x: 30px;
}

/* The existing templates use floated columns, including columns inside asides. */
.row {
    display: block;
}

.row::before,
.row::after {
    display: table;
    content: " ";
}

.row::after {
    clear: both;
}

/* Bootstrap 3 containers cleared floated children. Several shared templates
   still rely on that behavior, including the footer columns. */
.container::before,
.container::after {
    display: table;
    content: " ";
}

.container::after {
    clear: both;
}

.row > * {
    width: auto;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
    margin-top: 0;
}

/* Retain the Bootstrap 3 container widths used by the existing artwork. */
.container {
    width: auto;
    max-width: none;
}

@media (min-width: 768px) {
    .container {
        width: 750px;
        max-width: 750px;
    }
}

@media (min-width: 992px) {
    .container {
        width: 970px;
        max-width: 970px;
    }
}

@media (min-width: 1200px) {
    .container {
        width: 1170px;
        max-width: 1170px;
    }
}

.pull-left {
    float: left !important;
}

.pull-right {
    float: right !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.col-xs-3,
.col-xs-4,
.col-xs-6,
.col-xs-8,
.col-xs-9,
.col-sm-3,
.col-sm-4,
.col-sm-12,
.col-md-3,
.col-md-6,
.col-md-9,
.col-md-12 {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
}

.col-xs-3,
.col-xs-4,
.col-xs-6,
.col-xs-8,
.col-xs-9 {
    float: left;
}

.col-xs-3 { width: 25%; }
.col-xs-4 { width: 33.33333333%; }
.col-xs-6 { width: 50%; }
.col-xs-8 { width: 66.66666667%; }
.col-xs-9 { width: 75%; }

/* Bootstrap 5 begins sm and md columns earlier than Bootstrap 3. */
@media (min-width: 576px) and (max-width: 767.98px) {
    .col-sm-3,
    .col-sm-4,
    .col-sm-12 {
        flex: 0 0 100%;
        width: 100%;
        float: none;
    }

    .col-xs-3 { width: 25%; float: left; }
    .col-xs-4 { width: 33.33333333%; float: left; }
    .col-xs-6 { width: 50%; float: left; }
    .col-xs-8 { width: 66.66666667%; float: left; }
    .col-xs-9 { width: 75%; float: left; }
}

@media (min-width: 768px) {
    .col-sm-3 { flex: 0 0 25%; width: 25%; float: left; }
    .col-sm-4 { flex: 0 0 33.33333333%; width: 33.33333333%; float: left; }
    .col-sm-12 { flex: 0 0 100%; width: 100%; float: left; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .col-md-3,
    .col-md-6,
    .col-md-9,
    .col-md-12 {
        flex: 0 0 100%;
        width: 100%;
        float: none;
    }

    .col-xs-3 { width: 25%; float: left; }
    .col-xs-4 { width: 33.33333333%; float: left; }
    .col-xs-6 { width: 50%; float: left; }
    .col-xs-8 { width: 66.66666667%; float: left; }
    .col-xs-9 { width: 75%; float: left; }

    .col-sm-3 { flex: 0 0 25%; width: 25%; float: left; }
    .col-sm-4 { flex: 0 0 33.33333333%; width: 33.33333333%; float: left; }
    .col-sm-12 { flex: 0 0 100%; width: 100%; float: left; }
}

@media (min-width: 992px) {
    .col-md-3 { flex: 0 0 25%; width: 25%; float: left; }
    .col-md-6 { flex: 0 0 50%; width: 50%; float: left; }
    .col-md-9 { flex: 0 0 75%; width: 75%; float: left; }
    .col-md-12 { flex: 0 0 100%; width: 100%; float: left; }
}

@media (max-width: 767.98px) {
    .hidden-xs {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-sm {
        display: none !important;
    }
}

.navbar-header::before,
.navbar-header::after,
.navbar-collapse::before,
.navbar-collapse::after {
    display: table;
    content: " ";
}

.navbar-header::after,
.navbar-collapse::after {
    clear: both;
}

.navbar-toggle {
    position: relative;
    float: right;
    display: none;
    padding: 9px 10px;
    background-color: transparent;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #888;
}

.navbar-toggle .icon-bar + .icon-bar {
    margin-top: 4px;
}

#topmenu .navbar,
#topmenu .navbar-nav {
    display: block;
}

.navbar-nav {
    padding-left: 0;
    list-style: none;
}

.navbar-nav > li > a {
    position: relative;
    display: block;
}

/* Bootstrap 5 expects dropdown-item classes, while the existing menus use
   Bootstrap 3 list markup. Restore the old full-row link behavior. */
#topmenu .dropdown-menu > li > a {
    display: block;
    clear: both;
    width: 100%;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

/* The templates already include the original caret element. Do not draw the
   additional Bootstrap 5 pseudo-element arrow on the same link. */
#topmenu .dropdown-toggle::after {
    display: none;
}

.open > .dropdown-menu {
    display: block;
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px dashed;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.well {
    min-height: 20px;
    margin-bottom: 20px;
}

.media-body {
    overflow: hidden;
    zoom: 1;
}

#footer .site-credit {
    clear: both;
    padding-top: 10px;
    color: #fff;
    text-align: right;
}

#footer .site-credit span,
#footer .site-credit img {
    display: inline-block;
    vertical-align: middle;
}

#footer .site-credit span {
    margin-right: 8px;
}

@media (min-width: 992px) {
    .navbar-header {
        float: left;
    }

    #topmenu .navbar-nav {
        float: left;
        margin: 0;
    }

    #topmenu .navbar-nav > li {
        float: left;
    }

    #topmenu .navbar-collapse {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }
}
