/**
 * Locations Map Styles
 *
 * @package    MisterMobile
 * @subpackage LocationsMap
 */


.mm-map-container-inner {
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 20px 100px;
}

/* Header Section */
.mm-locations-map-header {
    padding: 20px 20px;
    background: #FDFBF3;
    width: 100%;
}

.mm-locations-map-header-inner {
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.mm-map-container {
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-direction: column;
    box-sizing: border-box;
}

.mm-locations-map-header .mm-locations-map-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
    margin: 0;
}

/* Zone Filters */
.mm-locations-map-header .mm-locations-zone-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.mm-locations-map-header .mm-locations-filter-label {
    font-size: 14px;
    color: #000;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

.mm-locations-map-header .mm-locations-filter-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #6C757D;
    background: #fff;
    color: #000;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s;
}

.mm-locations-map-header .mm-locations-filter-btn:hover {
    border-color: #FFEB00;
    background: #fffef0;
    color: #000;
}

.mm-locations-map-header .mm-locations-filter-btn.active {
    background: #FFEB00;
    border-color: #FFEB00;
    color: #000;
}

/* Search Input */
.mm-locations-search-wrapper {
    margin-bottom: 0;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 20px;
    border-top: 1px solid #E5E5E5;
}

.mm-locations-map-header .mm-locations-search-input {
    position: relative;
    width: 100%;
}

.mm-locations-search-input i.mm-icon-search11 {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #6C757D;
    z-index: 1;
}

.mm-locations-search-input input {
    width: 100%;
    padding: 13px 185px 13px 40px;
    font-size: 15px;
    border: 1px solid #6C757D;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
    background: #fff;
    box-sizing: border-box;
}

.mm-locations-search-input input::placeholder {
    color: #6C757D;
    font-size: 14px;
    font-weight: 500;
}

.mm-locations-search-input input::-webkit-input-placeholder {
    color: #6C757D;
    font-size: 14px;
    font-weight: 500;
}

.mm-locations-search-input input::-moz-placeholder {
    color: #6C757D;
    opacity: 1;
    font-size: 14px;
    font-weight: 500;
}

.mm-locations-search-input input:-ms-input-placeholder {
    color: #6C757D;
    font-size: 14px;
    font-weight: 500;
}

.mm-locations-search-input input:focus {
    border-color: #999;
}

/* Use My Location Button */
.mm-locations-map-header .mm-use-location-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: #000;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.mm-locations-map-header.mm-use-location-btn:hover {
    background: #333;
}

/* View Mode Toggle */
.mm-view-mode-toggle-wrapper {
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.mm-view-mode-toggle-label{
    font-weight: 600;
}
.mm-view-mode-switcher {
    width: 330px;
}

/*  Toggle Switch  */
.toggleSwitch span span {
    display: none;
}  

.toggleSwitch {
    display: inline-block;
    height: 18px;
    position: relative;
    overflow: visible;
    padding: 0;
    cursor: pointer;
    width: 200px;
    width: 100%;
    background-color: #fafafa;
    border: 1px solid #ccc;
    border-radius: 50px;
    height: 34px;
}

.toggleSwitch * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.toggleSwitch label,
.toggleSwitch > span {
    line-height: 20px;
    height: 20px;
    vertical-align: middle;
}

.toggleSwitch input:focus ~ a,
.toggleSwitch input:focus + label {
    outline: none;
}

.toggleSwitch label {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
}

.toggleSwitch input {
    position: absolute;
    opacity: 0;
    z-index: 5;
}

.toggleSwitch > span {
    position: absolute;
    left: 0;
    width: calc(100% - 6px);
    margin: 0;
    text-align: left;
    white-space: nowrap;
    margin: 0 3px;
}

.toggleSwitch > span span {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    display: block;
    width: 50%;
    margin-left: 50px;
    text-align: left;
    font-size: 12px;
    width: auto;
    left: 0;
    top: -1px;
    opacity: 1;
    width: 40%;
    text-align: center;
    line-height: 34px;
}

.toggleSwitch a {
    position: absolute;
    right: 50%;
    z-index: 4;
    display: block;
    top: 3px;
    bottom: 3px;
    padding: 0;
    left: 3px;
    width: 50%;
    background-color: #FFEB00;
    border-radius: 50px;
    -webkit-transition: all 0.2s ease-out;
    -moz-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggleSwitch > span span:first-of-type {
    color: #000;
    opacity: 1;
    left: 0;
    margin: 0;
    width: 50%;
    font-weight: 700;
}

.toggleSwitch > span span:last-of-type {
    left: auto;
    right: 0;
    color: #999;
    margin: 0;
    width: 50%;
}

.toggleSwitch > span:before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: -2px;
    border-radius: 30px;
    -webkit-transition: all 0.2s ease-out;
    -moz-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
}

.toggleSwitch input:checked ~ a {
	left: 3px; /* Move it to the left when checked */
}
.toggleSwitch input:checked ~ span span:first-of-type {
	color: #000; /* Enabled label */
    font-weight: 700;
}
.toggleSwitch input:checked ~ span span:last-of-type {
	color: #999; /* Disabled label */
    font-weight: 500;
}


.toggleSwitch input:not(:checked) ~ a {
	left: calc(50% - 3px);
}
.toggleSwitch input:not(:checked) ~ span span:first-of-type {
	color: #999;
    font-weight: 500;

}
.toggleSwitch input:not(:checked) ~ span span:last-of-type {
	color: #000;
    font-weight: 700;
}

/* View Mode Content */
.mm-view-mode {
    display: none;
}

/* .mm-view-mode[data-view="listing"] {
    display: block;
} */

.mm-view-mode.active {
    display: block !important;
}

/* Content Layout */
.mm-locations-map-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Location List Container */
.mm-locations-list-container {
    overflow: hidden;
    width: 100%;
}

/* Zone Header */
.mm-zone-header {
    width: 100%;
    margin: 10px 0;
    padding: 0;
    transition: opacity 0.2s ease;
}

.mm-zone-header:first-child {
    margin-top: 0;
}

.mm-zone-header .mm-zone-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Zone Divider */
.mm-zone-divider {
    width: 100%;
    height: 1px;
    background: #E5E5E5;
    margin: 0;
    border: none;
    transition: opacity 0.2s ease;
}

/* Listing View - Two Column Grid Layout */
.mm-locations-list-container[data-view="listing"] .mm-locations-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    overflow-x: hidden;
    padding: 10px 5px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Zone headers and dividers span full width in grid */
.mm-locations-list-container[data-view="listing"] .mm-zone-header,
.mm-locations-list-container[data-view="listing"] .mm-zone-divider {
    grid-column: 1 / -1;
}

/* Map View - Horizontal Layout */
.mm-locations-map-container-inner .mm-locations-list {
    display: flex;
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px 20px;
    scroll-behavior: smooth;
    width: 100%;
    box-sizing: border-box;
}

/* Scrollbar styling - Only for map view horizontal scroll */
.mm-locations-map-container-inner .mm-locations-list::-webkit-scrollbar {
    height: 8px;
}

.mm-locations-map-container-inner .mm-locations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mm-locations-map-container-inner .mm-locations-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.mm-locations-map-container-inner .mm-locations-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}



/* Location Card */
.mm-location-card {
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.1);
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Horizontal layout for map view */
.mm-locations-map-container-inner .mm-location-card {
    flex: 0 0 320px;
    min-width: 320px;
    max-width: 320px;
    padding: 15px;
}

/* Grid layout for listing view - cards fill grid cells */
.mm-locations-list-container[data-view="listing"] .mm-location-card {
    width: 100%;
    max-width: 100%;
    flex: none;
    display: flex;
    flex-direction: row; /* Image on left, content on right */
    min-width: 0; /* Prevents grid overflow */
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
}

.mm-location-card:hover {
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.mm-location-card.active {
    border: 2px solid #FFEB00;
    background: #ffeb0030;
}

/* Image styling for listing view (horizontal cards - image on left) */
.mm-locations-list-container[data-view="listing"] .mm-location-card .mm-location-image {
    width: 200px;
    height: 100%;
    border-radius: 0;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
    margin-right: 20px;
}

.mm-locations-list-container[data-view="listing"] .mm-location-card .mm-location-icon {
    width: 18px;
   
}
.mm-location-placeholder {
    width: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Placeholder styling for map view */
.mm-locations-map-container-inner .mm-location-placeholder {
    height: 180px;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* Placeholder styling for listing view */
.mm-locations-list-container[data-view="listing"] .mm-location-placeholder {
    width: 200px;
    height: 100%;
    border-radius: 0;
    flex-shrink: 0;
    margin-right: 20px;
}

.mm-location-placeholder::before {
    content: "📱";
    font-size: 48px;
}

.mm-location-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Listing view - content should fill remaining space */
.mm-locations-list-container[data-view="listing"] .mm-location-card-content {
    padding: 15px 15px 15px 0;
}

.mm-location-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.mm-lite-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 40px;
    height: 16px;
    margin-left: 10px;
    padding: 0 8px;
    border: 1px solid #212529;
    border-radius: 4px;
    background: #ffeb00;
    color: #212529;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 10px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.mm-location-hours-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mm-location-hours-row .mm-location-hours-lines span,
.mm-info-window-hours-row .mm-location-hours-lines span {
    flex: none;
}

.mm-location-address-row,
.mm-location-hours-row,
.mm-location-distance-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.mm-location-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    object-fit: contain;
}

.mm-location-address-row i,
.mm-location-hours-row i,
.mm-location-distance-row i {
    font-size: 16px;
    color: #666;
    margin-top: 2px;
    flex-shrink: 0;
}

.mm-location-address-row span,
.mm-location-hours-row span,
.mm-location-distance-row span {
    flex: 1;
}

.mm-location-distance-row {
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.mm-location-distance-row i {
    color: #FFEB00;
}

/* Action buttons */
.mm-location-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.mm-location-actions .mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: #000;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.1;
}

.mm-location-actions .mm-btn-info {
    background: #ffeb00;
    border: 1px solid #ffeb00;
    color: #000;
}

.mm-location-actions .mm-btn-info:hover {
    /* background: #fff7a6; */
}

.mm-location-actions .mm-btn-directions {
    background: #000;
    border: 1px solid #000;
    color: #fff;
}

.mm-location-actions .mm-btn-directions:hover {
    /* background: #333;
    border-color: #333; */
    color: #fff;
}

/* Map Container */
.mm-locations-map-container-inner {
    overflow: hidden;
    width: 100%;
    flex-direction: column;
}

.mm-google-map {
    width: 100%;
    height: 600px;
    flex-shrink: 0;
}

/* Click-to-load placeholder for the single-view map. Matches .mm-google-map
   dimensions so the layout does not jump when the real map appears.
   The blurred map preview lives in ::before so the button/hint above stay sharp. */
.mm-map-placeholder {
    position: relative;
    width: 100%;
    height: 600px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f5f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mm-map-placeholder::before {
    content: "";
    position: absolute;
    inset: -20px; /* extend past edges so the blur doesn't show transparent corners */
    background-image: url('../img/location-map-preview.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(6px);
    transform: scale(1.05);
    z-index: 0;
}

.mm-map-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    z-index: 0;
}

/* Map view listing at bottom */
.mm-locations-map-container-inner .mm-locations-list {
    flex-shrink: 0;
    margin-top: 0;
}

/* Info Window Styling */
.mm-info-window {
    padding: 0;
    max-width: 320px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.mm-info-window-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.mm-info-window-placeholder {
    width: 100%;
    height: 150px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-info-window-placeholder::before {
    content: "📱";
    font-size: 48px;
}

.mm-info-window-content {
    padding: 15px;
}

.mm-info-window-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.mm-info-window h3.mm-info-window-title,
.mm-location-card h3.mm-location-title {
    display: block;
}

.mm-lite-title-end {
    display: inline;
    white-space: nowrap;
}

h3.mm-info-window-title .mm-lite-badge,
h3.mm-location-title .mm-lite-badge {
    display: inline-flex;
}

.mm-info-window-address-row,
.mm-info-window-hours-row,
.mm-info-window-distance-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.mm-info-window-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    object-fit: contain;
}

.mm-info-window-address-row span,
.mm-info-window-hours-row span,
.mm-info-window-distance-row span {
    flex: 1;
}

.mm-info-window-hours-row {
    margin-bottom: 10px;
}

.mm-info-window-distance-row {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

/* Action buttons in info window */
.mm-info-window .mm-location-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #E5E5E5;
}

.mm-info-window .mm-location-actions .mm-btn {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mm-locations-map-container-inner {
        height: auto;
    }

    .mm-location-card {
        flex: 0 0 280px;
        min-width: 280px;
        max-width: 280px;
    }

    .mm-location-card img,
    .mm-location-placeholder {
        height: 100%;
    }
}

@media (max-width: 768px) {
    
    .mm-map-container {
        gap: 15px;
    }
    
    .mm-map-container-inner {
        padding: 10px 20px;
    }

    .mm-locations-map-header .mm-locations-map-header {
        padding: 30px 15px;
    }

    .mm-locations-map-header .mm-locations-map-title {
        font-size: 16px;
    }


    .mm-locations-map-header .mm-locations-zone-filters {
        margin-bottom: 20px;
    }

    .mm-locations-map-header .mm-locations-filter-label {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }

    .mm-locations-map-header .mm-locations-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .mm-locations-search-wrapper {
        padding-top: 15px;
    }

    .mm-locations-map-header .mm-locations-search-input {
        max-width: 100%;
    }

    .mm-locations-map-header .mm-locations-search-input input {
        padding: 14px 45px 14px 40px;
        font-size: 14px;
    }


    .mm-use-location-btn {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        margin-top: 0;
        padding: 8px;
        background: transparent;
        color: #6C757D;
        border: none;
    }

    .mm-info-window-title {
        font-size: 12px;
    }

    .mm-info-window-address-row, .mm-info-window-hours-row, .mm-info-window-distance-row {
        font-size: 12px;
    }

    
    .mm-use-location-btn .mm-use-location-text {
        display: none;
    }

    .mm-use-location-btn i {
        font-size: 20px;
        display: inline-block;
        line-height: 1;
    }

    .mm-locations-map-header .mm-use-location-btn {
        background: #ffffff00;
        color: #000000;
    }

    .mm-locations-list-container[data-view="listing"] .mm-location-card .mm-location-image {
        width: 100px;
        margin-right: 12px;
    }
    .mm-locations-list-container[data-view="listing"] .mm-location-placeholder {
        width: 100px;
        margin-right: 12px;
    }

    .mm-location-address-row span, .mm-location-hours-row span, .mm-location-distance-row span {
        font-size: 12px;
    }

    .mm-locations-list-container[data-view="listing"] .mm-location-title {
        font-size: 12px;
    }

    .mm-locations-map-container-inner {
        height: auto;
    }

    .mm-google-map {
        height: 330px;
        border: 1px solid #000;
        border-top-right-radius: 8px;
        border-top-left-radius: 8px;
    }
    /* Match placeholder to mobile map height so the swap doesn't shift layout. */
    .mm-map-placeholder {
        height: 330px;
    }
    /* Single column grid on mobile for listing view */
    .mm-locations-list-container[data-view="listing"] .mm-locations-list {
        grid-template-columns: 1fr;
    }

    /* Zone header and divider on mobile */
    .mm-locations-list-container[data-view="listing"] .mm-zone-header,
    .mm-locations-list-container[data-view="listing"] .mm-zone-divider {
        grid-column: 1;
    }




    /* Map view cards on mobile */
    .mm-locations-map-container-inner .mm-location-card {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
        padding: 12px;
    }

    .mm-location-title {
        font-size: 16px;
    }

    .mm-location-address-row,
    .mm-location-hours-row,
    .mm-location-distance-row {
        font-size: 13px;
    }
    .mm-zone-header .mm-zone-title {
        font-size: 18px;
    }
}

/* Single view uses same styles as regular map view */
