html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    font-size: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, Arial, Roboto, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-weight: 400;
}

.hamburger-menu {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    color: white;
    border: none;
    background-color: #dd5900; /* Initially hidden */
}

/* Sidebar Default (Visible in Desktop) */
#sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #252525;
    color: white;
    overflow-y: auto;
    overflow: hidden;
    transition: width 225ms cubic-bezier(0.4, 0, 0.6, 1) 0ms;
}

/* Sidebar Collapsed */
.collapsed #sidebar-wrapper {
    width: 0 !important;
    overflow: hidden;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 15px;
}

.sidebar-menu li {
    padding: 5px;
    cursor: pointer;
}

/* Collapse Button (<) */
.collapse-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
}

/* Page Content */
#page-content-wrapper {
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s;
}

/* Collapsed Sidebar */
.collapsed #page-content-wrapper {
    margin-left: 0;
}

/* MOBILE VIEW */
@media (max-width: 992px) {
    .hamburger-menu {
        display: block; /* Show hamburger menu in mobile */
    }

    /* Hide Sidebar Initially in Mobile */
    #wrapper {
        margin-left: 0;
    }

    .toggled #sidebar-wrapper {
        width: 250px;
        height: 100vh; /* Ensure it takes up the full height */
        position: fixed;
        left: 0;
        overflow-y: auto; /* Ensure the sidebar content can scroll */
        z-index: 1050 !important;
        background: #343a40;
    }

    .collapsed #sidebar-wrapper {
        width: 0;
    }

    /* Ensure Page Content is Full Width */
    #page-content-wrapper {
        margin-left: 0 !important;
        position: relative;
        z-index: 1;
    }

    /* Hide < button initially in mobile view */
    .collapsed .collapse-btn {
        display: none;
    }

    /* Show < button when sidebar is open */
    .toggled .collapse-btn {
        display: block;
    }

    .custom-header {
        z-index: 1 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important
    }
}

/* Custom Header */
.custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 60px;
    width: calc(100% - 250px); /* Adjust width to not overlap with sidebar */
    position: fixed;
    top: 0;
    left: 250px;
    background: white;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: left 0.3s;
    background-color: #dd5900;
}

/* Adjust header when sidebar is collapsed */
.collapsed .custom-header {
    left: 0;
    width: 100%;
}


.header-icon {
    background-color: #dd5900;
    border: none;
    color: white;
}

.logo {
    color: white;
    flex-grow: 1;
    line-height: 0;
    margin-left: 24px;
    margin-top: 14px;
}

.heading {
    margin-left: 40px;
    font-size: 1.125rem;
    font-family: -apple-system, BlinkMacSystemFont, Arial, Roboto, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-weight: 500;
    line-height: 1.6;
    color: white;
    margin-top: 8px;
}


.link-item {
    text-decoration: none !important;
    color: white;
}

.link-item:hover {
    color: #dd5900 !important;
    font-weight: bold;
    text-decoration: none !important;
}

.link-item.active {
    color: #dd5900;
    font-weight: bold;
}

.MuiSvgIcon-root {
    fill: currentColor;
    width: 1em;
    height: 1em;
    font-size: 1.5rem;
    transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    flex-shrink: 0;
    user-select: none;
}

.MuiListItemText-root {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 4px;
    margin-bottom: 4px;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    font-size: 12px !important; /* Reduce font size */
    min-width: 200px !important; /* Reduce width */
    padding: 5px !important; /* Reduce padding */
}

.bootstrap-datetimepicker-widget .btn {
    font-size: 10px !important;
    padding: 4px 6px !important;
}

.timesheet-entry {
    position: relative;
}

.remove-entry:hover {
    color: darkred;
}

.remove-entry {
    top: 5px;
    right: 5px;
    cursor: pointer;
    color: red;
    float: right;
}

.MuiTypography-subtitle1 {
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, Arial, Roboto, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-weight: 400;
    line-height: 1.75;
}

.sub-heading {
    margin-top: 70px;
}


.right-buttons {
    display: flex;
    gap: 10px; /* Space between Draft and Submit buttons */
}

.btn:hover {
    background-color: #dd5900;
    color: white; /* Text color on hover */
    border-color: #0056b3; /* Border color change on hover */
}

.submit-timesheet-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* allows wrapping on small screens */
    gap: 0.5rem;
    margin-top: 1rem;
}

.left-button,
.right-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.left-button {
    flex: 1 1 auto;
    justify-content: flex-start;
}

.right-buttons {
    flex: 1 1 auto;
    justify-content: flex-end;
}

.timesheet-button, .add-derft-submit-timesheet-button {
    padding: 0.5rem 1rem;
    border: 1px solid black;
    background-color: white;
    color: black;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-width: 70px;
}

button:hover {
    background-color: #dd5900;
    color: white;
}

@media (max-width: 600px) {
    .submit-timesheet-button {
        flex-direction: column;
        align-items: stretch;
    }

    .left-button,
    .right-buttons {
        justify-content: center;
    }

    .add-derft-submit-timesheet-button {
        width: 100%;
        min-width: 100%;
    }

    .timesheet-button {
        padding: 0.3rem 0.3rem !important;
        min-width: 0px !important;
    }
}

.custom-btn.active {
    background-color: #dd5900;
    color:white;
    font-weight:bold;
}

.mandatory-field {
    color: red;
}

.modal-backdrop {
    z-index: 1050 !important;
    position: static !important;
}

.modal {
    z-index: 1060 !important;
    top:10px!important;
}

#timesheetModal .modal-dialog {
    margin: 0 auto;
    max-width: 800px;
    top: 55%;
    transform: translateY(-50%);
    z-index: 1055; /* Bootstrap modal z-index */
    align-items: center;
}

#timesheetModal .modal-content {
    width: 100%;
    padding: 20px;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
}

.modal-backdrop.show {
    z-index: 1050;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-body {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

#globalSpinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    color: #dd5900;
}
