.legend{
    background: #FFFFFF;
    box-shadow: 0px 4px 25px rgba(42, 55, 104, 0.1);
    border-radius: 16px;
    width: 90%;
    padding: 20px;
    position: absolute;
    top: -30px;
    left: 20px;
}

.single-nieruchomosc-map .legend {
    width: 90%;
}

.single-nieruchomosc-map .legend .show-more-less span {
    display: none;
}

.legend .title{
    margin-left: 7px;
}

.legend .show-more-less{
    color: #3D60E6;
    cursor: pointer;
}

.legend .show-more{
    display: block;
}

.legend .show-less{
    display: none;
}

.legend .legend-elements{
    display: none;
}

.legend .legend-element{
    width: fit-content;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    color: #2A3768;
    border: solid 1px #E5E5E5;
    margin: 7px;
    cursor: pointer;
}

.legend .legend-element.disabled{
    background: #F4F5FB;
}

.legend .legend-element .icon{
    margin-right: 4px;
}

.map-container .loader{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%);
    display: none;
}

/* opcjonalnie: lekkie wyróżnienie wybranych elementów legendy */
.legend .legend-element.selected {
  outline: 2px solid #2A3768;
  border-radius: 10px;
}

.legend-limit-shake { animation: legendShake .35s ease; }
@keyframes legendShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* delikatny blink przy limicie 3 POI */
.legend .legend-element.limit-blink {
  animation: poiBlink .5s linear 1;
}
@keyframes poiBlink {
  0% { box-shadow: 0 0 0 rgba(255,0,0,0); }
  50% { box-shadow: 0 0 0 4px rgba(255,0,0,.2); }
  100% { box-shadow: 0 0 0 rgba(255,0,0,0); }
}

/* aktywny element legendy (opcjonalnie dodałam klasę .active) */
.legend .legend-element.active { opacity: 1; }
.legend .legend-element.disabled { opacity: .5; }

/* pasek wyszukiwarki maks 550px, wyrównany do prawej przy powiększonej mapie */
.search-bar--compact-right {
  max-width: 550px;
  margin-left: auto; /* wyrównanie do prawej */
}
