/* Global styles */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden; /* Prevent window scrollbar */
}

/* Layout */
#container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* Prevent container scrollbar */
}

#sidebar {
    min-width: 300px;
    width: 100%; /* Default width */
    max-width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 10px 20px;
    box-sizing: border-box;
    background-color: #f0f0f0;
    resize: horizontal;
    height: 470px;
}

#sidebar-resizer {
    width: 5px;
    background-color: #ccc;
    cursor: col-resize;
}
#main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden; /* Prevent main content scrollbar */
}

/* Map styles */
#map {
    height: 35vh; /* Default height */
    flex-shrink: 0;
    min-height: 300px;
    width: 100%;
}

#map-table-resizer {
    height: 5px;
    background-color: #ccc;
    cursor: row-resize;
}

/* Resizer hover styles */
#sidebar-resizer:hover,
#map-table-resizer:hover {
    background-color: #999;
}

/* Table styles */
#table-container {
    flex-grow: 1;
    max-width: 100%;
    overflow: hidden; /* Changed from overflow-y: auto */
    font-size: 0.8em;
    position: relative;
    display: flex;
    flex-direction: column;
}

#deployments-table_wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent wrapper scrollbar */
}

.dataTables_scrollBody {
    flex-grow: 1;
    overflow-y: auto !important; /* Ensure table body has vertical scrollbar */
}

#table-container .top {
    background-color: #16355e;
    color: white;
    padding: 10px;
    position: sticky; /* Change from absolute to sticky */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    box-sizing: border-box;
}

#table-container .top .left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#table-container .top .right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
    margin-left: 10px;
}

#table-container table thead tr th {
    text-align:left;
    padding:10px;
}

#deployments-table_filter {
    margin-right: 10px;
}

#deployments-table_filter label {
    color:white;
}

#deployments-table_filter input {
    width: 200px;
    background:white;
}

#deployments-table {
    margin-top: 10px;
}

/* Button styles */
/* Updated button container styles */
#button-container {
gap:5px;
    display: none;
    justify-content: space-between;
}

#button-container button {
    flex: 1;
    padding: 4px 4px;
    background-color: #4daabd;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75em;
    transition: background-color 0.3s;
    color:white;
}

#button-container button:first-child {
    margin-left: 0;
    background-color: #112949;
}

#button-container button:last-child {
    margin-right: 0;
}

#button-container button:hover {
    background-color: #f9661e;
    color:white;
}
.length-export-container {
    display:flex;
    align-items: center;
    gap:15px;
}

.export-button {
    background: #4daabd !important;
    border: none;
    color: white !important;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1em!important;
    margin: 0!important;
    cursor: pointer;
    border-radius: 4px!important;
    padding: .3em 1em!important;
    border:none!important;
    -webkit-transition: all 300ms ease-in-out;
    -moz-transition: all 300ms ease-in-out;
    -o-transition: all 300ms ease-in-out;
    transition: all 300ms ease-in-out;
    font-weight:bold;
}
.export-button:hover {
    background:#f9661e !important;
}

#clear-selection-button {
    font-weight:bold;
    background: #4daabd;
    padding: .5em 1em;
    font-size: 1em!important;
    color: white;
    border: none;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
    -webkit-transition: all 300ms ease-in-out;
    -moz-transition: all 300ms ease-in-out;
    -o-transition: all 300ms ease-in-out;
    transition: all 300ms ease-in-out;
}

#clear-selection-button:hover {
    background-color: #f9661e ;
}

/* Filter styles */
.filter-section {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-header {
    background-color: #f1f1f1;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.filter-header::after {
    content: '\25BC';
    font-size: 12px;
    transition: transform 0.3s;
}

.filter-header.active {
    background-color: #112949;
    color: white;
}

.filter-header.active::after {
    transform: rotate(180deg);
}

.filter-content {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease-out;
    box-sizing: border-box;
}

.filter-header.active .filter-content {
    padding: 10px;
}

.filter-item {
    font-size: 0.9em;
    margin: 5px 0;
}

/* Sidebar styles */
#sidebar h2 {
    margin: 0px 0px 10px 0px;
}

#sidebar p, #reset-filters {
    font-size: 0.8em;
}

#reset-filters:hover {
    color: #004080;
}

#result-count {
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background-color: #dffaff;
    border: 1px solid #9dced7;
    border-radius: 5px;
}

/* Utility classes */
.color-circle {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

/* DataTables specific styles */
.dataTables_length.length-dropdown select {
    background: white !important;
}

.dataTables_length.length-dropdown label {
    color: white !important;
}


/* Sampling rate filter styles */
#sampling-rate-slider-container > div span {
    font-size: 0.8em;
}

#sampling-rate-slider-container > div span:last-of-type {
    font-weight: bold;
}

/* Recording date filter styles */
#filter-recordingDate > div {
    margin-bottom: 10px;
}

#recording-date-input-container label {
    font-size: 0.8em;
}
.gm-style-iw-t > div, .gm-style-iw-d {padding:0px!important;overflow-y:scroll;overflow-x:hidden!important;}
.gm-style-iw-chr {position:absolute!important;right:20px!important;    top: 3px !important;}
.gm-style-iw-chr button {height:auto!important;width:auto!important;}
.gm-style-iw-chr button span {background-color: white !important;top: -5px;margin:0!important;}
.gm-style-iw-d h4 {font-size:1.3em;}
.gm-style-iw-d p {margin:0px;}

@media screen and (min-width: 768px) {
    #container {
        flex-direction: row;
    }
#button-container {
    display:flex;
}
    #sidebar {
        width: 300px;
        height: 100vh;
        overflow-y: auto; /* Allow sidebar to scroll independently */
    }

    #main-content {
        flex-grow: 1;
        overflow: hidden; /* Prevent main content scrollbar */
    }
}