/* =========================================================
   Bootstrap 3 -> Bootstrap 5 Legacy Compatibility
   ========================================================= */

/* Form group spacing */
.form-group {
    margin-bottom: 1rem;
}

.form-group + .row {
    margin-top: 1rem;
}

.form-group + .form-group {
    margin-top: 1rem;
}

/* Default form control width */
.form-group .form-control {
    width: 100%;
    max-width: 350px;
}

/* Allow textarea to use full available width */
.form-group textarea.form-control {
    max-width: 100%;
}

/* Bootstrap 3 style select appearance */
select.form-control {
    display: block;
    width: 100%;
    padding: .375rem 2.25rem .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

.form-group select.form-control {
    max-width: 350px;
}

/* Keep placeholder text visible with Bootstrap 3 styling */
.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
    color: #6c757d !important;
    opacity: 1;
}

/* Bootstrap 3 text-muted compatibility */
.text-muted {
    color: #6c757d !important;
}

/* Bootstrap 3 form-inline compatibility */
.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

/* Align form groups inside inline forms */
.form-inline .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

/* Keep inline form labels aligned properly */
.form-inline label {
    margin-bottom: 0;
    white-space: nowrap;
}

/* Keep controls compact inside inline forms */
.form-inline .form-control {
    display: inline-block;
    width: auto;
    max-width: 250px;
}

/* Keep select controls compact inside inline forms */
.form-inline select.form-control {
    width: auto;
    max-width: 250px;
}

/* Prevent Bootstrap 5 row spacing from affecting inline forms */
.row.form-inline {
    margin-left: 0;
    margin-right: 0;
}

/* Bootstrap 3 btn-block compatibility */
.btn-block {
    display: block;
    width: 100%;
}

/* Bootstrap 5 bg-secondary compatibility */
.bg-secondary {
    background-color: #6c757d !important;
}

/* Keep form buttons at their natural width */
.form-group .btn {
    width: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.blockquote-footer {
    margin-top: -1rem;
    margin-bottom: 1rem;
    font-size: .875em;
    color: #6c757d !important;
}

