/*
 * Compatibilità residuale dopo il passaggio Bootstrap 3 → 5.
 * Mantiene layout e componenti custom SuperOne.
 */

img {
    max-width: 100%;
    height: auto;
}

/* Alias classi rimosse in BS5 ma ancora referenziate nel CSS di progetto */
.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-active-color: #333;
    --bs-btn-active-bg: #e6e6e6;
    --bs-btn-active-border-color: #adadad;
}

/* BS5 usa .show al posto di .open sui dropdown */
.open > .dropdown-menu,
.dropdown-menu.show {
    display: block;
}

/* Link nei dropdown legacy (li > a senza .dropdown-item) */
.dropdown-menu > li > a {
    display: block;
    width: 100%;
    padding: 0.4rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    color: #1e2125;
    background-color: #e9ecef;
}

/* form-group era in BS3 */
.form-group {
    margin-bottom: 1rem;
}

.help-block {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #737373;
}

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

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

.col-md-offset-7 {
    margin-left: 58.33333333%;
}

@media (min-width: 768px) {
    .col-md-offset-7 {
        margin-left: 58.33333333%;
    }
}

.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.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;
}

.center-block {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-xs {
    --bs-btn-padding-y: 0.1rem;
    --bs-btn-padding-x: 0.4rem;
    --bs-btn-font-size: 0.75rem;
    --bs-btn-border-radius: 0.2rem;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

/* Affinchè i dropdown legacy (btn-group) si aprano anche se manca .dropdown */
.btn-group {
    position: relative;
}

/* Gutters più vicini a BS3 dove il layout legacy li assume */
.row {
    --bs-gutter-x: 30px;
}

/* Label stile BS3 su form verticali */
label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Evita che i bottoni BS5 rompano i controlli custom arancioni */
.btn:focus,
.btn:active:focus {
    box-shadow: none;
}

/* Carousel indicators legacy (volantino) */
.carousel-indicators [data-bs-target] {
    box-sizing: content-box;
}
