/* Google Font Import - Poppins */
@import url(https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap);

* {
    font-family: 'Poppins', sans-serif
}

/* Please Sort or come up with cleaner solution*/
#dropupMenuButton span {
    margin: auto !important;
    color: white !important;
}

#body {
    height: 100svh;
}

/* Theming */
:root {
    /* ===== Colors ===== */
    --sidebar-color: #F3500A;
    --primary-color: #fc7b44;
    --primary-color-light: #F6F5FF;
    --toggle-color: #fff;
    --text-color: #707070;
    --bs-red-600: #b02a37;;
    --bs-red-700: #842029;
    --bs-red-800: #58151c;
    /* ====== Transition ====== */
    --tran-03: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-04: all 0.3s ease;
    --tran-05: all 0.3s ease
}

/* ### Hide Scrollbars in primary sidebar ### */

/* Hide scrollbar for Chrome, Safari and Opera */
#primary-menu-items::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
#primary-menu-items {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}


.bg-secondary-700 {
    background-color: var(--bs-gray-700)
}

.bg-orange {
    background-color: #F3500A
}

.bg-orange-light {
    background-color: #FC7B44
}

.text-orange {
    color: #F3500A !important
}

/* Secondary Sidebar Items btn-toggle */
.secondary-sidebar-items-padding {
    padding: 12px;
}


.btn-secondary-sidebar {
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    background-color: var(--bs-gray-700); /* Darker grey background */
}

.btn-secondary-sidebar:hover,
.btn-secondary-sidebar:focus {
    color: rgba(var(--bs-emphasis-color-rgb), 0.85);
    background-color: var(--bs-gray-800); /* Darker shade of grey on hover */
}

.btn-toggle::before {
    width: 1.25em;
    line-height: 0;
    content: url("data:image/svg+xml, %3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280, 0, 0, .5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
    transition: transform 0.35s ease;
    transform-origin: 0.5em 50%;
}

[data-bs-theme="dark"] .btn-toggle::before {
    content: url("data:image/svg+xml, %3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255, 255, 255, .5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
}

.btn-toggle[aria-expanded="true"] {
    color: rgba(var(--bs-emphasis-color-rgb), 0.85);
}

.btn-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.btn-toggle-nav a {
    padding: 0.1875rem 0.5rem;
    margin-top: 0.125rem;
    margin-left: 1.25rem;
    color: white; /* Text color */
}

.btn-toggle-nav a:hover,
.btn-toggle-nav a:focus {
    background-color: var(--bs-gray-800); /* Darker shade of grey on hover */
    color: white; /* Text color on hover */
}

.link-body-emphasis:hover {
    color: #fff !important;
}

.btn-toggle::before {
    filter: brightness(0) saturate(100%) invert(100%) sepia(6%) saturate(0%) hue-rotate(276deg) brightness(105%) contrast(105%);
}

/* Utility Stuff */
.big-checkbox {
    width: 1.4em;
    height: 1.4em;
}

.w-250 {
    width: 250px !important
}

.display-none {
    display: none !important;
}

/* Custom Buttons */
.btn-danger-dark {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-red-700);
    --bs-btn-border-color: var(--bs-red-700);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-red-600);
    --bs-btn-hover-border-color: var(--bs-red-600);
}

/* Custom Buttons */
.btn-black {
    --bs-btn-color: #fff;
    --bs-btn-bg: #000000 !important;
    --bs-btn-border-color: #000000 !important;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #323232 !important;
    --bs-btn-hover-border-color: #323232 !important;
}

/* ### THIRD PARTY LIBRARY STYLE OVERRIDES ### */

/* SummerNote WYSIWYG Editor FIX */
.note-icon-caret {
    display: none;
}

.note-editor {
    padding: 0px !important;
}

.note-resizebar {
    height: 20px !important;
    padding-top: 6px !important;
}

/* JSON Editor/ACE CSS */
.jsoneditor-poweredBy {
    display: none;
}

.jsoneditor-mode-code {
    border: thin solid var(--bs-primary) !important;
    border-radius: 15px;
    overflow: hidden;
}

.jsoneditor-menu {
    background-color: var(--bs-primary) !important;
    border-bottom: 1px solid var(--bs-primary) !important;
}

.jsoneditor-undo:disabled {
    color: var(--bs-secondary);
}

.jsoneditor-redo:disabled {
    color: var(--bs-secondary);
}

.ace_open {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path fill="currentColor" opacity="0.5" d="M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z"></path></svg>') !important;
}

.ace_closed {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" opacity="0.5" d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"></path></svg>') !important;
}

.ace_fold {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 400"><path d="m406.65 318.6 96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l41.4 41.4h-293.5l41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-41.3-41.3h293.5l-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l-.1-.1Z" style="fill-opacity:.75"/></svg>') !important;
}

/* FullCalendar FIX */
.fc-addShiftButton-button {
    background-color: green !important;
    border: green !important;
}

.fc-addShiftButton-button:before {
    font-family: FontAwesome;
    font-weight: 900;
    content: '\f055';
}

.fc-editShiftButton-button {
    background-color: red !important;
    border: red !important;
}

.fc-editShiftButton-button:before {
    font-family: FontAwesome;
    font-weight: 900;
    content: '\f14b';
}

/* Sortable Table Css */
.sortable {
    thead th:not(.no-sort) {
        cursor: pointer;
    }

    thead th:not(.no-sort)::after, .sortable thead th:not(.no-sort)::before {
        transition: color 0.1s ease-in-out;
        font-size: 1.2em;
        color: transparent;
    }

    thead th:not(.no-sort)::after {
        margin-left: 3px;
        font-family: FontAwesome;
        font-weight: 900;
        content: '\f0da';
    }

    thead th:not(.no-sort):hover::after {
        color: inherit;
    }

    thead th:not(.no-sort)[aria-sort='descending']::after {
        color: inherit;
        font-family: FontAwesome;
        font-weight: 900;
        content: '\f0d7';
    }

    thead th:not(.no-sort)[aria-sort='ascending']::after {
        color: inherit;
        font-family: FontAwesome;
        font-weight: 900;
        content: '\f0d8';
    }

    thead th:not(.no-sort).indicator-left::after {
        content: '';
    }

    thead th:not(.no-sort).indicator-left::before {
        margin-right: 3px;
        font-family: FontAwesome;
        font-weight: 900;
        content: '\f0da';
    }

    thead th:not(.no-sort).indicator-left:hover::before {
        color: inherit;
    }

    thead th:not(.no-sort).indicator-left[aria-sort='descending']::before {
        color: inherit;
        font-family: FontAwesome;
        font-weight: 900;
        content: '\f0d7';
    }

    thead th:not(.no-sort).indicator-left[aria-sort='ascending']::before {
        color: inherit;
        font-family: FontAwesome;
        font-weight: 900;
        content: '\f0d8';
        width: 0.8em;
        height: 0.8em;
    }
}

/* Light/Dark Mode Styles */
[data-bs-theme=light] {
    /* Customise Light Body BG Color */
    --bs-body-bg: var(--bs-light);
    --bs-body-bg-rgb: var(--bs-light-rgb);

    /* Customise Light Card BG Color */

    .card {
        --bs-card-bg: #ffffff !important;
    }

    /* Customise Light Table BG Color */

    .table {
        --bs-table-bg: #ffffff !important;
    }

    /* Customise Light Form Control elements BG Color */

    .form-control {
        background-color: white;
    }

    .form-select {
        background-color: white;
    }

    .accordion-button {
        background-color: white;
    }

    /* Customise Light Summernote elements BG Color */

    .note-toolbar {
        background-color: white;
    }

    .note-resizebar {
        background-color: white;
    }

    .note-editable {
        background-color: white;
    }
}


[data-bs-theme="dark"] {

    /* Customise Dark Card BG Color */

    .card {
        --bs-card-bg: var(--bs-dark) !important;
    }

    /* Customise Dark Table BG Color */

    .table {
        --bs-table-bg: var(--bs-dark) !important;
    }
}

/* Make Bootstrap Input Disabled Correct Color in Dark Mode*/
.form-control:disabled {
    background-color: var(--bs-secondary-bg);
    opacity: 1;
}

/* Make Tom Select Placeholder Text Correct Text Color in Dark Mode */
.ts-control, .ts-control input, .ts-dropdown {
    color: var(--bs-body-color) !important;
}

/* ### MEDIA QUERY STYLES ### */

/* Default Styles */
.modal-xl-custom {
    --bs-modal-width: 90%;
}

.flex-grow-1-desktop {
    flex-grow: unset !important;
}

.content-size {
    /*height: calc(100vh - 88px - 84px);*/
    /*height: calc(100dvh - 88px - 84px);*/
    height: calc(100dvh - 88px);
}

.main-body {
    display: flex;
    flex-direction: column-reverse;
    /*height: 100vh;*/
    /*height: -webkit-fill-available;*/
}

.primary-sidebar {
    display: flex;
    padding: 10px;
    position: relative;
    transition: min-width 0.3s ease;
    background-color: #F3500A;
    height: 88px;
    width: 100%
}

.primary-sidebar.open {
    width: 250px;
    min-width: 250px
}

.primary-menu-item {
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-weight: 500;
    font-size: 17px;
    background-color: var(--sidebar-color);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    padding: 0px;
    text-decoration: none
}

.primary-menu-item:hover {
    background-color: #FC7B44;
    text-decoration: none;
    color: white
}

/* Mobile Styles */
@media (max-width: 768px) {
    .modal-xl-custom {
        --bs-modal-width: 99%;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .hide-on-desktop {
        display: flex !important;
    }

    .main-content {
        flex-shrink: 0;
        flex-grow: 1
    }

    .secondaryToggleDesktop {
        display: none !important;
    }

    .secondaryToggleMobile {
        display: flex !important;
    }
}

/* Desktop Styles */
@media screen and (min-width: 768px) {
    .flex-grow-1-desktop {
        flex-grow: 1 !important;
    }

    .content-size {
        height: 100vh;
    }

    .hide-on-desktop {
        display: none !important;
    }

    .hide-on-mobile {
        display: flex !important;
    }

    .main-content {
        flex-shrink: 0;
        flex-grow: 1
    }

    .main-body {
        flex-direction: row
    }

    .primary-sidebar {
        flex: 1;
        width: 88px;
        min-width: 88px;
        max-width: 88px;
        flex-direction: column;
        height: 100vh
    }

    .primary-menu-item {
        justify-content: inherit;
        padding: 15px 25px;
        flex: none
    }

    .secondaryToggleMobile {
        display: none !important;
    }

    .secondaryToggleDesktop {
        display: flex !important;
    }
}


/* ===== Sidebar ===== */


#searchbar {
    outline: none;
    border: none
}

.primaryToggle {
    position: absolute;
    top: 40vh;
    z-index: 1035; /* Just Above Sticky Elements but Below Modals & Offcanvas */
    background-color: #FC7B44;
    right: -20px;
    cursor: pointer;
    border: solid;
    border-width: 2px;
    border-color: #F3500A;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center
}

.primary-hide-items {
    margin-left: 10px
}

/* Primary Sidebar Icon Stuff */
.w-20 {
    flex-shrink: 0;
    min-width: 20px;
    max-width: 20px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center
}

.primary-icon {
    font-size: large
}


.company-header {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 17px;
    color: white;
    /* background-color: #F3500A; */
    border-radius: 10px;
    padding: 15px;
    text-decoration: none
}

#primary-menu-items {
    flex: 1;
    gap: 5px;
    display: flex;
    align-items: space-around;
    overflow: auto
}

/* SECONDARY SIDEBAR */

/* Hide desktop toggle on mobile and mobile toggle on desktop */


.secondaryToggleDesktop {
    position: absolute;
    z-index: 1035; /* Just Above Sticky Elements but Below Modals & Offcanvas */
    top: 10px;
    right: -60px;
    background-color: var(--bs-gray-600);
    cursor: pointer;
    border: none;
    border-radius: 10px;
    height: 50px;
    width: 50px;
    align-items: center;
    justify-content: center
}

.secondaryToggleMobile {
    position: absolute;
    z-index: 1035; /* Just Above Sticky Elements but Below Modals & Offcanvas */
    top: 10px;
    left: 10px;
    background-color: var(--bs-gray-600);
    cursor: pointer;
    border: none;
    border-radius: 10px;
    height: 50px;
    width: 50px;
    align-items: center;
    justify-content: center
}

.secondary-toggle-icon {
    font-size: large
}

.secondary-sidebar {
    position: relative;
    width: 0px;
    min-width: 0px;
    overflow: hidden;
    height: 0px;
    background-color: var(--bs-gray-600);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* WORK HERE WORK HERE WORK HERE WORK HERE WORK HERE WORK HERE WORK HERE WORK HERE */
.secondary-sidebar {
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1034; /* Just Above Sticky Elements but Below Modals & Offcanvas Also below Button */
}

/* Mobile Devices */
@media screen and (max-width: 767px) {
    .secondary-sidebar {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 0%;
        min-width: 0%;
        height: 0vh;
        visibility: hidden;
    }

    .secondary-sidebar.open {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 100%;
        min-width: 100%;
        height: calc(100dvh - 88px);
        visibility: visible;
    }
}

/* Desktop/Tablet Devices */
/* Has been moved to base.html so that the width of the sidebar on desktop can be set in the template */

