/* Frontend styles for Location Mapper */

/* General styles */
.location-mapper-map {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Apply grayscale filter only if the class is added */
#location-mapper-map-container.grayscale-theme {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
}



.location-mapper-map .ol-attribution{
display:none;
}

.location-mapper-map #location-mapper-map-container {
    flex: 1;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.location-mapper-map #location-mapper-locations-list {
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.location-mapper-map #location-mapper-locations-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.location-mapper-map #location-mapper-locations-list ul li {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* Closest location widget */
.location-mapper-closest {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fefefe;
}

.location-mapper-closest h3 {
    margin: 0 0 10px;
}

.location-mapper-closest button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    font-size: 14px;
    color: #fff;
    background-color: #007cba;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.location-mapper-closest button:hover {
    background-color: #005a8f;
}

/* Popup styles */
#location-mapper-popup {
    position: absolute;
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    pointer-events: none;
}


#locationmapper-dropdown {
    position: relative;
    display: inline-block;
}

#locationmapper-dropdown .dropdown-heading{
    padding: 7px 0;
    display: block;
}


#locationmapper-dropdown  .shop-address {
min-width:300px;
padding: 7px 0;
    display: block;
}


#locationmapper-dropdown .dropdown-header {
    cursor: pointer;
    font-weight: bold;
    color: #333;
    align-items: center;
    padding: 5px 0px;
    right: 0px;
    min-width: 325px;
   text-align:right;

}

#locationmapper-dropdown .dropdown-header .storetext {
    margin-right: 5px;
}

#locationmapper-dropdown .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 250px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 10px;
    z-index: 9999; /* Ensures dropdown is above other elements */
}

#locationmapper-dropdown .dropdown-content .dropdowntext {
    text-align: center;
}



#locationmapper-dropdown:hover .dropdown-content {
    display: block;
}

.view-all-link {
    font-size:14px;
    margin-top:10px;
    width:100%;
    display:block;
}


@media (max-width: 768px) {
    /* Change the container to stack vertically */
    .location-mapper-map {
        display: block;
    }

    /* Adjust the map container for mobile */
    #location-mapper-map-container {
        height: 300px; /* Reduce height for smaller screens */
        margin-bottom: 20px; /* Add spacing between map and list */
    }

    /* Make the locations list full height on mobile */
    #location-mapper-locations-list {
        max-height: none; /* Remove height restriction */
        overflow-y: visible; /* Display all items without scrolling */
        height: auto; /* Ensure full height */
    }
}



.location-mapper-popup {
    font-family: Arial, sans-serif;
    color: #333;
    max-width: 400px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.location-mapper-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.location-mapper-popup .popup-title {
    font-size: 16px;
    font-weight: bold;
}

.location-mapper-popup .popup-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

.location-mapper-popup .popup-close-btn:hover {
    color: #ff0000;
}

.location-mapper-popup .popup-body {
    margin: 10px 0;
    font-size: 14px;
}

.location-mapper-popup .popup-footer {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.location-mapper-popup .popup-btn {
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight:bold;
}

.location-search-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


.location-mapper-popup .popup-call-btn {
    background-color: #ffa500;
    color: white;
}

.location-mapper-popup .popup-call-btn:hover {
    background-color: #e69500;
}

.location-mapper-popup .popup-default-btn {
    background-color: #007bff;
    color: white;
}

.location-mapper-popup .popup-default-btn:hover {
    background-color: #0056b3;
}




/* General Button Styling */
#locationmapper-dropdown .dropdownbuttons,
#location-mapper-map-container .popup-btn,
#location-list .set-as-default,#location-list .call-button,
#location-list .email-button,#location-list .show-on-map {
    text-decoration: none;
    display: inline-block;
    margin: 5px 0px 5px 2px;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border: none;
    background-color: var(--lm-button-bg, #007bff); /* Default Blue */
    color: var(--lm-button-color, #fff); /* Default White */
}

/* Button Hover */
#locationmapper-dropdown .dropdownbuttons:hover,
#location-mapper-map-container .popup-btn:hover,
#location-list .set-as-default:hover ,#location-list .call-button:hover,
#location-list .email-button:hover,#location-list .show-on-map:hover {
    background-color: var(--lm-button-bg-hover, #0056b3); /* Default Dark Blue */
    color: var(--lm-button-color-hover, #fff); /* Default White */
}
