.gis-container{

display:flex;
height:calc(100vh - 120px);

}


/* =========================================================
   BASEMAP SWITCHER
   ========================================================= */

.basemap-panel {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dfe6e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    margin-bottom: 10px;
}

/* ---------- Header ---------- */

.basemap-header {
    background: linear-gradient(135deg, #1769aa, #2196f3);
    color: #ffffff;
    padding: 7px 12px;
}

.basemap-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
}

.basemap-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* ---------- Options ---------- */

.basemap-options {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.basemap-option {
    width: 100%;
    border: 1px solid #e1e6e8;
    background: #f8fafb;
    border-radius: 5px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    text-align: left;
    cursor: pointer;
    color: #34495e;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.basemap-option:hover {
    background: #eef7ff;
    border-color: #90caf9;
}

/* ---------- Active Basemap ---------- */

.basemap-option.active {
    background: #e8f5e9;
    border-color: #43a047;
    color: #176b45;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #43a047;
}

.basemap-option-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    font-size: 12px;
}

.basemap-option.active .basemap-option-icon {
    background: #43a047;
    color: #ffffff;
}


/* =========================================================
   PROFESSIONAL GIS LAYER MANAGER
   ========================================================= */

.layer-panel {
    background: #f7f9fb;
    border: 1px solid #d9e1e7;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);

    /* If many layers are present */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Layer Manager Title */
.layer-panel h5 {
    margin: 0 !important;
    padding: 13px 15px;

    color: #ffffff;
    background: linear-gradient(
        135deg,
        #155d3a,
        #237a4b
    );

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;

    border-radius: 11px 11px 0 0;

    display: flex;
    align-items: center;
    gap: 8px;
}

/* Add GIS icon before heading */
.layer-panel h5::before {
    content: "🗺️";
    font-size: 17px;
}


/* Individual layer row */
.layer-panel .form-check {
    margin: 0 !important;
    padding: 8px 12px 8px 14px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid #e8edf1;

    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

/* Remove border from last item */
.layer-panel .form-check:last-child {
    border-bottom: none;
}


/* Hover effect */
.layer-panel .form-check:hover {
    background: #eaf5ee;
    cursor: pointer;
}


/* Checkbox */
.layer-panel .form-check-input {
    width: 17px;
    height: 17px;

    margin: 0 9px 0 0;

    cursor: pointer;

    border: 1.5px solid #9aa7b1;
}


/* Checked checkbox */
.layer-panel .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}


/* Checkbox focus */
.layer-panel .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}


/* Layer name */
.layer-panel .form-check-label {
    margin: 0;

    color: #263238;

    font-size: 14px;
    font-weight: 500;

    line-height: 1.3;

    cursor: pointer;

    flex: 1;
}


/* Checked layer text */
.layer-panel .form-check-input:checked + .form-check-label {
    color: #155d3a;
    font-weight: 600;
}


/* Scrollbar */
.layer-panel::-webkit-scrollbar {
    width: 6px;
}

.layer-panel::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.layer-panel::-webkit-scrollbar-thumb {
    background: #b8c7bf;
    border-radius: 10px;
}

.layer-panel::-webkit-scrollbar-thumb:hover {
    background: #198754;
}

/* =========================================================
   LAYER COLOR INDICATOR
   ========================================================= */

.layer-color-box {
    display: inline-block;

    width: 14px;
    height: 14px;

    margin-right: 8px;

    border-radius: 3px;

    border: 1px solid rgba(0, 0, 0, 0.25);

    vertical-align: -2px;

    flex-shrink: 0;
}
/* =========================================================
   WATERSHED FILTERS PANEL & DROPDOWNS
   ========================================================= */

/* Filter Box Container */
.layer-panel .watershed-filters {
    background: #f8fafb !important;
    border: none !important;
    border-bottom: 1px solid #e8edf1 !important;
    border-radius: 0 !important;
    padding: 12px 14px !important;
    margin-bottom: 0 !important;
}

/* Section Subheading (Watershed Boundaries) */
.layer-panel .watershed-filters h6 {
    color: #155d3a !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    margin-bottom: 10px !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icon before Watershed Boundaries heading */
.layer-panel .watershed-filters h6::before {
    content: "🌊";
    font-size: 14px;
}

/* Label Styling (Watershed, Sub-Watershed, Micro-Watershed) */
.layer-panel .watershed-filters label {
    color: #263238 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
    display: block;
}

/* Form Select Dropdown Styling */
.layer-panel .watershed-filters select.form-select-sm {
    background-color: #ffffff;
    color: #263238;
    border: 1px solid #b8c7bf;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* Hover & Focus state for Select inputs */
.layer-panel .watershed-filters select.form-select-sm:hover:not(:disabled) {
    border-color: #198754;
    background-color: #f4faf6;
}

.layer-panel .watershed-filters select.form-select-sm:focus {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
    outline: none;
}

/* Disabled Dropdown state */
.layer-panel .watershed-filters select.form-select-sm:disabled {
    background-color: #e9ecef;
    border-color: #d9e1e7;
    color: #8c9ba5;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Section Subheading (Map Layers) */
.layer-panel > h6.text-secondary {
    color: #155d3a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    padding: 10px 14px 6px 14px;
    margin-bottom: 0 !important;
    background: #f7f9fb;
    border-bottom: 1px solid #e8edf1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.layer-panel > h6.text-secondary::before {
    content: "📚";
    font-size: 14px;
}

/* Remove default horizontal rule margin/border inside layer panel */
.layer-panel hr {
    display: none;
}

/* =========================================================
   FEATURE DETAILS PANEL
   ========================================================= */

.info-panel {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid #dfe6e9;
    margin-top: 15px;
}

/* ---------- Header ---------- */

.feature-header {
    background: linear-gradient(135deg, #087f5b, #0ca678);
    color: #ffffff;
    padding: 12px 15px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.panel-icon {
    width: 27px;
    height: 27px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

/* ---------- Content ---------- */

.feature-content {
    padding: 14px;
    max-height: 350px;
    overflow-y: auto;
}

/* ---------- Empty state ---------- */

.feature-empty {
    text-align: center;
    padding: 18px 8px 20px;
}

.feature-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #087f5b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: bold;
}

.feature-empty-title {
    color: #34495e;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.feature-empty-text {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.5;
}

/* ---------- Feature information ---------- */

#featureInfo table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

#featureInfo table tr {
    border-bottom: 1px solid #edf0f2;
}

#featureInfo table tr:last-child {
    border-bottom: none;
}

#featureInfo table td {
    padding: 8px 6px;
    vertical-align: top;
}

#featureInfo table td:first-child {
    width: 40%;
    color: #087f5b;
    font-weight: 600;
}

#featureInfo table td:last-child {
    color: #34495e;
    word-break: break-word;
}

/* ---------- Scrollbar ---------- */

.feature-content::-webkit-scrollbar {
    width: 5px;
}

.feature-content::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.feature-content::-webkit-scrollbar-thumb {
    background: #aab7b8;
    border-radius: 10px;
}

.feature-content::-webkit-scrollbar-thumb:hover {
    background: #087f5b;
}
.layer-name {
    vertical-align: middle;
}



.map-panel{

flex:1;

}

#map{

height:100%;
width:100%;

}

.layer-title{

font-size:18px;
font-weight:bold;
margin-bottom:15px;

}

.gis-header
{
    background:#14532d;
    color:white;
    padding:10px;

    display:flex;
    align-items:center;
    justify-content:center;

    gap:12px;

    white-space:nowrap;
	font-size:14px;
}


.user-info
{
    background:#166534;

    padding:9px 12px;

    border-radius:5px;

    font-size:14px;

    display:inline-flex;
    align-items:center;

    white-space:nowrap;
}


.change-beat
{
    display:inline-flex;
    align-items:center;
	 background:#14532d;
    color:white;
}


#beatSelect
{
    width:170px;

    padding:8px 10px;

    border:1px solid #d1d5db;

    border-radius:5px;

    font-size:14px;

    margin:0;
}

.download-beat
{
    display:inline-flex;
    align-items:center;
}


.download-btn
{
    background:#166534;

    color:white;

    border:1px solid #ffffff;

    padding:8px 12px;

    border-radius:5px;

    font-size:16px;

    cursor:pointer;

    white-space:nowrap;
}


.download-btn:hover
{
    background:#15803d;
}


/* =========================================================
   GIS MAP TOOLS
   ========================================================= */

#map {
    position: relative;
}

.gis-map-tools {
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
    z-index: 1500;
    width: 280px;
}


/* =========================================================
   SEARCH BOX
   ========================================================= */

.gis-search-box {
    position: relative;
    width: 280px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    border: 1px solid #dfe6e9;
}

.gis-search-icon {
    position: absolute;
    left: 10px;
    top: 8px;
    font-size: 15px;
}

#gisFeatureSearch {
    width: 100%;
    height: 36px;
    border: none;
    outline: none;
    padding: 0 35px 0 34px;
    border-radius: 8px;
    font-size: 12px;
    color: #34495e;
    box-sizing: border-box;
}

#gisFeatureSearch:focus {
    box-shadow: inset 0 0 0 2px #2196f3;
}

#gisSearchClear {
    position: absolute;
    right: 7px;
    top: 6px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-size: 18px;
    cursor: pointer;
}


/* =========================================================
   SEARCH RESULTS
   ========================================================= */

.gis-search-results {
    display: none;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
    border-radius: 0 0 8px 8px;
}

.gis-search-result {
    padding: 9px 11px;
    border-bottom: 1px solid #eeeeee;
    cursor: pointer;
    font-size: 11px;
}

.gis-search-result:hover {
    background: #eef7ff;
}

.gis-search-result-title {
    font-weight: 600;
    color: #1769aa;
    margin-bottom: 3px;
}

.gis-search-result-detail {
    color: #6c757d;
}


/* =========================================================
   TOOL BUTTONS
   ========================================================= */

.gis-tool-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 7px;
}

.gis-tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.gis-tool-btn:hover {
    background: #eef7ff;
    transform: translateY(-1px);
}


/* =========================================================
   FLOATING PANELS
   ========================================================= */

.gis-floating-panel {
    display: none;
    margin-top: 7px;
    width: 270px;
    background: #ffffff;
    border-radius: 9px;
    border: 1px solid #dfe6e9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.20);
    overflow: hidden;
}


/* =========================================================
   PANEL HEADER
   ========================================================= */

.gis-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1769aa, #2196f3);
    color: #ffffff;
    padding: 9px 11px;
    font-size: 13px;
    font-weight: 600;
}

.gis-panel-close {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 19px;
    line-height: 18px;
    cursor: pointer;
}


/* =========================================================
   LEGEND
   ========================================================= */

#gisLegendContent {
    max-height: 300px;
    overflow-y: auto;
    padding: 9px;
}

.gis-legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 5px;
    border-bottom: 1px solid #edf0f2;
    font-size: 11px;
    color: #34495e;
}

.gis-legend-symbol {
    width: 27px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.gis-legend-line {
    height: 4px;
    border-radius: 3px;
}

.gis-legend-point {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    margin-left: 7px;
    margin-right: 7px;
}

.gis-empty-message {
    padding: 12px;
    text-align: center;
    color: #7f8c8d;
    font-size: 11px;
}


/* =========================================================
   MEASURE
   ========================================================= */

.gis-measure-buttons {
    padding: 9px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gis-measure-buttons button {
    border: 1px solid #dfe6e9;
    background: #f8fafb;
    border-radius: 5px;
    padding: 7px;
    font-size: 11px;
    cursor: pointer;
    color: #34495e;
}

.gis-measure-buttons button:hover {
    background: #eef7ff;
    border-color: #90caf9;
}

.gis-measure-result {
    border-top: 1px solid #eeeeee;
    padding: 9px;
    font-size: 11px;
    color: #1769aa;
    text-align: center;
    background: #fafafa;
}


/* =========================================================
   SEARCH / PANEL SCROLLBAR
   ========================================================= */

.gis-search-results::-webkit-scrollbar,
#gisLegendContent::-webkit-scrollbar {
    width: 5px;
}

.gis-search-results::-webkit-scrollbar-thumb,
#gisLegendContent::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 10px;
}


/* =========================================================
   PRINT
   ========================================================= */

@media print {

    .gis-map-tools,
    .leaflet-control-container {
        display: none !important;
    }

    #map {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100vh !important;
    }
}


/* =========================================================
   MOBILE / SMALL SCREEN
   ========================================================= */

@media (max-width: 768px) {

    .gis-map-tools {
        top: 10px;
        right: 10px;
        width: 240px;
    }

    .gis-search-box {
        width: 240px;
    }

    .gis-floating-panel {
        width: 240px;
    }
}

/* =========================================================
   MORE TOOLS
========================================================= */

.gis-more-tools {
    position: relative;
}


/* More Tools dropdown */

.gis-more-tools-menu {
    display: none;

    position: absolute;

    top: 42px;
    right: 0;

    width: 185px;

    background: #ffffff;

    border: 1px solid #dfe6e9;

    border-radius: 8px;

    box-shadow: 0 4px 15px rgba(0,0,0,0.22);

    padding: 5px;

    z-index: 2000;
}


/* Show menu */

.gis-more-tools-menu.show {
    display: block;
}


/* Individual menu item */

.gis-more-tool-item {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;

    border: none;

    background: transparent;

    padding: 9px 10px;

    border-radius: 5px;

    cursor: pointer;

    font-size: 12px;

    color: #34495e;

    text-align: left;

    transition: all 0.15s ease;
}


/* Hover */

.gis-more-tool-item:hover {

    background: #eef7ff;

    color: #1769aa;
}


/* Icon */

.gis-more-tool-item span:first-child {

    width: 20px;

    text-align: center;

    font-size: 15px;
}


/* Active More Tools button */

.gis-more-tools > .gis-tool-btn.active {

    background: #e3f2fd;

    color: #1769aa;
}


/* =========================================================
   LOCATION MARKER
========================================================= */

.gis-location-marker {

    width: 18px;

    height: 18px;

    border-radius: 50%;

    background: #2196f3;

    border: 3px solid #ffffff;

    box-shadow:
        0 0 0 2px #2196f3,
        0 2px 6px rgba(0,0,0,0.35);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .gis-more-tools-menu {

        width: 175px;

    }

}

/* ======================================================
   COORDINATE DISPLAY
   ====================================================== */

.coordinate-display {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);

    font-size: 12px;
    font-weight: 600;
    color: #333;

    min-width: 175px;
    text-align: center;

    border: 1px solid #ddd;
}


/* ======================================================
   SCALE BAR
   ====================================================== */

.leaflet-control-scale {
    margin-bottom: 10px !important;
}

.leaflet-control-scale-line {
    background: rgba(255,255,255,0.90);
    border: 2px solid #333;
    border-top: none;

    color: #222;

    font-size: 11px;
    font-weight: 600;

    padding: 2px 5px;

    box-shadow: 0 1px 4px rgba(0,0,0,0.20);
}


/* =========================================================
   FEATURE DETAILS PANEL - INSIDE MAP
========================================================= */

#featureDetailsPanel {

    position: absolute;

    /* Stay below the top map toolbar */
    top: 85px;

    /* Right side INSIDE MAP */
    right: 15px;

    left: auto;

    width: 320px;

    max-height: calc(100% - 90px);

    background: #ffffff;

    border-radius: 10px;

    border: 1px solid #dfe6e9;

    box-shadow:
        0 5px 20px rgba(0,0,0,0.22);

    /*
       Higher than map layers,
       but lower than important controls
    */
    z-index: 1400;

    overflow: hidden;

    /* Hidden initially */
    opacity: 0;

    visibility: hidden;

    transform: translateX(30px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}


/* =========================================================
   SHOW PANEL
========================================================= */

#featureDetailsPanel.show {

    opacity: 1;

    visibility: visible;

    transform: translateX(0);

}


/* =========================================================
   HEADER
========================================================= */

#featureDetailsPanel .feature-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    background:
        linear-gradient(
            135deg,
            #1769aa,
            #2196f3
        );

    color: #ffffff;

    padding: 9px 11px;
	
}


/* =========================================================
   TITLE
========================================================= */

#featureDetailsPanel .panel-title {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 13px;

    font-weight: 600;
}


/* =========================================================
   ICON
========================================================= */

#featureDetailsPanel .panel-icon {

    width: 23px;

    height: 23px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.18);

    font-size: 14px;

    font-weight: bold;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

#featureDetailsPanel .feature-close-btn {

    width: 26px;

    height: 26px;

    border: none;

    border-radius: 5px;

    background: transparent;

    color: #ffffff;

    font-size: 21px;

    line-height: 24px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;
}


#featureDetailsPanel .feature-close-btn:hover {

    background:
        rgba(255,255,255,0.20);

}


/* =========================================================
   CONTENT
========================================================= */

#featureDetailsPanel .feature-content {

    max-height: calc(100vh - 180px);

    overflow-y: auto;

    padding: 12px;
}


/* =========================================================
   SCROLLBAR
========================================================= */

#featureDetailsPanel .feature-content::-webkit-scrollbar {

    width: 5px;

}

#featureDetailsPanel .feature-content::-webkit-scrollbar-thumb {

    background: #adb5bd;

    border-radius: 10px;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    #featureDetailsPanel {

        top: 65px;

        right: 10px;

        width: 280px;

        max-height: calc(100% - 75px);

    }

}

.map-polygon-label {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid #333 !important;
    border-radius: 4px !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
    pointer-events: none !important; /* Allows clicks to pass through to the polygon beneath */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}