.store-locator-goong * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.store-locator-goong-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    background: #f9f9f9;
}

.store-locator-goong-container h2 {
    padding: 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Search section */
.search-section {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
}

.search-input {
    grid-column: 1;
}

.search-button {
    grid-column: 4;
}

/* Form elements */
.search-section input, .search-section select, .search-section button {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-section input:focus, .search-section select:focus {
    outline: none;
    border-color: #e51e25;
    box-shadow: 0 0 0 2px rgba(229, 30, 37, 0.1);
}

input#searchAddress {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-section button {
    background-color: #e51e25;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    min-width: 120px;
}

button:hover {
    background-color: #c51018;
}



/* Map and list container */
.map-list-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* List container */
.list-container {
    flex: 1;
    min-width: 300px;
    max-height: 600px;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.location-count {
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

/* Location items */
.location-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-item:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
}

.location-item.active {
    background-color: #fff5f5;
    border-left: 3px solid #e51e25;
}

.location-item:last-child {
    border-bottom: none;
}

.location-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #e51e25;
    font-size: 16px;
}

.location-address, .location-hotline, .location-hours {
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.location-address::before, .location-hotline::before, .location-hours::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
}

.location-address::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>') no-repeat center;
}

.location-hotline::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>') no-repeat center;
}

.location-hours::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>') no-repeat center;
}

/* Location actions */
.location-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.view-map-btn, .google-map-btn {
    color: #e51e25;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-map-btn:hover, .google-map-btn:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Map container */
.map-container {
    flex: 2;
    min-width: 300px;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#map {
    width: 100%;
    height: 100%;
}

/* Map buttons and controls */
.map-container-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.location-btn {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.location-btn:hover {
    background-color: #f5f5f5;
}

.zoom-controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background-color: #f5f5f5;
}

.zoom-btn svg {
    width: 18px;
    height: 18px;
}

.map-container-button button {
    color: #333;
    background-color: #fff;
}

/* Map markers */

 .map-marker {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="38" viewBox="0 0 384 512"><path fill="%23e51e25" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"></path></svg>');
            width: 30px;
            height: 38px;
            cursor: pointer;
        }


.map-marker.current-location {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="38" viewBox="0 0 384 512"><path fill="%230066ff" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"></path></svg>');
}

.map-marker.highlighted {
    transform: scale(1.2);
    z-index: 10;
}

/* Nearest location section */
.nearest-location {
    margin-top: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f0f9ff;
    border-left: 3px solid #0066ff;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

.nearest-location.show {
    display: block;
}

/* Popup styling */
.mapboxgl-popup-content h3,
.goongjs-popup-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #e51e25;
}

.mapboxgl-popup-close-button, 
.goongjs-popup-close-button {
    padding: 0;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    right: 5px;
    top: 5px;
    color: #666;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mapboxgl-popup-close-button:hover,
.goongjs-popup-close-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #e51e25;
}

/* Media queries for responsive design */
@media (max-width: 992px) {
    .search-row {
        gap: 10px;
    }
    
    .location-item {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .map-list-container {
        flex-direction: column;
    }
    
    .map-container {
        order: 1;
        height: 350px;
        margin-bottom: 15px;
    }
    
    .list-container {
        order: 2;
        max-height: 500px;
    }
    
    .search-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input, .search-select, .search-button {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .store-locator-goong-container {
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .search-section {
        padding: 15px;
    }
    
    .map-container {
        height: 480px;
    }
    
    .map-container-button {
        flex-direction: column;
        gap: 8px;
        top: 10px;
        right: 10px;
    }
    
    .location-name {
        font-size: 15px;
    }
    
    .location-address, .location-hotline, .location-hours {
        font-size: 13px;
    }
}





/* Tối ưu hóa cho iPhone và iOS */

/* Kiểu dáng mặc định cho input trên iOS */
.search-section input,
.search-section select,
.search-section button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 4px;
}

/* Tắt shadow tự động và tăng sáng trên iOS */
input, 
select, 
textarea, 
button {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Ngăn chặn phóng to khi focus trên iOS */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
select {
    font-size: 16px; /* Tránh zoom tự động trên iOS */
    max-width: 100%;
}

/* Cải thiện select trên iOS */
select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23666" d="M0 0l6 6 6-6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 6px;
    padding-right: 30px; /* Khoảng trống cho icon */
}

/* Sửa vấn đề với form autocomplete trên iOS */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Tối ưu hóa search-row cho màn hình nhỏ */
@media (max-width: 768px) {
    .search-row {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: 12px;
    }
    
    .search-input,
    .search-button {
        grid-column: auto;
    }
}

/* Sửa vấn đề với padding trên iOS */
.search-section input, 
.search-section select, 
.search-section button {
    padding: 12px 15px;
    line-height: normal;
    height: auto;
}

/* Tăng kích thước vùng chạm cho các phần tử tương tác */
.location-actions a,
.view-map-btn, 
.google-map-btn,
.zoom-btn,
.location-btn {
    min-height: 44px; /* Kích thước tối thiểu cho vùng chạm trên iOS */
    display: flex;
    align-items: center;
}

/* Ngăn chặn vấn đề với input khi sử dụng keyboard trên iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .search-section {
        position: relative;
        z-index: 10;
    }
    
    /* Khắc phục vấn đề với position fixed trên iOS */
    .map-container-button {
        position: absolute;
    }
}