:root {
    --dark-primary: rgba(0, 0, 0, 0.85);
    --dark-secondary: rgb(39, 39, 39);
    --dark-tertiary: rgba(0, 0, 0, 0.4);
    --light-primary: #fff;
    --blue-light: #0ea8ff;
    --blue-secondary: #007bff;
    --blue-tertiary: rgba(5, 105, 255, 0.31);
    --text-primary: #b8c7ce;
    --box-background: #fff;
    --box-shadow: 2px 2px 10px #eee;
    --font-primary: 'Montserrat';
    --font-primary-light: #fff;

    --red-500:  #dc3545;
    --yellow-500: #ffc107;
    --blue-600: #0a58ca;
    --blue-650: #004bad;
    --blue-700: #084298;
    --blue-750: #073c8d;
    --blue-800: #052c65;
    --blue-900: #083375;
    --gray-200: #e9ecef;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #616060;
    --black: #000000;

    --table-column-max-width: 163px;
    --table-column-max-width-2K: 9.4vw;
    --sidebar-and-margin-left: 265px;

    --font-size-md: 1.2rem;
}

body {
    font-size: .85rem;
    font-family: var(--font-primary), sans-serif;
    font-weight: 500;
}

.h-screen {
    height: 100dvh;
}

input,
select {
    cursor: pointer;
    transition: 0.7s ease-in-out;

    &:hover {
        background: rgba(122, 120, 120, 0.1);
    }
}

.customButton {
    transition: background-color 0.7s ease-in-out;
    border: none;

    &:hover {
        background-color: var(--blue-800);
    }
}

button:disabled {
    pointer-events: none;
}

label {
    font-weight: 600;
}

#contentContainer {
    min-height: calc(100dvh - 65px);
}

.hidden {
    display: none;
}

.contentCenter {
    min-height: calc(100dvh - 40px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.formContainer input,
.formContainer select {
    border: 1px solid var(--gray-600);
    height: 2.7rem;
}

.attachmentButton {
    cursor: pointer !important;
    border: 1px solid transparent;
}

.formContainer {
    margin: 4rem auto;
}

#import_export_file_container.disabledCover,
#import_export_encode_container.disabledCover{
    opacity: .3;
    pointer-events: none;
}

@media (width > 800px) {
    .formContainer {
        border-radius: 5px;
        border: 1px solid var(--gray-600);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.4);
    }
}

@media (width > 1200px) {
    .formContainer {
        max-width: 95vw;
    }
}

@media (width > 1500px) {
    .formContainer {
        max-width: 1500px;
    }
}

@media (width < 691px) {
    .formContainer form .form-group{
        padding-right: 0 !important;
    }
}

@media (width < 538px) {
    .formContainer {
        margin: 0 auto;
    }

    #notifications{
        margin-top: 0;
    }

    .filterCover{
        flex-direction: column;
        align-items: center;
    }
}

/* ------------------------------

Info Icons

---------------------------------- */

.infoSpan {
    cursor: pointer;
}

.buttonsCover {
    display: flex;
    justify-content: end;
    margin-top: 2rem;
    gap: 2rem;
}

.buttonsCover button,
.buttonsCover a {
    font-weight: bold;
}

.contentBody {
    width: 100vw;
    overflow-x: hidden;
}

/*------------------------------

LAYOUT for tables

---------------------------------- */
.mainContainer {
    max-width: 2000px;
    margin: auto;
    padding-top: 2.5rem;
}

.tableContainer {
    display: block;
    overflow-x: auto;
    padding: 0;
    margin: 0 auto;
    width: auto;

    & table {
        margin: 0 auto;
    }
}

.tableIcons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.registrationContainer {
    display: block;
    overflow-x: auto;
    padding: 0;
    width: auto;
}

.tableContainer table,
.registrationContainer table {
    width: auto;
    min-width: 1200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.tableContainer td,
.tableContainer th,
.registrationContainer td,
.registrationContainer th {
    padding-left: 1rem;
    white-space: nowrap;
}

.tableContainer th:last-child,
.registrationContainer th:last-child {
    text-align: center;
}

.tableContainer th,
.registrationContainer th,
.notificationTable th {
    background: var(--blue-800);
    color: var(--light-primary);
    text-align: center;
}

.tableContainer th,
.tableContainer td {
    text-align: center;

    &:first-child {
        text-align: start;
    }
}

.tableItemsStart td,
.tableItemsStart th {
    text-align: start;
}

.tableIcons a {
    height: 28px;
    width: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detailTable th {
    text-wrap: nowrap;
}

.btn:not(.btn-link) {
    font-size: .75rem;
}

select:not([multiple]) {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("../bundles/icons/caret-down-fill-black-15eb6ae15c77d56a513593560548064a.svg");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: .75rem auto;

    padding: .5em;
    padding-right: calc(1rem + .75rem + .25rem);
}

.box {
    box-shadow: var(--box-shadow);
    background: var(--box-background);
    padding: 1.5rem;
}

li.attachments {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* ------------------------------

Scrollbar for tables

 ------------------------------- */
.table-responsive {
    max-width: 100dvw;
    overflow-x: auto;

    scrollbar-color: var(--blue-800);
    -ms-overflow-style: auto;
}

.table-responsive::-webkit-scrollbar,
.tableContainer::-webkit-scrollbar,
.scrollbarBox::-webkit-scrollbar {
    width: 10px;
    height: 15px;
}

.table-responsive::-webkit-scrollbar-track,
.tableContainer::-webkit-scrollbar-track,
.scrollbarBox::-webkit-scrollbar-track{
    background-color: #b4b4b4;
    border-radius: 5px;
    height: 50px;
    width: 50px;
    cursor: pointer;
}

.table-responsive::-webkit-scrollbar-thumb,
.tableContainer::-webkit-scrollbar-thumb,
.scrollbarBox::-webkit-scrollbar-thumb {
    background-color: var(--blue-secondary);
    background-image: -webkit-linear-gradient(90deg,
    rgb(7, 80, 143) 0%,
    rgb(8, 44, 117) 25%,
    transparent 100%,
    rgb(3, 4, 79) 75%,
    transparent);
    border-radius: 5px;
    cursor: grab;
}

.table-responsive::-webkit-scrollbar-button:single-button,
.tableContainer::-webkit-scrollbar-button:single-button{
    background-color: var(--blue-secondary);
    border-radius: 5px;
    width: 30px;
    height: 30px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.table-responsive::-webkit-scrollbar-button:vertical:decrement,
.tableContainer::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("../bundles/icons/caret-up-fill-c5fbb6abc8b15582bb8cd384ffc2eefd.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:vertical:increment,
.tableContainer::-webkit-scrollbar-button:vertical:increment {
    background-image: url("../bundles/icons/caret-down-fill-57650c7552580994e574e60ca5ab6ff0.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:single-button:horizontal:decrement,
.tableContainer::-webkit-scrollbar-button:single-button:horizontal:decrement{
    background-image: url("../bundles/icons/caret-left-fill-664e531cb65a01e1878d9a5d905adfca.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:single-button:horizontal:increment,
.tableContainer::-webkit-scrollbar-button:single-button:horizontal:increment{
    background-image: url("../bundles/icons/caret-right-fill-edcea44476779b28919d55559ace8fbd.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:single-button:hover,
.tableContainer::-webkit-scrollbar-button:single-button:hover{
    background-color: var(--blue-700);
}

/*--------------------------
Top-Menu
----------------------------- */
.topMenuContainer {
    min-height: 40px;
}

.topMenuCover {
    width: auto;
    background: var(--blue-900);
    border-width: 0 0 3px 3px;
    border-color: var(--blue-secondary);
    border-style: solid;
    border-radius: 0 0 0 10px;

    & li {
        cursor: pointer;
    }

    & li:hover {
        filter: brightness(90%);
    }

    & li a,
    & .dropdown-toggle {
        text-decoration: none;
        transition: 0.5s ease-in-out;
    }

    & .dropdown-toggle:hover {
        filter: brightness(60%);
    }

    & .dropdown-menu a:hover {
        background: var(--blue-tertiary);
    }
}

/* -----------------------------
Sidebar & Scrollbar
 ------------------------------ */
#sidebar {
    width: var(--sidebar-and-margin-left);
    min-height: 100dvh;
    z-index: 11;
    transition: all 500ms ease-in-out;
    position: fixed;
    margin-left: 0;

    max-height: 100dvh;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-right: 1px solid var(--bs-white);

    & .nav-link {
        width: 100%;
        padding-left: .8rem;
    }

    /*& li:not(.collapsible):hover {*/
    /*    background: var(--dark-tertiary);*/
    /*}*/

    & a {
        color: var(--font-primary-light);
    }

    & .menu-header {
        background: var(--blue-800);
    }

    & .nav-link {
        display: flex;
        font-size: 110%;

        & span {
            width: 2rem;
        }

        &.detailCatalogLink span{
            width: 1.4rem;
        }

        & p {
            margin: 0;
        }
    }
}

@media (max-height: 775px) {
    #sidebar {
        overflow-y: scroll;
        scrollbar-width: auto;
        -ms-overflow-style: scrollbar;
    }
}

#sidebar::-webkit-scrollbar {
    width: 10px;
}

#sidebar::-webkit-scrollbar-thumb {
    background-color: var(--gray-200);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#sidebar.active {
    margin-left: 0;
}

.closeMenuButton {
    color: var(--light-primary);
    transition: .5s ease;

    &:hover {
        color: var(--blue-secondary);
        transform: rotate(90deg);
    }
}

.sidemenuOpenIcon {
    transition: .5s ease-in-out;
    cursor: pointer;
    background: var(--blue-secondary);

    &:hover {
        background: var(--blue-700);
    }
}

@media (max-height: 775px) {
    #sidebar .sidebar-header {
        padding: 0 !important;
        margin: 0;
        max-height: 40px;

        & label {
            padding: 15px 15px 0 0;
        }
        & .navbar-brand{
            margin: 0;
            padding-left: 1rem;
        }
    }
}

#content {
    transition: margin-left 500ms ease-in-out;
}

@media (max-width: 1819.9px) {
    #sidebar {
        width: 230px;
        transition: margin-left 500ms ease-in-out;
        margin-left: -230px; /* Skryj sidebar na menších obrazovkách */
    }

    #menuToggle:checked + #sidebar,
    #menuToggle:checked ~ #content {
        margin-left: 0; /* Zobraz sidebar */
    }

    #menuToggle:checked ~ #content {
        margin-left: 270px; /* Posuň obsah, když je sidebar otevřený */
    }
}

/* -------------------------

Sidebar detail

---------------------------- */

#sidebar .chevron i {
    display: inline-block;
    width: 1.2rem;
    text-align: center;
    transition: transform .18s ease;
}

#catalogButton[aria-expanded="true"] .chevron i { transform: rotate(180deg); }
#administrationButton[aria-expanded="true"] .chevron i { transform: rotate(180deg); }

#catalogButton.nav-link[aria-expanded="true"],
#administrationButton.nav-link[aria-expanded="true"]{border-left: 1px solid var(--light-primary);}

#sidebar .nav-link { color: #fff; }
#sidebar .nav-link:focus { outline: none; }

.nav-link.active {
    box-shadow: inset 0 0 0 9999px rgba(0,0,0,.20);
    border-left: 1px solid var(--light-primary);
}

#submenuCatalog.collapse.show,
#submenuAdministration.collapse.show{
    transition: .5s ease-in-out;
    background-color: var(--blue-650);
    box-shadow: 1px 1px 1px rgb(255, 255, 255);
}

#catalogButton[aria-expanded="true"],
#administrationButton[aria-expanded="true"]{
    background-color: var(--blue-900);
}

#submenuCatalog .list-unstyled > li > .nav-link,
#submenuAdministration .list-unstyled > li > .nav-link {
    display: flex;
    width: 100%;
}

#sidebar .nav-link:hover {
    box-shadow: inset 2px 0 0 0 var(--light-primary), inset 0 0 0 9999px rgba(0,0,0,.10);
}

/*---------------------------

Detail

 -----------------------------*/

.detailBox {
    width: auto;
    max-width: 1200px;
    margin-top: 3rem;
    border-top: 3px solid var(--blue-600);
    border-bottom: 3px solid var(--blue-600);
    border-left: 3px solid var(--blue-800);
    border-right: 3px solid var(--blue-800);
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2), 15px 15px 15px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 1.5rem;
    background-color: var(--light-primary);
    overflow-x: hidden;
    & .d-flex .text-blue-800 {
        margin-right: 4rem;
    }

    & table {
        min-width: 500px;
    }

    & table td {
        padding-left: 1.5rem;
    }
}

/* -----------------------------

Modal

 ------------------------------ */

.modal-header, .modal-footer, .modal-content {
    border-radius: 0;
}

.modal-dialog {
    max-width: fit-content;
    min-width: 500px;
    margin-left: auto;
    margin-right: auto;

    & .modal-header {
        display: flex;
        justify-content: space-between;
    }

    & .modal-title h4 {
        margin-bottom: 0;
    }

    & .modal-body,
    .modal-body table {
        margin-bottom: 0;
    }

    & .modal-content {
        padding: 0 1rem;
    }

    & .btn-close {
        margin-left: 2rem;
    }

    & .modal-header {
        border-bottom: none;
    }

    & .modal-footer {
        border-top: none;
    }
}

.modal-body table tbody tr td{
    text-wrap: nowrap;
}

.warningDiv {
    font-size: 0.8rem;
    text-align: start;
    max-width: 570px;
    text-wrap: wrap;
    margin: 0.5rem auto 0;
}

/*---------------------------

Default

 -----------------------------*/

#roles label.form-check-label {
    display: none;
}

.showPassword {
    cursor: pointer;
}

form *[required] {
    border: 1px solid var(--dark-primary);
}

.form-control.disabled, .form-select.disabled {
    background-color: var(--bs-secondary-bg);
    opacity: 1;
}

.top-header {
    background: var(--light-primary);
}

td[contenteditable="true"] {
    cursor: pointer;
    position: relative;
}

td[contenteditable="true"]:hover,
td[contenteditable="true"]:focus {
    background-color: var(--light-primary);
    outline: 1px solid var(--blue-secondary);
}

td[contenteditable="true"]:not(:focus):hover {
    outline: 1px solid #b3d7ff;
}

td[contenteditable="true"]:after {
    content: "\f044";
    position: absolute;
    right: 5px;
    top: 0;
    font-weight: 900;
    color: #e0e0e0;
    font-size: 10px;
}

td[contenteditable="true"]:hover:after, td[contenteditable="true"]:focus:after {
    color:  var(--blue-secondary);
}

/* ------------------------------

Pagination

---------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5em;
}

#paginationLimit {
    list-style-type: none;
    gap: 1.5rem;
}

.pagination .active > .page-link {
    background-color: var(--blue-700);
}

form {
    padding-bottom: 1.5rem;
}

label.required {
    display: flex;
    align-items: center;
    align-content: center;
}

label.required::after {
    content: '*';
    font-weight: bold;
    color: var(--red-500);
    margin-left: 8px;
    margin-right: 8px;
    transform: scale(1.8);
    transform-origin: left center;
}

/* ------------------------

New role form fix, center

-------------------------- */
.roleTable {
    margin-bottom: 0;
}

.roleTable tr th:last-child {
    text-align: center;
}

.roleRow {
    .permissionHeader {
        text-align: center !important;
    }

    & td:first-child {
        & h6 {
            padding: 0.8rem 0 0 0;
        }
    }

    & td div {
        margin: .2rem 0 !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Checkbox */

    & .form-check {
        padding: 0;
    }

    & .form-check-input {
        width: 20px;
        height: 20px;
        margin: 0;
        text-align: center;
    }

    & tr th:first-child,
    & td:first-child {
        max-width: 1rem;
    }

    &:last-child {
        border: transparent;
    }
}

.custom-tooltip .tooltip-inner {
    background-color: var(--dark-secondary);
    color: var(--light-primary);
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 5px;
}

.custom-tooltip .tooltip-arrow {
    border-top-color: var(--dark-secondary);
}

/* --------------------------------
DatePicker
---------------------------------- */
#ui-datepicker-div {
    width: 100%;
    max-width: 245px;
    z-index: 10 !important;

    & .ui-datepicker-month {
        width: 65%;
    }

    & .ui-datepicker-year {
        width: 35%;
    }
}

.ui-datepicker-current {
    display: none; /* Skryje tlačítko "Dnes" */
}

.ui-datepicker-prev, .ui-datepicker-next {
    margin-top: 10px;
}

.ui-datepicker-prev {
    left: 10px; /* Pozice tlačítka předchozí */
}

.ui-datepicker-next {
    right: 10px; /* Pozice tlačítka další */
}

/* --------------------------------
 Tooltip container
---------------------------------- */

[data-tooltip]:not(.tooltip-note) {
    position: relative;
    cursor: pointer;
    z-index: 10;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    color: var(--light-primary);
    background: var(--gray-700);
    padding: 7px;
    border-radius: 5px;
    white-space: nowrap;
    border: 2px solid black;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    right: 10%;
    transform: translateY(-90%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

[data-tooltip].tooltip-topLeft::before,
[data-tooltip].tooltip-topLeft::after {
    left: 50%;
    transform: translateX(-75%) translateY(-95%);
}

[data-tooltip].tooltip-dashboard::before,
[data-tooltip].tooltip-dashboard::after {
    left: 50%;
    transform: translateX(-65%) translateY(-120%);
}

[data-tooltip].tooltip-center::before {
    left: 50%;
    transform: translateX(-50%) translateY(-95%);
}

[data-tooltip].tooltip-note.noteHidden::before {
    display: none;
}

.tooltip-note {
    cursor: pointer;
    max-width: 100px;
    & .tooltip-notice-span {
        max-width: 100px;
    }
}

[data-tooltip].tooltip-paginator::before {
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
}

[data-tooltip].tooltip-notice::before {
    transform: translateX(-.2vw) translateY(-46.5px);
    text-align: center;
    font-weight: 600;
}

[data-tooltip].tooltip-note::before {
    transform: translateX(-.3vw) translateY(-66.5px);
    width: auto;
    height: auto;
    max-width: 30rem;
    white-space: normal;
    font-weight: normal;
}

[data-tooltip].tooltip-note.tooltipShort::before {
    transform: translateX(-.3vw) translateY(-46.5px);
    text-wrap: nowrap;
}

.topMenuCover {
    max-height: 60px;
}

/* ----------------------------

    Alert Container

------------------------------ */

.alertCover {
    display: block;
    padding: 8px 0;
}

#alertCoverGoogleMaps{
    z-index: 0;
    padding: 0.45rem 0;
}

.fadeAlert {
    transition: opacity 1s ease-in-out;
}

.fadeAlert.showAlert {
    display: block;
    opacity: 1;
}

.fadeAlert:not(.showAlert) {
    display: none;
    opacity: 0;
}

#planned_task_days {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
}

/* ----------------------------

    Google map container

------------------------------ */

.googleMapContainer{
    height: 300px;
    width: 100%;
}

/* disabled Default google map error input overlay */
input.gm-err-autocomplete {
    background-image: none !important;
}

/* disabled Default google map error map overlay */
.gm-err-container,
.gm-err-container * {
    display: none !important;
}

.gm-style,
.gm-style * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.serviceFuelContainer{
    margin: 4rem auto 0 auto;
    display: block;
    width: fit-content;
    border-top: 3px solid var(--blue-600);
    border-bottom: 3px solid var(--blue-600);
    border-left: 3px solid var(--blue-800);
    border-right: 3px solid var(--blue-800);
    border-radius: 10px;
}

/* ----------------------------

        Checkbox

 ------------------------------- */

.form-check{
    display: flex;
    align-items: center;
    gap: .5rem;
}

.form-check > input {
    width: 20px;
    height: 20px;
    margin: 0;
    text-align: center;
}

.notificationTable {
    margin: 0 auto;
    max-width: 1920px;
    overflow-x: auto;
    -ms-overflow-style: auto;
}

.notificationTable th,
.notificationTable td {
    padding-left: .2rem;
    white-space: nowrap;
    vertical-align: middle;
    & a{
        text-decoration: none;
    }
}

/* ----------------------

        Cell shrink -  max width

 ----------------------- */

.cellShrinkWidth span {
    max-width: 350px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
