body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#logo {
    position: fixed; /* Changed from absolute to fixed */
    top: 10px;
    left: 40px; /* Original position */
    transition: left 0.6s; /* Smooth transition like the sidebar */
    z-index: 10000;
}

#hoverTarget:hover + #sidebarMenu, #sidebarMenu:hover {
    top: 0; /* Bring sidebar and logo into view when hovered */
}



.map {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.layer-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
}

.info-table {
    position: absolute;
    bottom: 0;
    left: 0;
    display: none;
    z-index: 0;
}

img.logo {
    width: 120px;
    height: auto;
}

#sidebarMenu {
    position: absolute;
    top: 0; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 30px;
    display: flex;
    justify-content: center;
    background-color: rgba(51, 51, 51, 0.55);
    padding: 10px;
    box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.5);
    transition: left 0.3s; /* Smooth transition for hover effect */
    z-index: 1000;
}

#hoverTarget {
    position: fixed;
    left: 50%;
    top: 0;
    width: 120px; /* Width of the hover-sensitive area */
    height: 50px;
    z-index: 999; /* Above other elements */
}

#sidebarMenu a {
    padding: 5px;
    color: white;
    display: block;
    text-decoration: none;
    margin: 0 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#sidebarMenu a:hover {
    background-color: #555;
}
.btn {
    display: block;
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 10px 20px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}


/* Style for main content that should not be behind the sidebar */
.main-content {
    margin-left: 270px; /* Adjust as needed based on sidebar width */
}
/* Adjust margin for the statistics layout when sidebar is expanded */
#sidebarMenu:hover ~ * .statistics-layout {
    margin-left: 0px; /* Adjust based on sidebar width */
}

/* Style specifically for the map to allow it to be under the sidebar */
.map-fullscreen {
    margin-left: 0;
}

.iframe-container {
    width: 100%;       /* Full width */
    height: 100vh;     /* Full height of the viewport */
    position: absolute; /* If necessary, to position correctly */
    top: 0;            /* Align to the top */
    left: 250px;       /* Adjust based on sidebar width */
}

.iframe-container iframe {
    width: 100%;       /* Full width of the container */
    height: 100%;      /* Full height of the container */
    border: none;      /* Optional, to remove the border */
}


/* Slider settings */


/* This will adjust the position of the date picker drop-down */
.daterangepicker {
  top: auto !important; /* Remove the top positioning */
  bottom: 65px !important; /* Set to the height of your slider plus some extra space */
}

.date-range-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 10px; /* Or adjust as needed to not fall off the screen */
    padding: 0px;
    z-index: 1000; /* Ensure it's above other content */
}

.statistics-page .date-range-controls {
    position: absolute; /* Position it absolutely within the container */
}

.date-range-controls input[type="text"] {
    flex: 0 0 auto; /* Do not grow or shrink */
    margin: 0 10px; /* Spacing between inputs and slider */
    text-align: center;
}

#dateRangeSlider {
    flex-grow: 0.5; /* Slider grows to fill space */
    margin: 0 10px; /* Spacing between inputs and slider */
}

.statistics-page #dateRangeSlider {
    flex-grow: 1;
}

#setCurrentDateBtn {
    font-weight: bold;    /* Make the text thick */
    color: white;         /* Set the text color to white */
    background: none;     /* Remove the background */
    border: 2px solid white; /* Add a white border */
    padding: 10px 20px;   /* Add some padding */
    border-radius: 5px;   /* Optionally round the corners */
    cursor: pointer;      /* Change the cursor to indicate it's clickable */
    outline: none;        /* Remove the outline to keep the modern look */
    transition: background-color 0.3s, color 0.3s; /* Transition for hover effects */
}

#setCurrentDateBtn:hover, #setCurrentDateBtn:focus {
    color: #4CAF50;       /* Change text color on hover/focus for visibility */
    background-color: white; /* Change background on hover/focus */
}


.layer-menu {
    position: absolute;
    top: 50%;
    right: 10px; /* Adjust as needed to position the menu to the right */
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Aligns the flex children (layer-option) to the right */
    border-radius: 10px; /* Optional: Rounded corners */
}


/* Container for layer-label with shadow effect */
.layer-label-container {
    padding: 10px; /* Padding inside the container */
    margin-bottom: 10px; /* Margin between containers */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 1); /* Shadow effect */
    background-color: rgba(0, 0, 0, 0.4);
    width: 90%;
}

.btn-layer-label-container {
    padding: 10px; /* Padding inside the container */
    margin-bottom: 10px; /* Margin between containers */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 1); /* Shadow effect */
    background-color: rgba(0, 0, 0, 0.4);
    width: 90%;
}

.control-btn-container {
    padding: 10px; /* Padding inside the container */
    margin-bottom: 10px; /* Margin between containers */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 1); /* Shadow effect */
    background-color: rgba(0, 0, 0, 0.4);
    width: 90%;
}

.layer-option {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Aligns text and icon to the right within the layer-option */
    margin: 5px 0;
    cursor: pointer;
}

/* Hide the selection screen by default */
.selection-screen {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed positioning to center on screen */
    top: 50%;
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Center the element */
    padding: 20px;
    z-index: 1000; /* Ensure it's above other content */
    width: 300px;
    border-radius: 8px;
}

/* Styling for the content inside the selection screen */
.selection-content {
    padding: 20px;
    border: 1px solid #888;
    width: 100%; /* Full width of the parent container */
    text-align: center; /* Center text and buttons */
    background-color: rgba(255,255,255,0.5); /* Background color */
}

.option1-btn, .option2-btn {
    width: 100%;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    color: white;
}

/* Styles for option1-btn */
.option1-btn {
    background-color: #4682b4; /* Blue background */
}

/* Styles for option2-btn */
.option2-btn {
    background-color: #f4a460; /* Sandy color background */
}

.option1-btn.selected, .option2-btn.selected {
/* Change background color when selected */
    border: 2px solid #000000; /* White border for visibility */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Optional shadow for additional emphasis */
}

.selection-btn {
    width: 40%;
    padding: 10px;
    background-color: #a3de83; /* Green color for the close button */
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    color: black;
    margin-top: 20px; /* Manually add space above the close button */
    align-self: left;
}

.cancel-btn {
    width: 40%;
    padding: 10px;
    background-color:#FA8072; /* Green color for the close button */
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    color: black;
    margin-top: 20px; /* Manually add space above the close button */
    align-self: right;
}


.icon-container {
    padding: 5px;
    border-radius: 50%;
    margin-left: 5px;
    transition: background-color 0.3s;
}

.layer-label {
    font-weight: bold;
    color: white;
    font-size: 110%; /* Text size slightly larger */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Text shadow for better readability */
    padding: 5px 20px; /* Padding around text for spacing */
    transition: background-color 0.3s, color 0.3s;
    border-radius: 25px;
    margin-left: 10px; /* Space between the icon and text */
}

.layer-input {
    display: none; /* Radio buttons are not displayed */
}

.icon {
    font-size: 14px; /* Icon size */
    transition: transform 0.3s, color 0.3s;
    color: white; /* Initial color of the icon */
    margin-left: 5px; /* Space between text and icon */
}


.layer-option:hover .layer-label,
.layer-option:focus .layer-label {
    background-color: rgba(51, 153, 102, 0.9); /* Rounded background appears on hover */
}

.layer-option:hover .icon,
.layer-option:focus .icon {
    transform: scale(1.2); /* Icon grows slightly on hover */
}

.btn.layer-label {
    background: none;
    border: none;
    color: white;
    text-align: right;
}

.btn.layer-label {
    background: none;
    border: none;
    color: white;
    text-align: right; /* Text within buttons aligned to the right */
}

/* Ensure the icon container has a transparent background by default */
.icon-container {
    background: transparent;
}

/* When hovering over the layer option, the icon container will get a background */
.layer-option:hover .icon-container,
.layer-option:focus .icon-container {
    background-color: #4CAF50; /* Background color for the icon container */
    border-radius: 50%; /* Rounded corners for the icon container */
    padding: 5px; /* Padding inside the icon container */
}

.statistics-layout {
    margin-top: 50px; /* Height of the menu bar */
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    grid-template-rows: 1fr auto;   /* First row takes available space, second row for date range control */
    height: calc(100vh - 50px);     /* Full viewport height minus the menu bar */
    gap: 0
}

/* Container for the left column to apply Flexbox */
.statistics-left-column {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    grid-column: 1 / 2; /* First column */
    grid-row: 1 / 3;    /* Span both rows to match the height of the right column */
    gap: 0;
    height: 100%; /* Fill the available height of the left column */
}

.statistics-map {
    flex: 1;
    display: flex;
}

.statistics-chart {
    flex: 1;
    display: flex;
}

.statistics-table {
    grid-column: 2 / 3; /* Second column */
    grid-row: 1 / 2;    /* Span both rows */
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 3px solid rgba(51, 51, 51, 0.55); 
    overflow: hidden; /* Prevent overflow */
}
 
.statistics-date-range-control {
    grid-column: 2 / 3; /* Ensure it stays in the second column */
    grid-row: 2 / 3;    
    position: relative; /* Relative positioning to enable absolute positioning of children */
    align-self: end;
    height: 50px;
    background-color: rgba(51, 51, 51, 0.55);
    border: 3px solid rgba(51, 51, 51, 0.55); 
}

.minimal-map {
    height: 100%; /* Full height of the grid cell */
    width: 100%;  /* Full width of the grid cell */
}

.tablestat {
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill the height of the parent container */
    overflow: hidden; /* Prevent overflow outside of this container */
}

#partof-table {
    flex: 0 0 60px; /* Set a fixed height (e.g., 100px) */
    overflow: hidden; /* Ensure the content doesn't overflow */
}

#selected-table {
    flex: 0 0 60px; /* Set a fixed height (e.g., 100px) */
    overflow: hidden; /* Ensure the content doesn't overflow */
}

/* The contains table fills the remaining space */
#contains-table {
    flex: 1; /* Fills the remaining space */
    overflow: auto; /* Allows scrolling if the table content is too large */
}

#partof-table .tabulator-header .tabulator-col,
#selected-table .tabulator-header .tabulator-col,
#contains-table .tabulator-header .tabulator-col {
    color: #ffffff; /* Column Text Color */
    background-color: rgba(51, 51, 51, 0.70);
    border-left: 1px solid rgba(51, 51, 51, 0.55);  
    border-right: 1px solid rgba(51, 51, 51, 0.55); 
    border-top: 1px solid rgba(51, 51, 51, 0.55);   
}

#partof-table .tabulator-row,
#selected-table .tabulator-row, 
#contains-table .tabulator-row {
    color: #000000;
    background-color: rgba(51, 51, 51, 0.10); 
    border-top: 1px solid rgba(51, 51, 51, 0.55);    
    border-bottom: 1px solid rgba(51, 51, 51, 0.55); 
}

#partof-table .tabulator-cell,
#selected-table .tabulator-cell,
#contains-table .tabulator-cell {
    border-left: 1px solid rgba(51, 51, 51, 0.55);   
    border-right: 1px solid rgba(51, 51, 51, 0.55);  
}

.farm-type .tabulator-cell:first-child {
    background-color: rgba(70,130,180,0.7); 
    color: #000000; 
    font-weight: bold; 
}

.field-type .tabulator-cell:first-child {
    background-color: rgba(244,164,96,1); 
    color: #000000; 
    font-weight: bold; 
}

.seaweed-type .tabulator-cell:first-child {
    background-color: rgba(165, 42, 42, 1);
    color: #000000; 
    font-weight: bold; 
}

.row-type .tabulator-cell:first-child {
    background-color: rgba(203, 189, 147, 1); 
    color: #000000; 
    font-weight: bold; 
}

.tree-type .tabulator-cell:first-child {
    background-color: rgba(34,139,34, 1); 
    color: #000000; 
    font-weight: bold; 
}

h3 {
    height: 25px;
    text-align: center;  /* Center the title */
    margin-top: 0px;
    margin-bottom: 0px;
    font-family: Arial, sans-serif;
    color: #000000;
    border: 3px solid rgba(51, 51, 51, 0.55); 
}

/* Style the dropdown button */
.type-filter-btn {
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.attribute-filter-btn {
    margin-left: auto;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* The container <div> - needed to position the dropdown content */
.filtering {
    position: relative;
    display: flex;
    height: auto;
}

/* Dropdown Content (Hidden by Default) */
.type-filtering-content, .attribute-filtering-content{
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    top: 100%;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Show the dropdown menu on button click */
.type-filtering-content.show, .attribute-filtering-content.show {
    display: block;
}

#attribute_list {
    right:0;
}