body.admin-body{
    padding-top: 56px;
}

.btn{
    font-size: 16px !important;
    font-weight: 600;
}
.bg-primary {
    rgb(174, 151, 109) !important
}

.btn-primary {
    background-color: rgb(174, 151, 109);
    border-color: rgb(174, 151, 109);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: rgba(174, 151, 109, 0.8);
    border-color: rgb(174, 151, 109);
}

.btn-primary:active {
    background-color: rgb(174, 151, 109) !important;
    border-color: rgb(174, 151, 109) !important;
    box-shadow: none !important; /* odstraní modrý stín při stisknutí */
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(174, 151, 109, 0.5); /* změní modrý stín při fokusu */
}

.top-border-line{
    border-top: solid black 1px;
}

.pull-right{
    float: right;
}

/*!* Styl pro indikaci pozice, kam se přetahuje řádek *!*/
/*.dataTables_wrapper .ui-state-highlight {*/
/*    height: 40px; !* Nastavení výšky řádku během přetahování *!*/
/*    background-color: #e0e0e0; !* Světle šedé pozadí *!*/
/*    border: 1px dashed #ccc; !* Tečkovaný okraj pro zvýraznění pozice *!*/
/*}*/

.content-header {
    position: sticky;
    top: 56px;
    z-index: 1030; /* Z-index zajistí, že hlavička bude nad ostatním obsahem */
    background-color: white; /* Zajistí, že je hlavička oddělená od obsahu pod ní */
    margin-top: 14px;
}

/* Overlay, který deaktivuje pouze hlavní obsah */
#ajax-overlay {
    display: none;
    position: absolute; /* Zakryje pouze hlavní obsah, ne navigaci */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5); /* Poloprůhledné pozadí */
    backdrop-filter: blur(3px); /* Jemné rozmazání pozadí */
    z-index: 1900;
}

/* Centrum boxu se spinnerem */
#ajax-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2010;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Lepší vycentrování spinneru */
#ajax-spinner .spinner-border {
    display: block;
    margin: 0 auto 10px auto; /* Posune spinner nad text */
}

/* Pokud je modal aktivní, spinner se zobrazuje v něm */
.modal.show #ajax-spinner {
    z-index: 2020; /* Nad modálním oknem */
}

/* 2. Position the nested .dropdown-menu off to the right */
.dropdown-menu {
    max-height: 80vh;
    overflow-y: auto;
}

a.jstree-anchor[data-type*="empty"]{
    color: #DDDDDD;
}

fieldset .col-sm-7{
    width: 83.33333333333%;
    display: flex;
    justify-content: flex-end;
}

div.items-list{
    border: solid black 1px;
    max-width: 320px;
    max-height: 400px;
    overflow-y: auto;
    position: absolute;
    z-index: 10;
    background-color: white;
    padding: 4px;
    display: none;
}

.condition_field:focus{
    max-width: calc(100% - 200px);
}

.condition_field:focus ~ small{
    max-width: calc(100% - 200px);
    display: block;
}

.items-list label{
    font-weight: bold;
}

.items-list li, .items-list label{
    cursor: pointer;
}
.items-list li:hover, .items-list label:hover {
    background-color: #6edff6;
}

.number-wrapper {
    position: relative;
}
input.price-input:not(:disabled) {
    background: transparent;
    color: transparent;
    caret-color: black;
    position: relative;
    z-index: 2;
}
.formatted-overlay {
    position: absolute;
    top: 0;
    left: 0;
    color: black;
    pointer-events: none;
    z-index: 1;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

#graph circle{
    cursor: pointer;
}

#graph circle:hover{
    fill: #8486ff;
}

.btn-icon{
    display: flex;
    align-items: center;
    gap: 8px;
}

span.icon-label{
    margin-top: 2px;
    font-weight: 700;
    font-size: 16px;
    width: max-content; /*dont split text in the buttons*/
}

.radio-group {
    display: flex;
    gap: 0.5rem;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #e5e7eb; /* gray-200 */
    color: #374151;      /* gray-700 */
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.radio-group input[type="radio"]:checked + label {
    background: #2563eb; /* blue-600 */
    color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.radio-group label:hover {
    background: #d1d5db; /* gray-300 */
}

.attrib-actions{
    display: flex;
}

input.attribute-input{
    height: 30px;
    border: solid 1px rgb(170, 170, 170);
    border-radius: 4px;
    padding: 4px;
    margin-top: 1px;
    flex-grow: 1;
}
input.attribute-input:disabled{
    background-color: #eee;
}

input.attribute-input[type=number] {
    width: 11ch;
}

.attributes-stack{
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

span.attribute-input{
    padding-left: 4px;
    padding-right: 4px;
    height: 30px;
    display: flex;
    align-items: center;
}
.attribute-input.error .select2-container--default .select2-selection--single, span.attribute-input.error, .error input.attribute-input{
    background-color: #fabfbf;
}

.select2-container .select2-selection--single{
    height: 30px;
}

.attribute-input-unit{
    background-color: #eee;
    padding: 2px 4px;
    height: 30px;
    margin-top: 1px;
    border: solid 1px rgb(170, 170, 170);
    border-radius: 0 4px 4px 0;
    margin-left: -2px;
    white-space: pre;
}

table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order:after, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:before, table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:after, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:before, table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after, table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:before, table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order:after, table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:before, table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order:after, table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before, table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:after, table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:before, table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
    line-height: 10px;
    font-size: 0.5em;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding-left: 2px;
}

/* Breakpoint: při zmenšení okna pod 800px srovnej tlačítka pod sebe */
@media (max-width: 800px) {
    .action-buttons {
        flex-direction: column;
    }
}

table.dataTable thead th {
    text-align: left;
    vertical-align: middle;
    white-space: normal;   /* povolí běžné zalomení */
    word-break: keep-all;  /* nerozbíjí slova uprostřed */
}

.attributes-stack{
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/*!* zarovnání vlevo jen u buněk tabulky (th i td) *!*/
/*table.dataTable td,*/
/*table.dataTable th {*/
/*    text-align: left !important;*/
/*}*/

#dt-item-table thead{
    position: sticky;
    top: 120px;
    background-color: white;
    z-index: 1;
}


#calculations-table thead{
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: white;
}

#layoutSidenav div.nav{
    position: sticky;
    top: 56px;
}

.dt-container>div:last-child{
    position: sticky;
    bottom: 0;
    background-color: white;
}

nav.sb-topnav{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.mode_toggle{
    margin-left: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #b7b7b7;
}

.mode_toggle select{
    max-width: 160px;
}