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

#map {
	height: calc(100vh - 300px);
	width: 100%;
    position: relative;
    
    z-index: 1;

}

.loader {
    border: 5px solid rgba(0, 0, 0, 0.2);
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

canvas {
    max-width: 100%;
    height: 300px;
    margin-bottom: 20px;
}

.legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 12px;
    line-height: 1.5;
    z-index: 1000;
}

.panel {
    position: absolute;
    top: 20px;
    right: 20px;
    /* ✅ 改為 right: 20px 讓它出現在右上角 */
    width: 250px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    cursor: move;
}

.panel-header {
    background: #0078d4;
    color: white;
    padding: 5px 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: grab;
}

.panel-content {
    padding: 10px;
    max-height: 400px;
    /* 最大高度 */
    overflow: hidden;
    /* 初始時隱藏滾動條 */
}

.panel-content.scrollable {
    overflow-y: auto;
    /* 當內容過多時才顯示滾動條 */
}

.horizontal-bar {
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

#info-panel {
    position: fixed; /* 固定在視窗內 */
    top: 50px; /* 距離視窗頂部 50px，可根據需求調整 */
    right: 10px; /* 靠近右側 */
    width: 250px; /* 固定寬度 */
    max-height: 90vh; /* 確保不超過視窗高度 */
    overflow-y: auto; /* 若內容過多則允許滾動 */
    background: rgba(255, 255, 255, 0.95); /* 透明背景 */
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 1000; /* 確保在最上層 */
}

.info {
    font-size: 14px;
    line-height: 1.5;
}

.info label {
    padding-left: 15px; /* 根據需要調整數值 */
}

body {
    margin: 0;
    overflow: hidden;
}