/* =====================================================================================
 *  GECO - geco_bs3compat.css : classi di Bootstrap 3 ancora usate dalle pagine/tema
 *  (style_new.css, eakroko, datatables.js) ricreate sopra Bootstrap 5.
 *  Da includere SUBITO DOPO lib5/bootstrap/css/bootstrap.min.css e PRIMA di style_new.css.
 * ===================================================================================== */

/* ---- tipografia base come BS3: html 10px (1rem = 10px, come si aspettano i CSS del tema e delle pagine), body 14px ---- */
html { font-size: 10px; }
body { font-size: 14px; line-height: 1.42857143; }

/* ---- float / visibilita' ---- */
.pull-right { float: right !important; }
.pull-left  { float: left !important; }
.clearfix::after { content: ""; display: table; clear: both; }
.hidden { display: none !important; }
.text-left  { text-align: left !important; }
.text-right { text-align: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.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); border: 0; }
@media (max-width: 767.98px) { .hidden-xs { display: none !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .hidden-sm { display: none !important; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .hidden-md { display: none !important; } }
@media (min-width: 1200px) { .hidden-lg { display: none !important; } }
.visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; }
@media (max-width: 767.98px) { .visible-xs { display: block !important; } }
@media (min-width: 768px) and (max-width: 991.98px) { .visible-sm { display: block !important; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .visible-md { display: block !important; } }
@media (min-width: 1200px) { .visible-lg { display: block !important; } }
@media print { .hidden-print { display: none !important; } }

/* ---- griglia: col-xs-* = col-* ---- */
.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-sm-offset-1, .col-md-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-2, .col-md-offset-2 { margin-left: 16.66666667%; }
.col-sm-offset-3, .col-md-offset-3 { margin-left: 25%; } .col-sm-offset-4, .col-md-offset-4 { margin-left: 33.33333333%; }
.col-sm-offset-6, .col-md-offset-6 { margin-left: 50%; }

/* ---- form ---- */
.form-group { margin-bottom: 15px; }
.form-horizontal .form-group { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; }
.form-horizontal .form-group > [class*="col-"] { padding-left: 15px; padding-right: 15px; }
.control-label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }
.form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; text-align: right; }
label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }
.help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; font-size: 12px; }
.form-control { height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; border-radius: 4px; }
textarea.form-control, select[multiple].form-control, select[size].form-control { height: auto; }
.form-control.input-sm, .input-sm { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; }
select.form-control.input-sm, select.input-sm { line-height: 30px; padding-top: 0; padding-bottom: 0; }
textarea.form-control.input-sm { height: auto; }
.form-control.input-lg, .input-lg { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }
select.form-control { -webkit-appearance: auto; appearance: auto; background-image: none; padding-right: 12px; }
.checkbox, .radio { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; }
.checkbox label, .radio label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: 400; cursor: pointer; }
.checkbox input[type="checkbox"], .radio input[type="radio"] { position: absolute; margin-left: -20px; margin-top: 4px; }
.checkbox-inline, .radio-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: 400; vertical-align: middle; cursor: pointer; }
.checkbox-inline input, .radio-inline input { position: absolute; margin-left: -20px; margin-top: 4px; }
.input-group-addon { display: flex; align-items: center; padding: 6px 12px; font-size: 14px; color: #555; text-align: center; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; }
.input-group > .input-group-addon:first-child { border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-addon:last-child { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group-btn { display: flex; }
.input-group-btn > .btn { border-radius: 0; }
.input-group-btn:last-child > .btn { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.input-group-btn:first-child > .btn { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.has-error .form-control { border-color: #a94442; }
.has-error .control-label, .has-error .help-block { color: #a94442; }
.has-warning .form-control { border-color: #8a6d3b; }
.has-success .form-control { border-color: #3c763d; }

/* ---- bottoni ---- */
.btn { font-size: 14px; line-height: 1.42857143; border-radius: 4px; padding: 6px 12px; }
.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; }
.btn-sm { padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; }
.btn-lg { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }
.btn-block { display: block; width: 100%; }
.btn .caret, .caret { display: inline-block; width: 0; height: 0; margin-left: 4px; vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; }
.dropdown-toggle::after { display: none; } /* la freccia la fa .caret come in BS3 */
.dropdown-toggle:not(:has(.caret))::after { display: inline-block; }
.btn-group > .btn + .dropdown-toggle { padding-left: 8px; padding-right: 8px; }

/* ---- chiudi (x) di alert/modal BS3 ---- */
button.close, .close { float: right; font-size: 21px; font-weight: 700; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; opacity: .2; padding: 0; background: transparent; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.close:hover, .close:focus { color: #000; text-decoration: none; opacity: .5; }
.modal-header .close { margin-top: -2px; }
.alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; }
.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
.alert-dismissable, .alert-dismissible { padding-right: 35px; }

/* ---- modal (markup BS3 dentro BS5) ---- */
.modal-header:has(> .close) { display: block; }        /* markup BS3: h4 + .close flottante */
.modal-header:has(> .close)::after { content: ""; display: table; clear: both; }
.modal-title { line-height: 1.42857143; }
.modal-header h4.modal-title { font-size: 18px; margin: 0; }
.modal-footer .btn + .btn { margin-left: 5px; margin-bottom: 0; }
.modal-footer .btn-group .btn + .btn { margin-left: -1px; }
.modal-footer .btn-block + .btn-block { margin-left: 0; }

/* ---- dropdown con <ul><li><a> (BS3) ---- */
.dropdown-menu > li { list-style: none; }
.dropdown-menu > li > a { display: block; width: 100%; padding: 4px 16px; clear: both; font-weight: 400; color: #212529; text-align: inherit; white-space: nowrap; background: transparent; border: 0; text-decoration: none; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: #1e2125; background-color: #e9ecef; }
.dropdown-menu > li.divider { height: 0; margin: 8px 0; overflow: hidden; border-top: 1px solid #e5e5e5; }
.dropdown-menu > .active > a { color: #fff; background-color: #0d6efd; }
.dropdown-menu.pull-right { right: 0; left: auto; }

/* ---- etichette / badge BS3 ---- */
.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; }
.badge:not(.text-bg-primary):not(.text-bg-secondary):not(.bg-primary):not(.bg-secondary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.bg-light) { background-color: #777; color: #fff; }

/* ---- panel / well / page-header ---- */
.panel { margin-bottom: 20px; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.panel-body { padding: 15px; }
.panel-heading { padding: 10px 15px; border-bottom: 1px solid #ddd; border-top-left-radius: 3px; border-top-right-radius: 3px; background-color: #f5f5f5; }
.panel-title { margin: 0; font-size: 16px; }
.panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; }
.well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; }
.page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; }

/* ---- tabelle ---- */
.table-condensed > thead > tr > th, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; }
.table > thead > tr > th { vertical-align: bottom; }
.table > tbody > tr > td, .table > thead > tr > th { padding: 8px; }

/* ---- nav-tabs BS3 (<li class="active"><a>) ---- */
.nav-tabs > li > a:not(.nav-link) { display: block; padding: 10px 15px; margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 4px 4px 0 0; color: inherit; text-decoration: none; }
.nav-tabs > li.active > a:not(.nav-link) { color: #555; background-color: #fff; border-color: #ddd #ddd transparent; }
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active, .tab-content > .tab-pane.show { display: block; }

/* ---- paginazione DataTables (integrazione BS3: <ul class="pagination"><li><a>) ---- */
.pagination > li { display: inline; }
.pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 6px 12px; margin-left: -1px; line-height: 1.42857143; color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; }
.pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.pagination > li:last-child > a, .pagination > li:last-child > span { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.pagination > li > a:hover { background-color: #eee; }
.pagination > .active > a, .pagination > .active > a:hover { z-index: 3; color: #fff; cursor: default; background-color: #337ab7; border-color: #337ab7; }
.pagination > .disabled > a, .pagination > .disabled > span { color: #777; cursor: not-allowed; background-color: #fff; border-color: #ddd; }
.pagination.pagination-sm > li > a { padding: 5px 10px; font-size: 12px; }
.dataTables_wrapper .dataTables_length select, .dataTables_wrapper .dataTables_filter input { display: inline-block; width: auto; }

/* ---- varie ---- */
.list-inline > li { display: inline-block; padding-left: 5px; padding-right: 5px; }
.list-unstyled { padding-left: 0; list-style: none; }
.media-object { display: block; }
.thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; }
.progress { height: 20px; margin-bottom: 20px; }
.text-muted { color: #777 !important; }
.lead { font-size: 16px; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
