@import url('./gallery.css');

/* HOME */
#mapInfo{ display: none; }
.legend{ display: none;}


/* MAP */
#mapWrap{ margin:0 !important;}
#map{
  position:absolute; 
  top:70px; 
  left:0; 
  width:100%; 
  height:calc(100vh - 70px);
  background-color: var(--bs-secondary);
}
#loadingMap{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color:#fff;
}

#collectionDiv,#layerSwitcher{
  position: absolute; 
  top: 10px; 
  z-index: 1000;
}
#collectionDiv{
  left: 50%; 
  transform: translateX(-50%); 
}
#layerSwitcher{
  right: 20px;
  padding: 0;
  transition: all 0.3s ease-in-out;
}
#layerSwitcherContent p{
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}
#layerSwitcherToggle button:active{border-color:transparent;}
#layerSwitcherContent{padding:15px;}
#mapGuide{
  position: absolute;
  top: 100px;
  z-index: 2000;
  left: 50%;
  transform: translateX(-50%);
  width: 50vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}
#mapGuide.visible {
  opacity: 1;
  pointer-events: auto;
}
#legend{
  position:relative;
  height:auto;
  max-height:70vh;
  padding-right:.5rem;
  overflow-y: auto;
}

.leaflet-popup-content{margin:0px;}
.popUpCard{ width:250px; border:0;}
.popUpCard .card-header{border:0; border-radius:0px;}


#institutions-checkBox:checked {
  accent-color: rgb(135,94,42);
  background-color: rgb(135,94,42);
  border-color: rgb(135,94,42);
}

#findplace-checkBox:checked {
  accent-color: green;
  background-color: green;
  border-color: green;
}

#institutions-checkBox:hover {accent-color: rgb(78, 55, 25);}
#findplace-checkBox:hover {accent-color: darkgreen;}

#mapGalleryWrap.show{left:0;}
#mapGalleryTitle{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom:1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: .5rem;
}
.collection-control{
  position: absolute; 
  top: 20px; 
  left: 50%; 
  transform: translateX(-50%); 
  z-index: 1000;
  background: white; 
  padding: 8px 12px; 
  border-radius: 4px; 
  box-shadow: 0 1px 5px rgba(0,0,0,0.65); 
}
/* Media queries per controllo più granulare */
@media (max-width: 576px) {

}

@media (min-width: 577px) and (max-width: 768px) {

}

@media (min-width: 769px) and (max-width: 992px) {

}

@media (min-width: 992px) {
  .legend {
    background-color: rgba(255,255,255,.8); 
    padding:10px; 
    color: #555; 
    z-index:1000; 
    display: flex; flex-direction: column; align-items: start; justify-content: start;
  }
  .legend > div{
    position: relative; 
    width: 100%; 
    display: flex; 
    flex-direction: row; 
    flex-wrap: wrap;
    align-content: center; 
    justify-content: flex-start; 
    align-items: center;
  }
  .legend i {
    position:relative; 
    display:inline-block; 
    margin-right:5px; 
    width: 18px; 
    height: 18px;
    opacity: 0.7;
  }
  img.arrowGroup{
    display: inline-block; 
    position:relative; 
    visibility: hidden; 
    width:16px; 
    height:16px;
  }
  #mapInfo{
    display: block;
    position:absolute; 
    top:5px; 
    right:10px;
    width:auto; 
    max-width: 200px; 
    padding:10px;
    background-color: rgba(255,255,255,.8); 
    z-index:1000;
  }
}