/*
 * bs3-compat.css — shim de compatibilidade Bootstrap 3 -> Bootstrap 5
 * Permite que XHTMLs antigos continuem renderizando sem reescrita imediata.
 * Carregue DEPOIS do bootstrap.css (BS5).
 *
 * Cobre as classes BS3 que foram removidas ou renomeadas no BS5.
 * Após o redesign completo do sistema, este arquivo pode ser removido.
 */

/* ========== GRID ========== */
/* BS5 já tem col-xs-* removido; col-* funciona como o antigo col-xs-* */
.col-xs-1 { flex: 0 0 auto; width: 8.33333333%; }
.col-xs-2 { flex: 0 0 auto; width: 16.66666667%; }
.col-xs-3 { flex: 0 0 auto; width: 25%; }
.col-xs-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-xs-5 { flex: 0 0 auto; width: 41.66666667%; }
.col-xs-6 { flex: 0 0 auto; width: 50%; }
.col-xs-7 { flex: 0 0 auto; width: 58.33333333%; }
.col-xs-8 { flex: 0 0 auto; width: 66.66666667%; }
.col-xs-9 { flex: 0 0 auto; width: 75%; }
.col-xs-10 { flex: 0 0 auto; width: 83.33333333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.66666667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%; }
.col-xs-offset-1 { margin-left: 8.33333333%; }
.col-xs-offset-2 { margin-left: 16.66666667%; }
.col-xs-offset-3 { margin-left: 25%; }
.col-xs-offset-4 { margin-left: 33.33333333%; }
.col-xs-offset-5 { margin-left: 41.66666667%; }
.col-xs-offset-6 { margin-left: 50%; }
.col-xs-offset-7 { margin-left: 58.33333333%; }
.col-xs-offset-8 { margin-left: 66.66666667%; }
.col-xs-offset-9 { margin-left: 75%; }
.col-xs-offset-10 { margin-left: 83.33333333%; }
.col-xs-offset-11 { margin-left: 91.66666667%; }

/* col-sm/md/lg-offset-* foram renomeados pra offset-sm/md/lg-* no BS5 */
@media (min-width: 576px) {
    .col-sm-offset-1 { margin-left: 8.33333333%; }
    .col-sm-offset-2 { margin-left: 16.66666667%; }
    .col-sm-offset-3 { margin-left: 25%; }
    .col-sm-offset-4 { margin-left: 33.33333333%; }
    .col-sm-offset-5 { margin-left: 41.66666667%; }
    .col-sm-offset-6 { margin-left: 50%; }
}
@media (min-width: 768px) {
    .col-md-offset-1 { margin-left: 8.33333333%; }
    .col-md-offset-2 { margin-left: 16.66666667%; }
    .col-md-offset-3 { margin-left: 25%; }
    .col-md-offset-4 { margin-left: 33.33333333%; }
    .col-md-offset-5 { margin-left: 41.66666667%; }
    .col-md-offset-6 { margin-left: 50%; }
}

/* ========== UTILITIES ========== */
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }

/* Visibility helpers (BS3) -> BS5 equivalentes */
.hidden { display: none !important; visibility: hidden !important; }
@media (max-width: 575.98px) { .hidden-xs { display: none !important; } }
@media (min-width: 576px) and (max-width: 767.98px) { .hidden-sm { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .hidden-md { display: none !important; } }
@media (min-width: 992px) { .hidden-lg { display: none !important; } }

.visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; }
@media (max-width: 575.98px) { .visible-xs { display: block !important; } }
@media (min-width: 576px) and (max-width: 767.98px) { .visible-sm { display: block !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .visible-md { display: block !important; } }
@media (min-width: 992px) { .visible-lg { display: block !important; } }

/* ========== PANEL (BS3) -> CARD (BS5) ========== */
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.panel-default { border-color: #ddd; }
.panel-primary { border-color: #ec5d4f; }
.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    background-color: #f5f5f5;
}
.panel-primary > .panel-heading {
    color: #fff;
    background-color: #ec5d4f;
    border-color: #ec5d4f;
}
.panel-title { margin: 0; font-size: 16px; }
.panel-body { padding: 15px; }
.panel-footer {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* ========== WELL (BS3) ========== */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
}
.well-sm { padding: 9px; border-radius: 3px; }
.well-lg { padding: 24px; border-radius: 6px; }

/* ========== THUMBNAIL ========== */
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    line-height: 1.42857143;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border .2s ease-in-out;
}

/* ========== BUTTONS ========== */
/* btn-default (BS3) virou btn-secondary (BS5) — replicamos para não quebrar */
.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
.btn-default:hover, .btn-default:focus {
    color: #333;
    background-color: #e6e6e6;
    border-color: #adadad;
}
.btn-xs { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; }

/* ========== IMAGES ========== */
.img-responsive { display: block; max-width: 100%; height: auto; }
.img-circle { border-radius: 50%; }
.img-rounded { border-radius: 6px; }

/* ========== FORMS ========== */
.form-control-static {
    min-height: 34px;
    padding-top: 7px;
    padding-bottom: 7px;
    margin-bottom: 0;
}
.help-block {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #737373;
    font-size: 0.875em;
}
/* Form validation (BS3) -> validation BS5 */
.has-error .form-control { border-color: #a94442; }
.has-error .help-block, .has-error .control-label { color: #a94442; }
.has-success .form-control { border-color: #3c763d; }
.has-success .help-block, .has-success .control-label { color: #3c763d; }
.has-warning .form-control { border-color: #8a6d3b; }
.has-warning .help-block, .has-warning .control-label { color: #8a6d3b; }

/* input-group-addon (BS3) — no BS5 virou input-group-text com layout flex diferente */
.input-group-addon {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

/* control-label (BS3) — no BS5 vira form-label */
.control-label { margin-bottom: 5px; font-weight: 700; }

/* ========== TYPOGRAPHY / MISC ========== */
.page-header {
    padding-bottom: 9px;
    margin: 40px 0 20px;
    border-bottom: 1px solid #eee;
}
.text-muted { color: #777; }

/* Caret (BS3 dropdowns) — no BS5 usa pseudo-element */
.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;
}

/* ========== LIST GROUP (sub) ========== */
.list-group-item-heading { margin-top: 0; margin-bottom: 5px; }
.list-group-item-text { margin-bottom: 0; line-height: 1.3; }

/* ========== NAVBAR (BS3) ========== */
/* Componentes navbar mudaram MUITO no BS5; aqui só preservamos compat básica
   suficiente pra navegação não quebrar. Aparência fica simplificada. */
.navbar-default { background-color: #f8f8f8; border-color: #e7e7e7; }
.navbar-default .navbar-nav > li > a { color: #777; padding: 15px; display: block; }
.navbar-default .navbar-nav > li > a:hover { color: #333; }
.navbar-fixed-top { position: fixed; top: 0; right: 0; left: 0; z-index: 1030; }
.navbar-brand { float: left; padding: 15px 15px; font-size: 18px; line-height: 20px; }
.navbar-header { float: left; }
.navbar-toggle {
    position: relative;
    float: right;
    padding: 9px 10px;
    margin-top: 8px;
    margin-right: 15px;
    margin-bottom: 8px;
    background-color: transparent;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
}

/* ========== LABEL (BS3) -> BADGE (BS5) ========== */
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}
.label-default { background-color: #777; }
.label-primary { background-color: #337ab7; }
.label-success { background-color: #5cb85c; }
.label-info { background-color: #5bc0de; }
.label-warning { background-color: #f0ad4e; }
.label-danger { background-color: #d9534f; }

/* ========== TABLES ========== */
/* table-striped/-hover/-bordered: BS5 já tem, ok */
/* table-responsive: BS5 mantém, ok */
