﻿body {
    font-family: 'Microsoft JhengHei', Tahoma, 微軟正黑體, 'Trebuchet MS', Arial, san-serif;
}

html, body, #mapdiv {
    height: 100%;
    width: 100vw;
}


#CurrentCoordinate {
    background-color: #fff;
    padding: 2px 10px;
    margin: 0;
    opacity: 0.8;
}

#legend {
    display: none;
}


#legend2 {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 180px;
    padding: 8px;
    background-color: #fff;
    margin-right: 5px;
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    z-index: 401;
    border-radius: 5px;
    /*同時開啟多個圖層時圖例會很長，限高後改以捲動呈現*/
    max-height: 30vh;
    overflow-y: auto;
}

/*圖層全部關閉時整塊圖例收起來，避免只剩一個空標題*/
#legend.is-empty, #legend2.is-empty {
    display: none;
}

.legend-block {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .legend-block + .legend-block {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid #E0E0E0;
    }

.legend-block-title {
    font-weight: bold;
}

#legend2 .legend-icon, #legend #legendContent .legend-icon {
    width: 20px;
    height: 20px;
    margin-right: 3px;
    margin-bottom: -5px;
}

/*點位圖層的圖例直接沿用地圖上的標記樣式，只縮小尺寸*/
#legend2 .legend-marker, #legend #legendContent .legend-marker {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #FFF;
    margin-right: 5px;
    margin-bottom: -2px;
}

    #legend2 .legend-marker::after, #legend #legendContent .legend-marker::after {
        margin-top: -3px;
        margin-left: -3px;
        border-top-width: 5px;
        border-right-width: 3px;
        border-left-width: 3px;
    }

    #legend2 ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

        #legend2 ul li {
            line-height: 30px;
            padding: 0 5px;
            font-size: 14px;
        }

            #legend2 ul li span {
                display: inline-block;
                width: 25px;
                height: 16px;
                margin-right: 3px;
                margin-bottom: -3px;
                border: 1px solid #333;
            }

#custombutton {
    position: absolute;
    right: 20px;
    top: 0;
    z-index: 401;
}

    #custombutton button {
        border: 1px solid rgba(0,0,0,0.2);
    }

    #custombutton #btnBaseMapxs {
        padding: 5px 10px;
    }

    #custombutton #BaseMapMenuxs, #custombutton #mapApiMenuMobile {
        display: none;
    }

    #custombutton #btnAbout {
        padding: 5px 10px;
    }

    #custombutton #btnShowInfo {
        padding: 5px 10px;
    }

    #custombutton #mapApiBtnMobile {
        padding: 5px 10px;
    }

        #custombutton #mapApiBtnMobile > img {
            width: 22px;
        }

#BaseMapxs, #btnBaseMapxs, #mapApiBtnMobile {
    display: none;
}


#navbar {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1001;
    padding: 10px;
}

    #navbar > #logogroup {
        display: inline-block;
    }

        #navbar > #logogroup > #logo {
            display: inline-block;
            font-size: 14px;
            font-weight: bold;
        }

        #navbar > #logogroup > #logo-txt {
            font-size: 14px;
            font-weight: bold;
            display: inline-block;
            margin-right: 5px;
            line-height: 1.4;
            vertical-align: middle;
        }

    #navbar > #RightTools {
        display: inline-block;
        position: relative;
    }

        #navbar > #RightTools > #SearchBarContent {
            display: inline-flex;
        }


/*#region 定位功能 */
#btnPositionMenu {
    height: 40px;
    width: 130px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    background-color: #0D8D76;
    color: #fff;
    border-radius: 2px 0 0 2px;
}

#SearchBar_Data {
    width: 270px;
    height: 40px;
}

#BtnPositionSearch {
    background-color: #0D8D76;
    color: #fff;
    border-radius: 0 2px 2px 0;
    border: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

#mapApiBtn {
    background-color: #0D8D76;
    color: #fff;
    border-radius: 0 2px 2px 0;
    border: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border: 0;
    margin-left: 5px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

    #mapApiBtn > img {
        width: 40px;
    }

#PositionMenu {
    font-size: 14px;
    display: none;
    position: absolute;
    z-index: 1;
    width: 130px;
    list-style: none;
    padding: 10px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    border-radius: 0px 0px 5px 5px;
}

    #PositionMenu > li {
        padding: 5px;
        cursor: pointer;
    }

        #PositionMenu > li.active {
            background-color: #0D8D76;
            color: #FFF;
        }

        #PositionMenu > li:hover {
            background-color: #D6E5E8;
            color: #000;
        }

#btnBaseMap {
    margin-left: 5px;
    height: 40px;
    width: 90px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    background-color: #0D8D76;
    color: #fff;
    border-radius: 2px 0 0 2px;
}

.msglink {
    /*padding-inline-start: 40px;*/
}

ul.menu {
    display: none;
    margin-left: 5px;
    position: absolute;
    z-index: 1;
    /*width: 270px;*/
    /*max-height: 400px;*/
    /*overflow-y: scroll;*/
    font-size: 14px;
    list-style: none;
    padding: 10px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    border-radius: 0px 0px 5px 5px;
}

    /*底圖切換按鈕*/
    ul.menu.baseMapMenu {
        width: 270px;
        max-height: 400px;
        overflow-y: scroll;
    }

    /*圖資服務切換按鈕*/
    ul.menu.mapApiMenu {
        width: 220px;
        left: -180px;
		top: 140px;
		max-height: calc(100vh - 180px);
        overflow-y: auto;
		border-radius: 5px 5px 5px 5px;
    }

#BaseMapMenu > li, #mapApiMenu > li {
    padding: 5px;
    cursor: pointer;
}
 ul.menu.mapApiMenu li {
     text-align: left;
	  white-space: nowrap;
        }

        ul.menu.mapApiMenu label {
            margin-bottom: 0;
            white-space: nowrap;
 }

    #BaseMapMenu > li.layer.active, #mapApiMenu > li.layer.active {
        background-color: #0D8D76;
        color: #FFF;
    }

    #BaseMapMenu > li.layer:hover, #mapApiMenu > li.layer:hover {
        background-color: #D6E5E8;
        color: #000;
    }
	
	/*圖資服務-可展開圖層群組*/
#mapApiMenu > li.layer-group, #mapApiMenuMobile > li.layer-group {
    padding: 0;
}

.layer-group-header {
    padding: 5px;
    cursor: pointer;
    background-color: #EDEDED;
    font-weight: bold;
}

    .layer-group-header:hover {
        background-color: #D6E5E8;
    }

    .layer-group-header .fa {
        margin-right: 5px;
        color: #0D8D76;
    }

.layer-group.has-active > .layer-group-header {
    background-color: #0D8D76;
    color: #FFF;
}

    .layer-group.has-active > .layer-group-header .fa {
        color: #FFF;
    }

.layer-group-body {
    display: none;
    margin: 0;
    padding: 0 0 0 12px;
    list-style: none;
}

    .layer-group-body > li {
        padding: 5px;
        cursor: pointer;
    }

        .layer-group-body > li.layer.active {
            background-color: #0D8D76;
            color: #FFF;
        }

        .layer-group-body > li.layer:hover {
            background-color: #D6E5E8;
            color: #000;
        }

/*相關資訊*/
#AboutList {
    display: none;
    position: absolute;
    z-index: 1;
    width: 150px;
    font-size: 14px;
    list-style: none;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    border-radius: 5px;
    right: 0;
    top: 50px;
}

    #AboutList > li {
        padding: 5px;
        cursor: pointer;
    }

        #AboutList > li > a {
            color: #000;
            text-decoration: none;
        }

        #AboutList > li:hover {
            background-color: #D6E5E8;
            color: #000;
        }
/*定位查詢結果*/
#SearchResultBox {
    display: none;
    position: absolute;
    top: 40px;
    left: 130px;
    width: 310px;
    max-height: 250px;
    overflow: auto;
    padding: 0px 0;
    background-color: #fff;
    border-right: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

    #SearchResultBox > .SearchResultRow {
        padding: 8px;
        border-bottom: 1px solid #F2F2F2;
        cursor: pointer;
    }

        #SearchResultBox > .SearchResultRow:hover {
            background-color: #f0f0f0;
        }

        #SearchResultBox > .SearchResultRow > .result-title {
            color: #000;
            font-size: 13px;
            line-height: 1.2;
        }

        #SearchResultBox > .SearchResultRow > .result-area {
            color: #ccc;
            font-size: 12px;
            line-height: 1.6;
        }



/*行政區定位*/




#AdminBox {
    display: none;
    position: absolute;
    top: 0;
    width: 440px;
    overflow: auto;
    background-color: #fff;
    padding: 12px 12px;
    border: 1px solid #ccc;
}

#AdminListBox {
    display: none;
}

#CountyListBox ul, #AdminList ul {
    font-size: 0px;
}

#CountyListBox li, #AdminList li {
    display: inline-block;
    border-radius: 3px;
    margin-top: 5px;
}

    #CountyListBox li > a, #AdminList li > a {
        display: inline-block;
        padding: 8px 4px;
        color: #555;
        background-color: #fff;
        border: 1px solid #fff;
        text-decoration: none;
        font-size: 14px;
        border-radius: 4px;
    }

        #CountyListBox li > a:hover, #AdminList li > a:hover {
            background-color: #f0f0f0;
            color: #000;
        }

        #CountyListBox li > a.active {
            background-color: #0d8d76;
            color: #fff;
        }

#AdminVillageListBox {
    margin-top: 10px;
    max-height: 300px;
    overflow-x: hidden;
    display: none;
}

    #AdminVillageListBox li {
        position: relative;
        display: block;
        padding: 5px;
        border-radius: 4px;
        display: inline-block;
        border: 1px solid #fff;
        border-radius: 3px;
        margin: 5px;
        font-size: 14px;
    }

        #AdminVillageListBox li:hover {
            background-color: #ddd;
        }

        #AdminVillageListBox li a:hover {
            text-decoration: none;
        }

#AdminVillageListBoxClear {
    display: none;
}


/*#endregion */

/*#endregion */


/*#region rewrite leaflet*/
.leaflet-container {
    font-family: 'Microsoft JhengHei', Tahoma, 微軟正黑體, 'Trebuchet MS', Arial, san-serif;
}

.leaflet-popup-content {
    padding: 10px;
    margin: 0;
}
/*#endregion */

/*平板*/
@media screen and (max-width: 768px) {


    #BaseMapMenu, #mapApiMenu {
        right: 0;
    }

    #SearchResultBox, #AdminBox {
        left: 0;
        width: 320px;
    }

    #btnBaseMapArea, #mapApiArea {
        display: none;
    }

    #SearchBar_Data {
        width: 150px;
    }

    #custombutton {
        bottom: 20px;
        right: 10px;
        top: auto;
    }

    #BaseMapxs, #btnBaseMapxs, #mapApiBtnMobile {
        display: block;
    }


    ul.menuMobile {
        display: block;
        position: absolute;
        right: 40px;
        /*width: 270px;*/
        background-color: #fff;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
        padding: 7px;
        bottom: -80px;
        list-style: none;
        font-size: 14px;
    }

        ul.menuMobile.baseMapMenuxs {
            width: 270px;
            height: 350px;
            overflow-y: scroll;
        }

        ul.menuMobile.mapApiMenuMobile {
            width: 270px;
            height: auto;
			max-height: calc(100vh - 40px);
            overflow-y: auto;
        }


    #BaseMapMenuxs > li, #mapApiMenu > li, #mapApiMenuMobile > li {
        padding: 5px;
        cursor: pointer;
    }
	#mapApiMenuMobile > li {
        white-space: nowrap;
    }

        #BaseMapMenuxs > li.layer.active, #mapApiMenu > li.layer.active, #mapApiMenuMobile > li.layer.active {
            background-color: #0D8D76;
            color: #FFF;
        }

        #BaseMapMenuxs > li.layer:hover, #mapApiMenu > li.layer:hover, #mapApiMenuMobile > li.layer:hover {
            background-color: #D6E5E8;
            color: #000;
        }

    #legend2 {
        display: none;
    }

    #AboutList {
        right: 40px;
        top: 50px;
    }

    #modalassess img {
        width: 70px;
    }
}

@media screen and (max-width: 812px) {
    #navbar > #logogroup {
        display: none;
    }
}
/*手機*/
@media screen and (max-width: 480px) {
    #navbar {
        padding: 5px;
    }

        #navbar > #logogroup {
            display: none;
        }

    #custombutton {
        display: block;
        bottom: 80px;
        right: 10px;
        top: auto;
    }

    #legend {
        display: block;
        margin: 0;
        width: 100%;
        padding: 5px 0px;
        position: absolute;
        right: 0;
        bottom: 0;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
        z-index: 400;
    }

        #legend #legendBottom {
            vertical-align: text-bottom;
            display: inline-block;
            width: 30vw;
        }

        #legend #legendContent {
            width: 67%;
            display: inline-block;
         /*手機版空間有限，多個圖例改以捲動呈現*/
            max-height: 30vh;
            overflow-y: auto;
        }

            /*圖例標題各自獨立一行，色塊項目仍維持橫向排列*/
            #legend #legendContent .legend-block-title {
                display: block;
                line-height: 20px;
                padding-top: 2px;
            }

        #legend > #legendContent > ul {
            list-style: none;
            padding: 0;
            margin-bottom: -5px;
        }

        #legend #legendContent li {
            padding: 0;
            line-height: 30px;
            display: inline-block;
            font-size: 12px;
        }

            #legend #legendContent li > span {
                display: inline-block;
                width: 16px;
                height: 16px;
                margin-right: 3px;
                margin-bottom: -3px;
                border: 1px solid #333;
            }

    #AboutList {
        right: 40px;
        top: 60px;
    }

    .leaflet-bottom.leaflet-left {
        margin-bottom: 70px;
    }

    #CurrentCoordinate {
        display: none;
    }

    .leaflet-control-scale {
        display: none;
    }

    .leaflet-popup-content {
        max-width: 300px;
    }
}

/*剖面線 start*/
#draw3DArea > .btnOpenMenu {
    margin-left: 5px;
    height: 40px;
    width: 108px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    background-color: gray;
    color: #fff;
    border-radius: 2px 0 0 2px;
}

#draw3DArea > ul {
    display: none;
    margin-left: 5px;
    position: absolute;
    z-index: 1;
    width: 100px;
    max-height: 400px;
    font-size: 14px;
    list-style: none;
    padding: 10px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0px rgba(0, 0, 0, 0.02);
    border-radius: 0px 0px 5px 5px;
}

    #draw3DArea > ul > li {
        padding: 5px;
        cursor: pointer;
    }

        #draw3DArea > ul > li.layer.active {
            background-color: #0D8D76;
            color: #FFF;
        }

        #draw3DArea > ul > li.layer:hover {
            background-color: #D6E5E8;
            color: #000;
        }

.modal-content-fullscreen {
    height: 100%;
    border: 0;
    border-radius: 0;
}

.modal-dialog-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
}
/*剖面線 end*/

#DisasterlocationModal .modal-body {
    overflow: hidden; /* 隱藏超出容器的圖片部分 */
    position: relative; /* 確保子元素能夠定位 */
}

.DyDisasterlocation {
    width: 100%;
    text-align: center;
    
}
    .DyDisasterlocation h3 {
        text-align:left;
    }
    .DyDisasterlocation img {    
        max-width:70%;
    }

.modal-dialog-fullscreen-Disasterlocation {
    width: 100vw;
    max-width: none;
    /*height: 100%;*/
    margin: 0;
}

/*土壤液化監測場址定位點：橘色圓形標記，與查詢定位點的藍色圖釘區隔*/
.monitoring-site-icon {
    background: transparent;
    border: 0;
}

.monitoring-site-marker {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    border: 3px solid #FFF;
    border-radius: 50%;
    background-color: #0ce87e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

    /*圓形下方的指向三角形，讓標記仍看得出是定位點*/
    .monitoring-site-marker::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-top: -4px;
        margin-left: -4px;
        border-top: 8px solid #0ce87e;
        border-right: 4px solid transparent;
        border-left: 4px solid transparent;
    }

.monitoring-site-popup .monitoring-site-link {
    display: inline-block;
    margin-top: 6px;
    color: #C2410C;
    font-weight: bold;
    text-decoration: underline;
}

    .monitoring-site-popup .monitoring-site-link:hover {
        color: #E8590C;
    }
