body {
    background-color: #f8f9fa;
}

#map {
    height: 90vh;
    /* Full viewport height */
    width: 100vw;
    /* Full width */
    position: relative;
    /* Needed for absolute positioning of child elements */
}

.layer-control {
    position: absolute;
    top: 150px;
    left: 10px;
    z-index: 500;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.layer-control h3 {
    font-size: 1.25rem;
}

.main-container .region-content {
    padding: 0;
}

.feature-table {
    display: none;
    position: absolute;
    bottom: 0.5%;
    right: 0.5%;
    z-index: 1000;
    background: white;
    padding: 10px;
    width: 425px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    /* or 'absolute' depending on your layout */
}

.feature-table h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.feature-table button {
    margin: 5px 0px;
    font-size: 12px;
}

#feature-table {
    width: 100%;
    border-collapse: collapse;
}

#feature-table th,
#feature-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
    line-break: anywhere;
    font-size: 0.8rem;
}


#feature-table th {
    background-color: #f2f2f2;
}

.feature-table tbody {
    display: block;
    max-height: 300px;
    /* Adjust height as needed */
    overflow-y: auto;
}

.feature-table thead,
.feature-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* Set the width of the first column */
#feature-table th:nth-child(1),
#feature-table th:nth-child(2),
#feature-table td:nth-child(1),
#feature-table td:nth-child(2) {
    width: 30%;
}


/* Legend container */
.leaflet-left .leaflet-control {
    width: 100% !important;
    margin-left: 4px;
    border: 0;
}

.legend {
    background-color: rgba(64, 64, 64, 0.8);
    padding: 10px;
    border-radius: 5px;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Legend title */
.legend-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 4px;
    /* Adjust the gap */
}

/* Legend item */
.legend-item {
    margin: 0 0 0 15px;
    display: inline-block;
    width: 45%;
    vertical-align: top;
}

/* Legend icon (for lines) */
.legend-icon {
    width: 10px;
    height: 10px;
    display: inline-block;
    border: 1px solid #000;
    margin-right: 5px;
}

/* Legend icon (for points) */
.legend-icon-img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/* Custom CSS for the reset button */
.leaflet-control-reset {
    background: white;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    margin-right: 10px;
}

.leaflet-control-reset button {
    color: black;
    font-size: 1.5rem !important;
    text-decoration: none;
    margin: -5px 5px -1px 5px;
}

.leaflet-left {
    width: 21%;
}

.leaflet-right {
    right: 0;
    z-index: 400;
}


/* Layer checkbox block: Start */
.layerbox-wrapper {
    font-family: sans-serif;
}

.layer-item {
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 0 0px 5px;
}

.layer-header {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.layer-header label {
    margin-left: 8px;
    cursor: pointer;
}

.layer-parts-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-top: 5px;
}

.layer-checkbox:checked~.layer-parts-container {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.layer-parts-list {
    list-style-type: none;
    padding-left: 20px;
    margin: 5px 0 0 0;
}

.layer-parts-list li {
    padding: 3px 0;
    color: #555;
}

.layer-part-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.part-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.line-style {
    font-size: 0.8em;
    color: #666;
    padding: 2px 5px;
    background: #f5f5f5;
    border-radius: 3px;
}

/* Layer checkbox block: End */


.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #333;
    margin-right: 6px;
    margin-left: 20px;
    vertical-align: middle;
    border-radius: 2px;
}


.line-style-preview {
    display: inline-block;
    width: 40px;
    height: 0;
    border-top-width: 3px;
    border-top-style: solid;
    margin-right: 5px;
    vertical-align: middle;
}

.line-style-preview.dashed {
    border-top-style: dashed;
}

.line-style-preview.dotted {
    border-top-style: dotted;
}

.line-style-preview.solid {
    border-top-style: solid;
}