/* bacis map & map controller layout */ 

.map {
  width: 100%;
  height: 600px;
}
.map:-webkit-full-screen {
  height: 100%;
  margin: 0;
}
.map:fullscreen {
  height: 100%;
}

#map .ol-full-screen{
  top: 4.7em;
  right : auto;
  left : .5em;
}

#map .ol-full-screen button {
  border-radius: 6px;
}

#map .ol-control {
  background-color: transparent;
}

#map .ol-zoom{
  top : 10px !important;
}

#map .ol-zoom .ol-zoom-in  {
  border-radius: 6px;
  width:22px;
  height:22px;
  font-size:1em;
}

#map .ol-zoom .ol-zoom-out {
  border-radius: 6px;
  width:22px;
  height:22px;
  font-size:1em;
}
#map .ol-zoom-extent {
  top: 65px;
  
}
#map .ol-touch .ol-extent {
  top: 65px;
}

#map .ol-zoom-extent button {
  border-radius: 6px; 
  width:22px;
  height:22px; 
  font-size:1em;
}

#map .ol-zoom-in.ol-has-tooltip:hover [role=tooltip],
#map .ol-zoom-in.ol-has-tooltip:focus [role=tooltip] {
  top: 3px;
}

#map .ol-zoom-out.ol-has-tooltip:hover [role=tooltip],
#map .ol-zoom-out.ol-has-tooltip:focus [role=tooltip] {
  top: 232px;
}

#map .ol-control button{
  background: #130085; /* fallback for IE - IE6 requires background shorthand*/
  /*background: rgba(0, 60, 136, 0.5);*/
  background: rgba(0, 60, 136, 0.75);
  color: white;
  
}


/* map legend */
#map_legend {
  margin-bottom: 0px;
  margin-right: 0px;
}
.map_legend_box {
  display: none;
  width: 240px;
  margin: 5px 20px 0 0;
  border: 2px solid #333;
  border-radius: 4px;
  font-size: 75%;
  color: #333;
}
.map_legend_box .map_legend_title {
  padding: 5px 10px;
  text-align: left;
  background-color: #e6e6e6;
}
.map_legend_box .map_legend_content {
  background-color: white;
  padding: 5px 10px;
  /*border-top: 2px solid #333;  */ 
  height:100px;
  align-content: center;
}

#loading {
  position: absolute;
  z-index: 99999;
  width: 300px;
  height: 30px;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
}

#loading .text {
  width: 200px;
  white-space: nowrap; 
  font-size: clamp(12px, 2.5vw, 20px); 
  line-height: 30px; 
}

/* OpenLayers Attribution */
.olControlAttribution {
  bottom: 0;
  right: 0;
  /* Fallback for web browsers that don't support RGBa */
  background-color: white;
  /* RGBa with 0.6 opacity */
  background-color: rgba(255, 255, 255, 0.6);
} 

/* Make error image or cross domain image look like ok */
.olImageLoadError {
    background-color: transparent;
}

/* button */
.c-button {
  display: block;
  padding: 3px 8px;
  border: 2px solid #BBB;
  border-radius: 15px;
  color: #333;
  background-color: #F3F3F3;
  font-size: 120%;
  text-align: center;
  text-decoration: none;
  text-shadow: 1px 1px 1px #FFF;
  box-shadow: 1px 2px 3px 0px #DDD;
  box-sizing: border-box;
}
.c-button:hover,
.c-button:focus {
  border-color: #999;
  background-color: #E6E6E6;
  color: #333;
  text-decoration: none;
}

.custom-control {
  position: absolute;
  left: 10px; /* 距離左側10px */
  bottom: 12%; /* 距離底部20% */
  z-index: 1000; /* 保證在最前面 */
  background-color: rgba(255, 255, 255, 0.8); /* 背景顏色和透明度 */
  padding: 5px; /* 內邊距 */
  border-radius: 5px; /* 圓角 */
}

/* map overlay */
.c-map-overlay {
  z-index: 1100; 
  position: absolute;
  /*top: 0;*/
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #FFFFFF;
}
.c-map-overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  overflow: hidden;
}

.c-map-overlay-close-button {
  display: block;
  width: 100%;
  height: 100%;
  background: url("../images/close-btn.png") 0 0 no-repeat;
  background-size: 100% 100%;
  background-color:#cc0033;
  font-size: 0;
  line-height: 0;
}

.c-map-overlay-content {
  padding-right: 40px;
  overflow: auto;
}

.c-map-overlay iframe {
  border: 0;
}

/* map controller */
.c-map-primary-controller,
.c-map-secondary-controller {
  vertical-align: top;
  margin-bottom: 10px;
}
.c-map-controller-inputs {
  display: inline-block;
}
.c-map-controller-inputs select {
  margin-right: 10px;
}

/* map layer trigger */
.c-map-layer-trigger {
  display: inline-block;
  padding-right: 20px;
}
.c-map-layer-trigger label {
  margin: 0 5px 0 0;
  vertical-align: middle;
}
.c-map-layer-trigger input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

/* layermenuedit */
.c-map-layer-trigger input[type="checkbox"] {
  display: none;
}

.c-map-layer-trigger img {
  width: 20px;
  height: 20px; 
  filter: none;
  transition: filter 0.2s ease, transform 0.2s ease; 
}

.c-map-layer-trigger input[type="checkbox"]:checked + label img,
.c-map-layer-trigger input[type="checkbox"]:checked + label + img {
  filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(100%) brightness(100%) contrast(100%)
}

.c-map-layer-trigger input[type="checkbox"]:disabled + label img,
.c-map-layer-trigger input[type="checkbox"]:disabled + label,
.c-map-layer-trigger input[type="checkbox"]:disabled + label + img {
  filter: contrast(0.2);
  cursor: not-allowed;
}

.c-map-layer-trigger:has(input[type="checkbox"]:disabled) {
    cursor: not-allowed !important;
}

.c-map-layer-trigger label {
  pointer-events: none;
}

.c-map-layer-trigger {
  display: inline-block; 
  margin-right: 3px; 
}

.c-map-layer-trigger input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#tooltip-icon,#legend-icon {
  display: none;
}

@media (pointer: coarse) {
  #tooltip-icon,#legend-icon {
    display: inline;
  }
}


/* layermenuedit */

/* map status */
.wxgis .c-map-status p {
  margin: 5px 0;
}

.c-help {
  margin-top: 20px;
}


.c-map svg text {
  border: 5px solid blue;
  padding: 3px 6px;
  border-radius: 12px;
  z-index: 2;
}

/*.c-map svg text tspan{*/
.c-map svg text.rectText tspan{
  text-shadow:1px 1px 3px #000000;
}

.c-map svg rect {
  z-index: 1;
}

@media all and (min-width:1024px) {
  .c-map-primary-controller,
  .c-map-secondary-controller {
    display: inline-block;
    vertical-align: top;
    margin-bottom: 10px;
  }
}

@media all and (max-width:767px) {
}
