#advanced-map-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
     position: relative;
     overflow: hidden;
}

#map-filter-panel {
    width: 250px;
    flex-shrink: 0;
}

#map-category-filter {
    width: 100%;
    padding: 8px;
    font-size: 16px;
}

#advanced-filter-map {
    flex-grow: 1;
}


.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    margin-bottom: 5px;
}

.leaflet-right {
    width: 100% !important;
}

.leaflet-control-layers-base label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    cursor: pointer;
    margin-bottom: 0px !important;
}

.leaflet-control-layers-base label span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaflet-control-layers-selector {
    transform: scale(0.95);
}
.popup-content{
    padding: 10px;
}

.popup-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    cursor: pointer;
}


.popup-title {
    font-weight: bold;
    font-size: 16px;
    padding-top: 12px;
    padding-bottom: 8px;
}
.popup-address{
    font-size: 14px;
    font-weight: bold;
    margin: 0 !important;
    padding-bottom: 8px;
}
.popup-description {
    font-size: 14px;
    margin: 0 !important;
}

.leaflet-popup-content{
    margin: 0px;
}
.popup-main-img {
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;

    /* Vendor prefixes for better browser support */
    -webkit-border-top-left-radius: 12px !important;
    -webkit-border-top-right-radius: 12px !important;

    -moz-border-radius-topleft: 12px !important;
    -moz-border-radius-topright: 12px !important;

}
.leaflet-popup-close-button {
    color: #ffffff !important; 
    background-color: rgba(0, 0, 0, 0.4) !important; 
    width: 32px !important;
    height: 32px !important;
    font-size: 20px!important;
    line-height: 32px !important;
    text-align: center !important;
    border-top-right-radius: 12px !important;
    text-decoration: none !important;
    transition: background-color 0.2s, color 0.2s !important;
 
}

.leaflet-popup-close-button:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #333333 !important;
}

#map-filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1000;
}

#map-filter-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    padding: 20px 20px 20px 20px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    transform: translateX(-260px); 
}

#map-filter-panel.open {
    transform: translateX(0);
}

#filter-toggle {
    position: absolute;
    top: 50%;
    right: -36px;
    transform: translateY(-50%);
    width: 36px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;

    font-size: 24px;
    font-weight: 600;
    color: #222;

    z-index: 2;
    padding: 0;
    user-select: none;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}

#map-pin-list-wrapper {
    margin-top: 20px;
    height: 70%;
    overflow-y: auto;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.map-pin-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 6px;
}

.map-pin-item:hover {
    background-color: #f5f5f5;
}

.map-pin-thumb {
  width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background-color: #eee;
}

.map-pin-text {
    flex: 1;
}

.map-pin-title {
    font-weight: 600;
    margin: 0;
    font-size: 14px;
}

.map-pin-desc {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0;
}



.daugiau-button {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
        transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.2s ease;
}

@media (max-width: 768px) {
  .leaflet-popup-content {
    max-width: 180px !important;
    font-size: 13px;
  }

  .leaflet-popup-content .popup-main-img {

    max-height: 100px;

  }

  .leaflet-popup-content .popup-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
  }

  .leaflet-popup-content .popup-address,
  .leaflet-popup-content .popup-description {
    font-size: 11px;
    line-height: 1.3;
  }


  .leaflet-popup-content .popup-button .daugiau-button {
    font-size: 11px;
    padding: 4px 8px;
  }
}

