/* Minimalny styl kontenera mapy */
#b24-map-container {
    border: 1px solid #ddd;
    margin: 20px 0;
}

.leaflet-popup-content {
    font-size: larger;
}

.leaflet-popup-content .popup-social-container {
    display: flex;
    flex-direction: column;
}

.leaflet-popup-content .popup-social-container .popup-social-icons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 10px 0;
}

.leaflet-popup-content .popup-social-container a div {
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-size: contain;
}

.leaflet-popup-content .popup-social-container .popup-route{
    display: flex;
    align-items: center;
    font-weight: bold;
    justify-content: center;
}

.leaflet-popup-content .popup-route-btn, #b24-my-location-btn{
    width: fit-content;
    padding: 8px 16px;
    background: #F2910D;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.leaflet-popup-content .popup-route-btn:hover, #b24-my-location-btn:hover {
    background: #DE2C04;
}

.leaflet-popup-content .popup-social-container a .facebook {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 9.021C18 4.0499 13.9711 0.0209961 9 0.0209961C4.02891 0.0209961 0 4.0499 0 9.021C0 13.2397 2.90742 16.7835 6.82734 17.7573V11.7702H4.97109V9.021H6.82734V7.83623C6.82734 4.77412 8.2125 3.35381 11.2219 3.35381C11.7914 3.35381 12.7758 3.46631 13.1801 3.57881V6.06787C12.9691 6.04678 12.6 6.03272 12.1395 6.03272C10.6629 6.03272 10.0934 6.5917 10.0934 8.04365V9.021H13.0324L12.5262 11.7702H10.0898V17.9542C14.5477 17.4163 18 13.623 18 9.021Z' fill='%23F2910D'/%3E%3C/svg%3E%0A");
}

.leaflet-popup-content .popup-social-container a .instagram {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.87822 3.97783C5.64229 3.97783 3.83877 5.78135 3.83877 8.01729C3.83877 10.2532 5.64229 12.0567 7.87822 12.0567C10.1142 12.0567 11.9177 10.2532 11.9177 8.01729C11.9177 5.78135 10.1142 3.97783 7.87822 3.97783ZM7.87822 10.6435C6.4333 10.6435 5.25205 9.46572 5.25205 8.01729C5.25205 6.56885 6.42979 5.39111 7.87822 5.39111C9.32666 5.39111 10.5044 6.56885 10.5044 8.01729C10.5044 9.46572 9.32314 10.6435 7.87822 10.6435ZM13.0251 3.8126C13.0251 4.33643 12.6032 4.75479 12.0829 4.75479C11.5591 4.75479 11.1407 4.33291 11.1407 3.8126C11.1407 3.29229 11.5626 2.87041 12.0829 2.87041C12.6032 2.87041 13.0251 3.29229 13.0251 3.8126ZM15.7005 4.76885C15.6407 3.50674 15.3524 2.38877 14.4278 1.46768C13.5067 0.546582 12.3888 0.258301 11.1267 0.19502C9.82588 0.121191 5.92705 0.121191 4.62627 0.19502C3.36768 0.254785 2.24971 0.543066 1.3251 1.46416C0.400488 2.38525 0.115723 3.50322 0.0524414 4.76533C-0.0213867 6.06611 -0.0213867 9.96494 0.0524414 11.2657C0.112207 12.5278 0.400488 13.6458 1.3251 14.5669C2.24971 15.488 3.36416 15.7763 4.62627 15.8396C5.92705 15.9134 9.82588 15.9134 11.1267 15.8396C12.3888 15.7798 13.5067 15.4915 14.4278 14.5669C15.3489 13.6458 15.6372 12.5278 15.7005 11.2657C15.7743 9.96494 15.7743 6.06963 15.7005 4.76885ZM14.02 12.6614C13.7458 13.3505 13.2149 13.8813 12.5224 14.1591C11.4853 14.5704 9.02432 14.4755 7.87822 14.4755C6.73213 14.4755 4.26768 14.5669 3.23408 14.1591C2.54502 13.8849 2.01416 13.354 1.73643 12.6614C1.3251 11.6243 1.42002 9.16338 1.42002 8.01729C1.42002 6.87119 1.32861 4.40674 1.73643 3.37314C2.01064 2.68408 2.5415 2.15322 3.23408 1.87549C4.27119 1.46416 6.73213 1.55908 7.87822 1.55908C9.02432 1.55908 11.4888 1.46768 12.5224 1.87549C13.2114 2.14971 13.7423 2.68057 14.02 3.37314C14.4313 4.41025 14.3364 6.87119 14.3364 8.01729C14.3364 9.16338 14.4313 11.6278 14.02 12.6614Z' fill='%23F2910D'/%3E%3C/svg%3E%0A");
}

.leaflet-popup-content .popup-social-container a .twitter {
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='16' viewBox='0 0 18 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.683 0.708496H16.165L10.7439 6.90303L17.1213 15.3335H12.1291L8.21621 10.2218L3.74434 15.3335H1.25879L7.05605 8.70654L0.942383 0.708496H6.06113L9.59434 5.38076L13.683 0.708496ZM12.8111 13.8499H14.1857L5.3123 2.11475H3.83574L12.8111 13.8499Z' fill='%23DE2C04'/%3E%3C/svg%3E%0A");
}

.leaflet-popup-content .popup-social-container a .linkedin {
    background-image: url("data:image/svg+xml,%3Csvg width='17' height='16' viewBox='0 0 17 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.375 0.145996H1.87148C1.25273 0.145996 0.75 0.655762 0.75 1.28154V14.7604C0.75 15.3862 1.25273 15.896 1.87148 15.896H15.375C15.9938 15.896 16.5 15.3862 16.5 14.7604V1.28154C16.5 0.655762 15.9938 0.145996 15.375 0.145996ZM5.51016 13.646H3.17578V6.12959H5.51367V13.646H5.51016ZM4.34297 5.10303C3.59414 5.10303 2.98945 4.49482 2.98945 3.74951C2.98945 3.0042 3.59414 2.396 4.34297 2.396C5.08828 2.396 5.69648 3.0042 5.69648 3.74951C5.69648 4.49834 5.0918 5.10303 4.34297 5.10303ZM14.2605 13.646H11.9262V9.98975C11.9262 9.11787 11.9086 7.99639 10.7133 7.99639C9.49687 7.99639 9.31055 8.94561 9.31055 9.92647V13.646H6.97617V6.12959H9.21563V7.15615H9.24727C9.56016 6.56553 10.323 5.94326 11.4586 5.94326C13.8211 5.94326 14.2605 7.50068 14.2605 9.52568V13.646Z' fill='%23F2910D'/%3E%3C/svg%3E%0A");
}

/* Zoom */

#b24-map-container .leaflet-control-zoom {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: unset;
}

#b24-map-container .leaflet-control-zoom a{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #DE2C04;
}

#b24-map-container .leaflet-touch .leaflet-control-zoom-in, 
#b24-map-container .leaflet-touch .leaflet-control-zoom-out {
    font-size: 30px;
    color: white;
    text-indent: 0px;
    font-weight: 300;
}

#b24-map-container .leaflet-touch .leaflet-control-zoom-in span, 
#b24-map-container .leaflet-touch .leaflet-control-zoom-out  span {
    margin-top: -7px;
}

/* Search */

#b24-map-container .leaflet-control-search{
    border: unset;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    min-width: 420px;
}

#b24-map-container .leaflet-control-search input {
    width: 100% !important;
    margin: 0;
    padding: 6px 20px 6px 12px;
    border: 1px solid gray !important;
    border-radius: 4px;
    outline-width: 0px;
	height: 36px;
}

#b24-map-container .leaflet-control-search input:focus {
    border: 1px solid gray;
    outline-width: 0px;
}

#b24-map-container .leaflet-control-search .search-cancel{
    right: 14px;
}

#b24-map-container .leaflet-control-search .search-alert{
    position: absolute;
    bottom: -28px;
    left: 45px;
    font-size: 14px;
}

#b24-map-container .leaflet-control-search .search-tooltip {
    margin: 0;
    width: 100%;
    background-color: unset;
    border-radius: 8px;
    padding: 0px;
    box-sizing: border-box;
    box-shadow: unset;
}

#b24-map-container .leaflet-control-search .search-tooltip .search-tip {
    margin: 0;
    margin-top: 3px;
    width: 100%;
    background-color: white;
    border-radius: 8px;
    padding: 8px;
    box-sizing: border-box;
}

/* Clusters */

#b24-map-container .marker-cluster {
    background-color: rgba(222,44,4,0.6);
}

#b24-map-container .marker-cluster div{
    background-color: rgba(222,44,4,0.6);
}

#b24-map-container .marker-cluster div span{
    font-weight: bold;
}

/* Popups */

#b24-map-container .leaflet-popup .leaflet-popup-content-wrapper {
    border-top-right-radius: 0;
}

#b24-map-container .leaflet-popup .leaflet-popup-close-button {
    top: -24px;
    background-color: #DE2C04;
    display: flex;
    justify-content: center;
    align-items: center;
}

#b24-map-container .leaflet-popup .leaflet-popup-close-button span {
    font-size: 22px;
    color: white;
}

.leaflet-popup-content strong {
    font-weight: bold !important;
}

#b24-mobile-popup .b24-mobile-close {
    display: none;
}



@media (max-width: 600px){
    #b24-map-container .leaflet-top.leaflet-left{
        width: 100%;
        box-sizing: border-box;
    }

    /* Prevent iOS Safari from zooming inputs on focus by ensuring >=16px font-size */
    #b24-map-container .leaflet-control-search input,
    #b24-map-container input,
    #b24-map-container textarea,
    #b24-map-container select {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }

    #b24-map-container .leaflet-control-search {
        box-sizing: border-box;
        width: 100%;
        margin-left: 0;
        margin-top: 0;
        border-radius: 0;
        justify-content: flex-end;
        min-width: unset;
        padding: 10px 5px;
    }

    #b24-map-container .leaflet-control-search input {
        width: 80%;
        height: max-content;
    }
    #b24-map-container .leaflet-top.leaflet-right{
        top: 70px;
    }
	
	#b24-map-container .leaflet-touch .leaflet-control-zoom-in span, 
	#b24-map-container .leaflet-touch .leaflet-control-zoom-out  span {
		margin-top: 0;
	}

    #b24-mobile-popup {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999999999999999;
        background: white;
        box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        padding: 24px;
        display: none;
        flex-direction: column;
        max-height: 50vh;
        overflow-y: auto;
        width: 100%;
        box-sizing: border-box;
        font-size: larger;
    }

    .mobile-popup-buttons {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }

    .mobile-popup-buttons .popup-route-btn {
        flex: 1;
        padding: 8px 16px;
        background: #DE2C04;
        color: #fff !important;
        border: none;
        border-radius: 10px;
        font-weight: bold;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.2s;
        /* font-size: large; */
    }

    #b24-my-location-btn {
        display: none !important;
    }

    /* Mobile popup close button - styled like desktop popup close */
    #b24-mobile-popup .b24-mobile-close {
        position: absolute;
        top: 10px;
        right: 12px;
        background-color: #DE2C04;
        color: #fff;
        border: none;
        width: 24px;
        height: 24px;
        font-size: 20px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10001;
        padding: 5px;
    }
    #b24-mobile-popup .b24-mobile-close:focus {
        outline: 2px solid #fff;
    }
}