/* ---------------------------------------------------- */
/* Global Container Styles */
/* ---------------------------------------------------- */
/* --- FIX: Icon visibility and styling --- */

/* 1. Ensure the icon container is visible */
.msl-store-icon {
    flex-shrink: 0; 
    margin-right: 15px;
    color: #cc3333; /* Use your preferred accent color */
    font-size: 1.5em; 
    /* The next rule is the most CRITICAL part of the icon fix. 
       It overrides any theme CSS that might be hiding or replacing the font icon. */
    font-family: 'FontAwesome' !important; 
    font-style: normal;
    font-weight: normal;
    text-decoration: inherit;
}

/* 2. Optional: Style the list item layout */
.msl-store-item {
    display: flex; /* Use flexbox for layout */
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    align-items: flex-start; /* Align icon and text at the top */
    transition: background-color 0.2s;
}

.msl-store-item:hover, .msl-store-item.active {
    background-color: #f7f7f7;
}

.msl-store-info {
    flex-grow: 1;
}

.msl-name {
    font-weight: bold;
}

.msl-distance {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}


#msl-container {
    display: flex;
    max-width: 1200px; /* Adjust as needed */
    margin: 20px auto;
    height: 600px; /* Fixed height for the map/sidebar area */
}

/* ---------------------------------------------------- */
/* Sidebar (List) Styles */
/* ---------------------------------------------------- */

#msl-sidebar {
    width: 350px; /* Fixed width for the sidebar */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden; /* Contains search and list */
}

#msl-search {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#msl-search-input {
    flex-grow: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-right: none;
    font-size: 1em;
}

#msl-search-button {
    background-color: #333;
    color: white;
    border: 1px solid #333;
    padding: 0 15px;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1; /* Ensure icon is vertically centered */
}

#msl-search-button i {
    color: white; /* Ensure the search icon is white */
}

#msl-store-list {
    flex-grow: 1;
    overflow-y: auto; /* Enable scrolling for the list */
    -webkit-overflow-scrolling: touch;
}

/* --- Store Item Layout & BOLD Text Fix --- */

.msl-store-item {
    display: flex;
    padding: 15px 10px; /* Appropriate gapping */
    border-bottom: 1px solid #eee;
    cursor: pointer;
    align-items: flex-start; 
    transition: background-color 0.2s;
}

.msl-store-item:hover, .msl-store-item.active {
    background-color: #f0f0f0; /* Highlight on hover/active */
}

/* --- ICON FIX (Ensures the icon is visible and placed) --- */
.msl-store-icon {
    flex-shrink: 0;
    margin-right: 15px;
    color: #cc3333; /* Red pin color */
    font-size: 1.5em; 
    padding-top: 2px; /* Slight vertical adjustment */
    /* CRITICAL: Overrides theme CSS that might interfere with Font Awesome */
    font-family: 'FontAwesome' !important; 
    font-style: normal;
    font-weight: normal;
    text-decoration: inherit;
}

.msl-store-info {
    flex-grow: 1;
}

/* --- BOLD STORE TITLE FIX --- */
.msl-store-info .msl-name {
    font-weight: 700; /* Makes the store title bold */
    font-size: 1.05em;
    line-height: 1.3;
    margin-bottom: 3px;
    color: #333;
}

.msl-store-info .msl-address {
    font-size: 0.9em;
    color: #666;
    line-height: 1.3;
}

.msl-distance {
    font-size: 0.85em;
    color: #333;
    margin-bottom: 5px;
    font-weight: bold;
}


/* ---------------------------------------------------- */
/* Map Styles */
/* ---------------------------------------------------- */

#msl-map-container {
    flex-grow: 1;
    min-width: 0; /* Important for flex-grow to work correctly */
}

#msl-map {
    width: 100%;
    height: 100%;
    /* Ensure the map is displayed correctly within the container */
}

/* Leaflet marker icon fix (if needed, usually not required with embedded CSS) */
.leaflet-container .leaflet-marker-icon {
    outline: none;
}