/* Main container styling to align sidebar and content side by side */
body {
    display: flex; /* Align sidebar and content side by side */
    margin: 0;
    padding: 10px;
    background-color: var(--darkbg); /* Use dark background by default */
    color: var(--darkt); /* Use dark text color by default */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for color changes */
    border: none; /* Ensure no border on body */
}

#container {
    flex-grow: 1; /* Allow the container to take up the remaining space */
    gap: 10px; /* Gap between grid items */
    padding: 5px; /* Padding around the content */
    height: auto;
    box-sizing: border-box; /* Ensure padding is included in the width */
    overflow-y: auto; /* Allow scrolling if the content overflows */
    background-color: var(--darkbg); /* Ensure container background matches */
    border: none; /* Ensure no border */

}

/* Styling for Bento-Box Layout */
#bento-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr)) minmax(450px, 4.5fr);
    grid-template-rows: repeat(4, 1fr);
    grid-template-areas:
        "s1 s2 s3 l1"
        "s4 s5 s6 l1"
        "s7 s8 s9 l2"
        "s10 s11 s12 l2";
    grid-gap: 10px;
    padding: 5px;
    width: 100%;
    height: auto;
    background-color: var(--darkbg-bento);
    transition: background-color 0.2s ease-in-out;
}

.bento-item-small {
    background-color: var(--darkbg-bento);
    border-radius: 5px;
    padding: 2px;
    display: flex;
    height: 150px;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    box-shadow:
    0 1px 1px hsl(0deg 0% 0% / 0.075),
    0 2px 2px hsl(0deg 0% 0% / 0.075),
    0 4px 4px hsl(0deg 0% 0% / 0.075),
    0 8px 8px hsl(0deg 0% 0% / 0.075),
    0 16px 16px hsl(0deg 0% 0% / 0.075);

}

.bento-item-large-1 {
    background-color: var(--darkbg-bento);
    border-radius: 5px;
    grid-area: l1;
    display: flex;
    height: 310px;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    box-shadow:
    0 1px 1px hsl(0deg 0% 0% / 0.075),
    0 2px 2px hsl(0deg 0% 0% / 0.075),
    0 4px 4px hsl(0deg 0% 0% / 0.075),
    0 8px 8px hsl(0deg 0% 0% / 0.075),
    0 16px 16px hsl(0deg 0% 0% / 0.075);
}

.bento-item-large-2 {
    background-color: var(--darkbg-bento);
    border-radius: 5px;
    grid-area: l2;
    display: flex;
    height: 310px;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    box-shadow:
    0 1px 1px hsl(0deg 0% 0% / 0.075),
    0 2px 2px hsl(0deg 0% 0% / 0.075),
    0 4px 4px hsl(0deg 0% 0% / 0.075),
    0 8px 8px hsl(0deg 0% 0% / 0.075),
    0 16px 16px hsl(0deg 0% 0% / 0.075);
}

#navbar-placeholder {
    flex-shrink: 0; /* Prevent the sidebar from shrinking */
    border: none; /* Ensure no border */
}

/* Top Header Row Styling */
#header-row {
    display: flex;
    height: 75px;
    align-items: flex-start; /* Align items to the top */
    justify-content: flex-end; /* Align date filter to the right */
    padding: 10px;
    background-color: var(--bgColor--night);
    margin-bottom: 15px;
    color: var(--darkt);
    flex-wrap: wrap; /* Allow wrapping of elements if needed */
    min-height: auto; /* Height adjusts based on content */
}



/* Grid item styling */
#container > div {
    flex: 1 1 calc(50% - 20px); /* Each item takes up at least 50% of the row, accounting for margins */
    margin: 5px; /* 10px gap between items (5px on each side) */
    box-sizing: border-box; /* Include padding/margin in element's size */
    background-color: var(--bgColor--night); /* Default dark background for sections */
    color: var(--darkt); /* Default dark text color */
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none; /* Ensure no border on items */
}



#container, #container > div {
    border: none; /* Remove any unwanted borders */
    outline: none; /* Remove any unwanted outlines */
}

/* Make images responsive */
#container > div img {
    width: 100%; /* Make the image responsive */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below the image */
}









/* color-mode  */
.tdnn {
  position: absolute;
  bottom: 16px;  /* Reduced by 20% */
  right: 16px;  /* Reduced by 20% */
  z-index: 1000;  /* Ensure it stays on top */
}

body.light-mode #container {
    background-color: var(--lightbg); /* Ensure light mode background matches */
}

body.light-mode #bento-box {
    background-color: var(--bgColor--day); /* Light mode background for bento box */
}

body.light-mode .bento-item {
    background-color: var(--lightbg); /* Light mode background for each item */
}

body.light-mode {
    background-color: var(--lightbg); /* Light mode background color */
    color: var(--lightt); /* Light mode text color */
}

body.light-mode #header-row {
    background-color: var(--bgColor--day);
    color: var(--lightt);
}

body.light-mode .daterangepicker {
    background-color: var(--bgColor--day);
    color: var(--lightt);
    border: 1px solid var(--lightt);
}

body.light-mode #container > div {
    background-color: var(--bgColor--day); /* Light mode background for sections */
    color: var(--lightt); /* Light mode text color */
}

body.light-mode #bento-box {
    background-color: var(--lightbg-bento);
}

body.light-mode .bento-item-small,
body.light-mode .bento-item-large-1,
body.light-mode .bento-item-large-2 {
    background-color: var(--lightbg-bento);
    color: var(--lightbg-bento);
    box-shadow:
    0 1px 1px hsl(0deg 0% 0% / 0.05),
    0 2px 2px hsl(0deg 0% 0% / 0.05),
    0 4px 4px hsl(0deg 0% 0% / 0.05),
    0 8px 8px hsl(0deg 0% 0% / 0.05),
    0 16px 16px hsl(0deg 0% 0% / 0.05);
}


/* Loading elements */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--darkbg);
    color: var(--darkt);
    font-size: 24px;
    z-index: 9999;
}

#loading-icon {
    width: 60px; /* Adjust size as needed */
    animation: spin 3.0s cubic-bezier(0, 0, 0, 1) infinite;
    padding-right: 30px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile elements */

@media (max-width: 1250px) {
    #container {
        grid-template-columns: 1fr; /* Single column grid on mobile */
    }

    #bento-box {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Smaller columns on mobile */
    }



        #bento-box {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "s1 s2"
            "s3 s4"
            "s5 s6"
            "s7 s8"
            "s9 s10"
            "s11 s12"
            "l1 l1"
            "l2 l2";
    }

    .bento-item-large-1,
    .bento-item-large-2 {
        grid-column: 1 / -1;
    }
}


/* Date filter elements */

#date-filter-container {
    display: flex; /* Keep date picker and toggle in one line */
    flex-direction: row; /* Arrange date picker and toggle horizontally */
    align-items: center; /* Vertically center the items */
    justify-content: flex-end; /* Align to the right */
    width: auto; /* Adjust width as needed */
}

/* Datepicker styles to ensure correct color mode */
.daterangepicker {
    background-color: var(--bgColor--night);
    color: var(--darkt);
    border: 1px solid var(--darkt);
}

.daterangepicker .ranges li,
.daterangepicker .drp-calendar {
    font-family: Arial, sans-serif;
    font-size: 9px;
    color: inherit; /* Inherit color based on mode */
}

/* Ensure day names and month/year are visible */
.daterangepicker .calendar-table th,
.daterangepicker .calendar-table thead th,
.daterangepicker .calendar-table .month,
.daterangepicker .calendar-table .year {
    color: inherit; /* Inherit color based on mode */
}

body.light-mode .daterangepicker .calendar-table th,
body.light-mode .daterangepicker .calendar-table thead th,
body.light-mode .daterangepicker .calendar-table .month,
body.light-mode .daterangepicker .calendar-table .year {
    color: var(--lightt); /* Light mode text color */
}

.daterangepicker .drp-buttons .btn {
    font-family: Arial, sans-serif;
    font-size: 9px;
    padding: 5px 10px;
    background-color: var(--darkt);
    color: var(--bgColor--night);
    border-radius: 5px;
    border: none;
}

body.light-mode .daterangepicker .drp-buttons .btn {
    background-color: var(--lightt);
    color: var(--bgColor--day);
}