:root {
    /* UI Colors */
    --main-primary: rgb(60, 86, 105);      /* The navy/blue used for nav and buttons */
    --main-primary-dark: rgb(0, 34, 68);   /* Hover state for primary */
    --main-secondary: rgb(110, 183, 181);  /* Teal used for info and hover rows */
    --main-secondary-dark: rgb(0, 100, 112);
    --main-success: rgb(101, 162, 54);
    --main-success-dark: rgb(0, 84, 55);
    --main-danger: rgb(245, 0, 3);
    --main-warning: rgb(255, 237, 84);
    --main-warning-hover: #ffc107;
    
    /* Layout */
    --main-modal-error: rgb(245, 0, 3);
    --main-input-focus: rgb(121, 176, 168);
    --main-sidebar-width: 250px;
}

ul.ui-autocomplete {
    z-index: 1100;
}

.tablecentered th + th,
.tablecentered td + td
{
    text-align: center;
}

.numcell{
    text-align: right;
}

.list-table tr {
    height: 1.8em;
}

.custommodal_delete_cancel,
.custommodal_delete_verify {
    display: none;
}


/*flickering bug that disable events on tooltips */
svg > g > g:last-child {
    pointer-events: none
}
div.google-visualization-tooltip {
    pointer-events: none
}

.modal + .modal {
    z-index:1070;
}
.modal-backdrop + .modal-backdrop{
    z-index:1060;
}

.modal-content
{
    background: rgba(255, 255, 255, .9);
}

.modal-header
{
    padding-bottom: 0;
    padding-top: 0.5rem;
}

.modal-dialog-medium {
    max-width: 700px;
}

.modal-dialog-wide {
    max-width: 80%;
}

.form-group .d-inline-block {
    width: 45%;
}

.form-group .d-inline-block.two {
    width: 66%;
}

.form-group .d-inline-block.three{
    width: 33%;
}

.form-group .d-inline-block.four{
    width: 24.5%;
}

.form-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 5px;
}

.custom-file *{
    cursor: pointer;
}

.custom-file-label {
    white-space:nowrap;
    overflow:hidden;
}

.custommodal_error_message,
.modal_error_message,
.modal_fileerror_message{
    color: var(--main-modal-error);
    font-weight: bold;
}

body {
    font-family: "Open Sans Light", "Open Sans", sans-serif;
}

.waiting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: progress;
    z-index: 0;
}

body.waiting .waiting-overlay{
    z-index: 99999;
}

#logo-container {
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 50%;
    height: auto;
}

#logo {
    max-height:55px;
    max-width: 1000px;
    height: auto;
    width: auto;
    margin-left: -50%;
}

#logout {
    float:right;
}
#usermenu {
    float: right;
}
.dropdown {
    cursor: pointer;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0px;
    z-index: 1000;
    cursor:  pointer;
}
/*
.dropdown:hover .dropdown-content {
    display: block;
}
*/

/* seperate for login form */
#logoimage {
    max-height: 120px;
    max-width: 300px;
    height: auto;
    width: auto;
    margin-left: -50%;
}

#page-wrapper {
    /*min-height: 100vh -70px;*/
    
    width: 90%;
    margin: 70px auto auto auto;
    padding: 0px; /*0px 0px 10px 0px;*/
    overflow: auto;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.3);

    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;

    -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
    -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);

    -webkit-background-clip: padding-box;
    -moz-background-clip: padding-box;
    background-clip: padding-box;
}

.btn-success.focus, .btn-success:focus,
.btn-danger.focus, .btn-danger:focus,
.btn-warning.focus, .btn-warning:focus,
.btn-info.focus, .btn-info:focus,
.btn-primary.focus, .btn-primary:focus{
    box-shadow: none !important;
}
.cursor-pointer,
.clickable_el {
    cursor:  pointer;
}

.cursor-no-pointer {
    cursor: unset;
}

.dropdown button.dropdown-toggle {
    height: 100%;
}

.addnew_button {
    margin: 10px 0;
}

.control-label {
    margin-top: 10px;
}

#sidebarCollapse{
    height: 2.2em;
    background-color: var(--main-warning);
    border-color: var(--main-warning);
}
#logout{
    height: 2.2em;
    background-color: var(--main-danger);
    border-color: var(--main-danger);
}
.btn:focus,
#logout:focus,
#sidebarCollapse:focus {
    box-shadow: none;
}

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

#top-navbar,
#sidebar,
#sidebar .sidebar-header
{
    background: var(--main-primary);
    color: white;
}

#top-navbar {
    z-index: 999;

    position: fixed;
    top: 0;
    width: 100%;

    padding: 10px 5px;
    border: none;
    border-radius: 0;
}

.navbar-btn {
    box-shadow: none;
    outline: none !important;
    border: none;
}

.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #ddd;
    margin: 40px 0;
}

/* ---------------------------------------------------
    SIDEBAR STYLE
----------------------------------------------------- */

.wrapper {
    display: flex;
    width: 100%;
    flex-direction: column;
    min-height: 100vh; /* Minimum height of the full screen */
}

#sidebar {
    width: var(--main-sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    /* background: #7386D5; */
    /* color: #fff; */
    transition: all 0.3s;
}

#sidebar.active {
    margin-left: calc(-1 * var(--main-sidebar-width));
}

#sidebar .sidebar-header {
    padding: 20px;
    /* background: #6d7fcc; */
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    /* color: #fff; */
    padding: 10px;
}

#sidebar ul li a {
    padding: 10px;
    font-size: 1.1em;
    display: block;
}

#sidebar ul li a:hover {
    /* color: #7386D5; */
    background: white;
    color: var(--main-primary);
}

#sidebar ul li.active>a,
#sidebar a[aria-expanded="true"] {
    /* color: #fff; */
    /* background: #6d7fcc; */
    font-weight: bold;
}

#sidebar a[data-toggle="collapse"] {
    position: relative;
}
/*
.dropdown-toggle {
    height: 100%;
}

.dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}
*/
#sidebar ul ul a {
    font-size: 1em !important;
    padding-left: 30px !important;
}

#sidebar ul ul ul a {
    font-size: 1em !important;
    padding-left: 60px !important;
}

/* ---------------------------------------------------
    CONTENT STYLE
----------------------------------------------------- */

#content {
    width: calc(100% - var(--main-sidebar-width));
    /*padding: 20px;*/
    min-height: 100vh;
    transition: all 0.3s;
    position: absolute;
    top: 0;
    right: 0;
    
    display: flex;
    flex-direction: column;
    flex: 1;
}

#content.active {
    width: 100%;
}

.footer {
    margin-top: auto; /* This pushes the footer to the bottom of the #content div */
    flex-shrink: 0;   /* Ensures footer height doesn't collapse */
}

/* ---------------------------------------------------
    MEDIAQUERIES
----------------------------------------------------- */

@media (max-width: 768px) {
    li.nav-item,
    a.nav-link{
        width: 100%;
    }

    div.colseparator {
        width: 100%;
    }

    div.col-4,
    div.col-3{
        -ms-flex: 0 0 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }

    #sidebar {
        margin-left: 0;
    }
    #sidebar.active {
        margin-left: calc(-1 * var(--main-sidebar-width));
    }
    #content {
        width: calc(100% - var(--main-sidebar-width));
    }
    #content.active {
        width: 100%;
    }
    #logout span,
    #sidebarCollapse span {
        display: none;
    }

    /* Force table to not be like tables anymore */
    .the-table-responsive,
    .the-table-responsive thead,
    .the-table-responsive tbody,
    .the-table-responsive th,
    .the-table-responsive td,
    .the-table-responsive tr {
        display: block;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    .the-table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .the-table-responsive tr {
        border: 1px solid #ccc;
    }

    .the-table-responsive td {
        /* Behave  like a "row" */
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 40%;
        white-space: normal;
        /*text-align:left;*/
        text-align:center;
        vertical-align: middle;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .the-table-responsive td:before {
        /* Now like a table header */
        position: absolute;
        /* Top/left values mimic padding */
        /* top: 10px; removed temporarily */
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align:left;
        font-weight: bold;
    }

    /*
    Label the data
    */
    .the-table-responsive td:before {
        content: attr(data-label);
    }

    .table-responsive td {
        vertical-align: middle;
    }

    .grid-container {
        display: grid;
        grid-template-columns: 100%;
    }

    .chart-container-full,
    .chart-container-primary,
    .chart-container-secondary{
        width: 95%;
        display: block;
    }

}

.floater{
    position:fixed;
    top:120px;
    right:15px;
    color: var(--main-primary);
    /*background-color: #fff;
    border-radius:50px;*/
}
.floater.reverse {
    color: var(--main-danger);
}

.floater.secondary {
    top:200px;
}

.floater.tertiary {
    top:280px;
}

.floater:hover{
    transform: scale(1.25);
}

textarea.autoexpand{
    overflow-y: hidden;
    resize: none;
    height: auto;
}
.wordwrap {
    white-space: pre-wrap;      /* CSS3 */
    white-space: -moz-pre-wrap; /* Firefox */
    white-space: -pre-wrap;     /* Opera <7 */
    white-space: -o-pre-wrap;   /* Opera 7 */
    word-wrap: break-word;      /* IE */
}

#bar_blank, .bar_blank {
    display: none;
    border: solid 1px #000;
    border-radius: 5px;
    height: 10px;
    width: 100%;
}

#bar_color, .bar_color {
    background-color: #3e88b4;
    border-radius: 5px;
    height: 8px;
    width: 0px;
}

.btn-primary {
    background-color: var(--main-primary);
    border-color: var(--main-primary);
}
.btn-primary:hover{
    background-color: var(--main-primary-dark);
    border-color: var(--main-primary-dark);
}
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--main-primary-dark);
    border-color: var(--main-primary-dark);
    box-shadow: none !important;
}


.btn-success {
    color: #fff;
    background-color: var(--main-success);
    border-color: var(--main-success);
}
.btn-success:hover {
    color: #fff;
    background-color: var(--main-success-dark);
    border-color: var(--main-success-dark);
}

.btn-info {
    background-color: var(--main-secondary);
    border-color: var(--main-secondary);
}
.btn-info:hover {
    background-color: var(--main-secondary-dark);
    border-color: var(--main-secondary-dark);
}
.text-info {
    color: var(--main-secondary-dark) !important;
}

.btn-danger {
    background-color: var(--main-danger);
    border-color: var(--main-danger);
}
.text-danger {
    color: var(--main-danger) !important;
}

.btn-warning {
    color: #212529;
    background-color: var(--main-warning);
    border-color: var(--main-warning);
}
.btn-warning:hover {
    color: #212529;
    background-color: var(--main-warning-hover);
    border-color: var(--main-warning-hover);

}

.form-control:focus {
    border-color: var(--main-input-focus);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(0,123,255,.25);
}

.newontop {
    float: left;
    position: absolute;
    z-index: 20;
}

.editor {
    font-weight: bold;
    font-style: italic;
    cursor: pointer;
}

.li-sortable {
    margin-bottom: 3px;
    cursor: move;
}


.level-1 {
    background: var(--main-primary);
    color: white;
    border-radius: 5px;
    padding: 5px;
}

.level-2 {
    background: var(--main-primary);
    opacity: 0.9;
    color: white;
    border-radius: 5px;
    padding: 5px;
}

.level-3 {
    background: var(--main-primary);
    opacity: 0.8;
    color: white;
    border-radius: 5px;
    padding: 5px;
}

.calendar-title th {
    text-transform: none;
}

.day {
    cursor: pointer;
}

.btn.selected {
    color: white;
    background-color: var(--main-primary);
    border-color: var(--main-primary);
}

.toggle-view {
    cursor: pointer;
}
.togglable-view-hidden {
    display: none;
}

.table-hover tbody tr:hover {
    background-color: var(--main-secondary);
    border-color: var(--main-secondary);
}

.imagepreview {
    max-width: 250px;
    max-height: 250px;
    border: 1px solid #ccc;
    padding: 3px;
    box-sizing: border-box;
    margin: 5px;
    border-radius: 10px;
}

.imagecontainer {
    position: relative;
}
.imagecontainer .dropdown {
    position: absolute;
    left: 1em;
}

.select2-container .select2-selection
{
    height: calc(2.25rem + 2px);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}
.select2-container .select2-selection--single .select2-selection__rendered {
    padding: .375rem .75rem;
    line-height: 1.5;
}
.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #e9ecef;
}

.cal-day {
    border: 1px solid gray;
    font-weight: bold;
}

.cal-event-box {
    /*display: flex;*/
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */

}

.event-count {
    display: inline-block !important;
    width: 1.8em;
    padding: 0.4em;
    border-radius: 50%;
}

.reminder-count {
    display: inline-block !important;
    width: fit-content;
    margin: 4px auto;
    padding: 0.4em;
    border-radius: 25%;
    background-color: orange;
}
@media (max-width: 768px) {
    .reminder-count {
        display: block !important;
    }
}

.work-done {
    opacity: 0.5;
}

.tab-buttons {
    display: flex;
}

.tab-button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
    cursor: pointer;
    flex: 1;
}

.tab-button.active {
    background-color: #e0e0e0;
}

.tab-content {
    display: none; /* Hide all tab contents by default */
}

.tab-content.active {
    display: block; /* Show the active tab content */
}

.button-centered-absolute {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    -ms-transform: translateX(-50%);
}
.button-centered{
    margin-left: 50%;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}