/** Background color if value is not good */

.highlight-value-not-good .select2-selection__rendered:not([title=Bene]),
.highlight-value-not-no .select2-selection__rendered:not([title=no]){
    color: #fff;
    background-color: red;
    padding-left: 5px;
    font-weight: bold;
}

.highlight-value-not-1 input[value]:not([value="1"]):not([value=""]){
    border:2px solid red;
}

/** Color by Entity **/

body.horse .content-wrapper, body.examination .right-side {
    background-color: darkgreen;
}

body.contact .content-wrapper, body.examination .right-side {
    background-color: darkblue;
}

body.examination .content-wrapper, body.examination .right-side {
    background-color: darkred;
}

body.examination .content-wrapper, body.examination .right-side {
    background-color: saddlebrown;
}


/*
@media (max-width: 767px) {
    .navbar-left .hidden-xs {
        display: inherit !important;
    }
    .navbar-top-links li a, .navbar-top-links li span {
        padding: 15px 0;
    }
    .breadcrumb>li+li:before {
        padding: 0;
    }

    ol.navbar-top-links.breadcrumb li{
        display: none !important;
    }

    ol.navbar-top-links.breadcrumb li.active{
        display: inline-block !important;
    }
}
*/

/** Boostrap **/
/** righe alternate **/
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #ebeaea;
}


/** Horse **/

.horse-disabled {
    color: red;
}

.horse-first-year {
    color: fuchsia;
}

.horse-second-year {
    color: #ff9008;
}

ul.list-unstyled {
    columns: 2 !important;
    -webkit-columns: 2 !important;
    -moz-columns: 2 !important;
}

/** **/
input[type="file"] {
    height: inherit;
    font-size: 20px;
    border: 1px solid #ccc;
    background: #eee;
    width: 100%;
    display: inline-block;
    padding: 10px;
    cursor: pointer;
}

#lightbox {
    max-width: 100%;
}

#lightbox .modal-content {
    display: inline-block;
    text-align: center;
}

@media only screen and (max-device-width: 1024px) {
    .modal-dialog {
        position: absolute;
        top: 50px !important;
        left: 0 !important;
        margin-left: auto;
        margin-right: auto;
    }
}

#lightbox .close {
    opacity: 1;
    color: rgb(255, 255, 255);
    background-color: rgb(25, 25, 25);
    padding: 5px 8px;
    border-radius: 30px;
    border: 2px solid rgb(255, 255, 255);
    position: absolute;
    top: -15px;
    right: -40px;

    z-index: 1032;
}

/** FIX for jquery tooltip **/
body .ui-tooltip {
    display: none !important;
}



.input-group input {
    max-width: inherit !important;
}

/** FIX for medias */
.medias .thumbnail {
    display: inline-block !important;
}

/** Table responsive */
@media screen and (max-width: 767px) {
    .sonata-ba-field-inline-table .field-container {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        overflow-y: hidden;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 1px solid #ddd;
        min-height: .01%;
        overflow-x: auto;
    }

    /** Entity type reduce width */
    .sonata-ba-field-list-natural .field-container .field-short-description {
        min-width: 100%;
    }

    /** fix for bottom buttons in edit view **/
    .sonata-ba-form-actions {
        max-width: 100% !important;
        padding: 7px !important;
    }

    .sonata-ba-form-actions .btn {
        padding: 2px !important;
        margin-bottom: 7px;

    }


    /* Fix for select2 full make page difficult to scroll */
    .select2-container, .form-control {
        max-width: 80% !important;
        min-width: 70px;
    }

}

@media screen and (min-width: 768px) {
    .sonata-ba-field-inline-table td > div.checkbox > label > .control-label__text {
        position: inherit;
        /*display: none !important;*/
    }


    .diet-insert table td:nth-child(2) {
        min-width: 320px;
    }
    .diet-insert table td:nth-child(3) {
        max-width: 90px;
    }

}

.diet-table .box-body > table .sonata-ba-view-container > th {
    display: none !important;
}


/** Diet insert */
.table-responsive-list.diet-insert ul,
.table-responsive-list.pathology-insert ul {
    columns: 2 !important;
    -webkit-columns: 2 !important;
    -moz-columns: 2 !important;
}

.table-responsive-list.diet-insert tr td:last-child,
.table-responsive-list.diet-insert tr th:last-child {
    display: none !important;
}


.table-responsive-list.diet-insert .ui-sortable-handle {
    touch-action: initial;
}

/** responsive tables */
/* and (max-width: 768px),
(min-device-width: 768px) and  */
@media only screen and (max-device-width: 1024px) {

    /* Force table to not be like tables anymore */
    .table-responsive-list table, .table-responsive-list thead, .table-responsive-list tbody, .table-responsive-list th, .table-responsive-list td, .table-responsive-list tr {
        display: block;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    .table-responsive-list thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive-list tr {
        border: 2px solid #000;
    }

    .table-responsive-list td {
        /* Behave  like a "row" */
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;

        padding-top: 30px !important;
    }

    .table-responsive-list td:before {
        /* Now like a table header */
        position: absolute;
        /* Top/left values mimic padding */
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }

    /*
    Label the data
    */
    .table-responsive-list.diet-insert tbody tr {
        position: relative;
    }

    .table-responsive-list.diet-insert tbody tr td:nth-last-child(2) {
        position: absolute;
        border: none !important;
        bottom: 0;
        left: 30%;
    }

    .table-responsive-list.diet-insert tbody tr td:last-child {
        position: absolute;
        border: none !important;
        bottom: 0;
        left: 60%;
    }

    .table-responsive-list.diet-insert .checkbox label, .table-responsive-list.diet-insert .radio label,
    .table-responsive-list.pathology-insert .checkbox label, .table-responsive-list.pathology-insert .radio label {
        font-weight: normal;
    }

    .table-responsive-list.diet-insert td:nth-of-type(1):before {
        content: "Elimina";
    }

    .table-responsive-list.diet-insert td:nth-of-type(2):before {
        content: "Prodotto";
    }

    .table-responsive-list.diet-insert td:nth-of-type(3):before {
        content: "Quantità";
    }

    .table-responsive-list.diet-insert td:nth-of-type(4):before {
        content: "Quando";
    }

    .table-responsive-list.diet-insert td:nth-of-type(5):before {
        content: "Normalmente";
    }

    .table-responsive-list.diet-insert td:nth-of-type(6):before {
        content: "In gara";
    }

    .table-responsive-list.diet-insert td:nth-of-type(7):before {
        content: "Lav. intenso";
    }

    .table-responsive-list.pathology-insert td:nth-of-type(1):before {
        content: "Elimina";
    }

    .table-responsive-list.pathology-insert td:nth-of-type(2):before {
        content: "Patologia";
    }

    .table-responsive-list.pathology-insert td:nth-of-type(3):before {
        content: "Localizzazione";
    }

    .table-responsive-list.pathology-insert td:nth-of-type(4):before {
        content: "Operato";
    }

    .table-responsive-list.pathology-insert td:nth-of-type(4) label {
        width: 100%
    }
}

.thumbnail {
    background: #f3f3f3;
}

a {
    font-size: 1.2em;
    font-weight: bold;
}

/** dimensione select2 */
.select2-results, label, input, .form-control, .breadcrumb > .active {
    font-size: 1.2em;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    font-size: 1.2em;
    line-height: 1.2em;
}
.main-header .sidebar-toggle {
    padding: 12px 15px 12px !important;
}

.skin-black .main-header .navbar {
    max-height: 50px;
}

/** save bar **/
.well.form-actions {
    padding: 3px 0 10px 0 !important;
    text-align: center;
}

/** Btn più grandi **/
table.table .sonata-ba-view-container .btn-default {
    padding: 5px 5px;
    margin-right: 5px !important;
}

/*+ Colore bottoni **/

button[name="btn_update_and_show"], .view_link {
    background: greenyellow;
    color: #000;
}

/* view_link
 */
button[name="btn_update_and_edit"], .btn_edit, .edit_link {
    background: yellow;
    color: #000;
}

.btn_pdf_download, .link_pdf {
    background: plum;
}

.btn_clone, .link_clone {
    background: steelblue;
    color: #fff;
}

.delete_link {
    background: red;
    color: #fff
}

/*button[name="btn_update_and_list"] {
    background: red;
}*/

/** fix for iphone X */
body.fixed.examination .content-header .navbar.stuck {
    position: relative !important;
}

/* Medias many to many */
.media-many-to-many thead tr th:nth-child(2),
.media-many-to-many tbody tr td:nth-child(2),
.media-many-to-many thead tr th:nth-child(4),
.media-many-to-many tbody tr td:nth-child(4),
.media-many-to-many thead tr th:nth-child(5),
.media-many-to-many tbody tr td:nth-child(5),
.media-many-to-many thead tr th:nth-child(6),
.media-many-to-many tbody tr td:nth-child(6),
.media-many-to-many thead tr th:nth-child(7),
.media-many-to-many tbody tr td:nth-child(7),
.media-many-to-many thead tr th:nth-child(8),
.media-many-to-many tbody tr td:nth-child(8),
.media-many-to-many thead tr th:nth-child(9),
.media-many-to-many tbody tr td:nth-child(9) {
    display: none !important;
}

.cms-block .sonata-search-result-show {
    min-width: 50%;
}

/**
 *  Menù
 */

.sidebar-menu .treeview-menu > li > a {
    font-size: 16px;
}

.treeview a {
    font-size: 1.2em;
}



/* */

.offline-message{
    display: none;
}
.offline .offline-message{
    display: block;
    padding: 5px;
    text-align: center;
    background: red;
    color: #ffff;
    font-weight: bold;
    text-transform: uppercase;
}


/** Modifiche 2025-02-21 */

.sonata-ba-list-field.sonata-ba-list-field-many_to_one{
    font-weight: bold;
}
.sonata-ba-list-field.sonata-ba-list-field-actions .btn-group .btn{
    text-transform: uppercase;


}
@media screen and (max-width: 767px) {
    body.examination .table-responsive>.table>tbody>tr>td, .table-responsive>.table>tbody>tr>th, .table-responsive>.table>tfoot>tr>td, .table-responsive>.table>tfoot>tr>th, .table-responsive>.table>thead>tr>td, .table-responsive>.table>thead>tr>th {
         white-space: normal;
    }

    .sonata-ba-list-field.sonata-ba-list-field-actions .btn-group .btn{
        width: 100%;

    }
}
