:root {
    --primary-color: var(--slc-primary-color, #205295);
    --font-family: var(--slc-font-family, 'Poppins, sans-serif');
    --text-color: var(--slc-text-color, #000000);
    --icon-color: var(--slc-icon-color, #000000);
}

.store-locator-codezora {
    font-family: var(--font-family);
    display: flex;
    flex-wrap: nowrap;
    height: var(--map-height, 100vh);
    overflow: hidden;
    color: var(--text-color);
}

.store-locator-codezora * {
    box-sizing: border-box;
}

.map-container {
    flex: 2;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    position: relative !important;
    z-index: 0 !important;
}

.leaflet-container {
    touch-action: auto !important;
}

.sidebar {
    width: 30%;
    background: var(--sidebar-bg-color, #ffffff);
    border-right: 1px solid #ddd;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
}

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.search-wrapper {
    display: flex;
    gap: 5px;
}

.search-wrapper input {
    flex-grow: 1;
}

.search-btn {
    background-color: var(--primary-color) !important;
    color: white;
    width: 45px;
    padding: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 2px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-suggestions li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #333;
}

.search-suggestions li:last-child {
    border-bottom: none;
}

.search-suggestions li:hover {
    background-color: #f9f9f9;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.filter-bar button {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
}

.filter-bar button:hover {
    opacity: 0.9;
}

.store-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.store-item {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    transition: background 0.3s;
    position: relative;
}

.store-item:hover {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.store-item.active {
    background-color: #f0f0f0;
}

.store-item h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color);
}

.store-item p {
    margin: 5px 0;
    font-size: 13px;
    color: var(--text-color);
}

.store-item a {
    color: var(--text-color);
    text-decoration: none;
}

.store-item a:hover {
    text-decoration: underline;
}

.store-meta i,
.copy-address i {
    color: var(--icon-color);
    width: 16px;
    text-align: center;
    margin-right: 5px;
}

.store-distance {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.copy-address {
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
    display: inline-block;
}

.map-popup-links {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

.map-popup-links a {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.map-popup-links a:hover {
    text-decoration: none !important;
}

.custom-marker-icon svg,
.user-marker-icon svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .store-locator-codezora {
        flex-direction: column-reverse;
        height: 100vh;
        /* Strict viewport height */
    }

    .map-container {
        height: 60%;
        flex: none;
        /* Disable flex-grow */
        width: 100%;
    }

    .sidebar {
        width: 100%;
        height: 40%;
        border-right: none;
        border-top: 1px solid #ddd;
        display: flex;
        flex-direction: column;
    }

    .store-list {
        overflow-y: auto;
        /* Scroll inside list */
        flex-grow: 1;
    }

    .filter-bar {
        flex-shrink: 0;
    }

    .store-item {
        font-size: 13px;
        padding: 12px;
    }

    .store-item h4 {
        font-size: 15px;
    }
}

.search-wrapper {
    border-bottom: none !important;
    /* Explicitly remove any bottom border */
    box-shadow: none !important;
    text-decoration: none !important;
}

.filter-bar {
    border: none !important;
    box-shadow: none !important;
}

/* Remove default appearance for search input to avoid underlines on mobile */
.search-wrapper input {
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
    border-bottom: 1px solid #ccc !important;
    /* Keep input border but ensure no extra underline */
    border: 1px solid #ccc !important;
    /* Ensure full border for input */
}