.jx-store-locator-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.jx-store-map {
    box-sizing: border-box;
    min-width: 0; /* Prevents flex item from overflowing */
}

.jx-store-sidebar {
    box-sizing: border-box;
    min-width: 0; /* Prevents flex item from overflowing */
}

.jx-store-search {
    width: 100%;
    border: 1px solid #ddd;
    box-sizing: border-box;
    padding: 5px 10px !important;
    margin: 0 !important;
    height: 40px !important;
}

.jx-store-search-wrapper {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
}

.jx-store-locator-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
    box-sizing: border-box;
}

/* Dynamic styles using CSS variables - applied via inline styles in default.php */
.jx-store-locator-wrapper.jx-reverse {
    flex-direction: row-reverse;
}

/* Google Maps Info Window Styling */
.jx-store-map .gm-style-iw {
    padding: 0 !important;
    margin: 0 !important;
}

.jx-store-map .gm-style-iw-c {
    padding: 0 !important;
    padding-top: 0 !important;
    max-width: 300px !important;
}

.jx-store-map .gm-style-iw-chr {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    position: relative !important;
}

.jx-store-map .gm-style-iw-ch {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

.jx-store-map .gm-style-iw-d {
    padding: 10px 15px !important;
    margin: 0 !important;
    margin-top: 0 !important;
    overflow: visible !important;
}

.jx-store-map .gm-style-iw-d > div {
    margin: 0 !important;
    padding: 0 !important;
}

.jx-store-map .gm-style-iw-d h2 {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
}

.jx-store-map .gm-ui-hover-effect {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    width: 32px !important;
    height: 32px !important;
    z-index: 1 !important;
}

.jx-store-map .gm-ui-hover-effect span {
    margin: 4px !important;
    width: 24px !important;
    height: 24px !important;
}

/* Get Directions Button */
.jx-store-map .gm-style-iw-d .jx-directions-link {
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid #e0e0e0 !important;
}

.jx-store-map .gm-style-iw-d .jx-get-directions-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4285f4;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.jx-store-map .gm-style-iw-d .jx-get-directions-btn:hover {
    background-color: #357ae8;
    text-decoration: none;
    color: #ffffff !important;
}

.jx-store-map .gm-style-iw-d .jx-get-directions-btn:active {
    background-color: #2a5fcc;
}

/* Phone number */
.jx-store-map .gm-style-iw-d .jx-store-phone {
    margin-top: 8px !important;
}

.jx-store-map .gm-style-iw-d .jx-store-phone a {
    color: #4285f4;
    text-decoration: none;
}

.jx-store-map .gm-style-iw-d .jx-store-phone a:hover {
    text-decoration: underline;
}

.jx-store-sidebar .jx-sidebar-phone {
    font-size: 12px;
    opacity: 0.9;
}

/*
 * Responsive Map Height & padding-bottom defaults below.
 * The module outputs per-instance overrides on #jx-store-map-{moduleId}
 * from Site → Modules → Easy Store Locator → "Responsive Map Height" (v2.0+).
 */
/* Tablet and below */
@media screen and (max-width: 1024px) {
    .jx-store-sidebar {
        height: auto !important;
        width: 100% !important;
        max-height: 400px;
        order: 2;
    }

    .jx-store-locator-wrapper {
        flex-direction: column;
        height: auto !important;
    }

    .jx-store-map {
        width: 100% !important;
        height: auto !important;
        min-height: 300px;
        position: relative;
        padding-bottom: 75%; /* This is the aspect ratio */
        overflow: hidden;
        order: 1;
    }
}

/* Mobile devices */
@media screen and (max-width: 768px) {
    .jx-store-map {
        padding-bottom: 56.25%; /* 16:9 aspect ratio for mobile */
        min-height: 250px;
    }

    .jx-store-sidebar {
        max-height: 300px;
    }

    .jx-store-search-wrapper {
        padding: 8px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .jx-store-map {
        padding-bottom: 100%; /* Square aspect ratio for very small screens */
        min-height: 200px;
    }

    .jx-store-sidebar {
        max-height: 250px;
    }
}