@charset "utf-8";
/* ============================================
   Pure Irish Ice - Store Locator Styles
   Google Maps Version - New Layout
   /css/stockists.css
   ============================================ */

/* Main Container */
#stockists {
    padding-bottom: 3em;
}

/* ============================================
   Retailer Logos Section
   ============================================ */
#retailerLogos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5em;
    padding: 1.5em 0;
    margin-bottom: 1.5em;
    flex-wrap: wrap;
}

.retailer-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #FFF;
    border: 3px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

/* Individual retailer border colours */
.retailer-logo:nth-child(1) { border-color: #8B1D41; } /* SuperValu - maroon */
.retailer-logo:nth-child(2) { border-color: #00A19A; } /* Centra - teal */
.retailer-logo:nth-child(3) { border-color: #1C3C6C; border-color:#EE8505; } /* Aldi - blue - orange */
.retailer-logo:nth-child(4) { border-color: #FFF000; } /* Lidl - yellow */
.retailer-logo:nth-child(5) { border-color: #E31837; } /* Spar - red */
.retailer-logo:nth-child(6) { border-color: #6CB33F; } /* Londis - green */
.retailer-logo:nth-child(7) { border-color: #100062; } /* ViVO - blue */

.retailer-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================================
   Search Section
   ============================================ */
#stockistSearch {
    background: #FFF;
    border-radius: 7px;
    padding: 1em;
	box-shadow:0 1px 15px #DBDBEA;
    margin-bottom: 1.5em;
}

/* Search Bar Row */
.search-bar-row {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-input-wrap input[type="text"] {
    width: 100%;
    padding: 0.7em 2.5em 0.7em 1em;
    font-size: 1.05em;
    border: 1px solid #CACAD9;
    border-radius: 5px;
    background: #FFF;
    color: #000;
}

.search-input-wrap input[type="text"]:focus {
    outline: none;
    border-color: #0086B9;
}

/* Clear Search Button */
.btn-clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.btn-clear-search:hover {
    background: #EEE !important;
    color: #333;
}

/* Icon Buttons (Location, Filter) */
.btn-icon {
    width: 42px;
    height: 42px;
	padding:0;
    background: #0086B9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #006d96 !important;
}

.btn-icon.active {
    background: #005577;
}

.btn-icon svg {
    display: block;
	width:24px;
}

/* View Toggle (Map/List) */
.view-toggle {
    display: flex;
    /*border: 1px solid #C1CFDB;
    border-radius: 5px;
    overflow: hidden;*/
}

/*.btn-toggle {
}*/

.btn-toggle:first-child {
	display:none;
}

/* ============================================
   Filter Panel (hidden by default)
   ============================================ */
.filter-panel {
    display: none;
    padding-top: 1em;
    margin-top: 1em;
    border-top: 1px dashed #C1CFDB;
}

.filter-panel.open {
    display: block;
}

.filter-fields {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

.filter-field {
    flex: 1;
    min-width: 180px;
}

.filter-field label {
    display: block;
    font-size: 0.85em;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.3em;
}

.filter-field select {
    width: 100%;
    padding: 0.6em 0.8em;
    font-size: 1em;
    border: 1px solid #CACAD9;
    border-radius: 5px;
    background: #FFF;
    color: #000;
    cursor: pointer;
}

.filter-field select:focus {
    outline: none;
    border-color: #0086B9;
}

/* ============================================
   Search Dropdown
   ============================================ */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFF;
    border: 1px solid #CACAD9;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
}

.search-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    padding: 0.8em 1em;
    cursor: pointer;
    border-bottom: 1px solid #EEE;
    transition: background 0.15s ease;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: #F0F7FA;
}

.search-dropdown-icon {
    flex-shrink: 0;
    font-size: 1em;
    line-height: 1.4;
}

.search-dropdown-text {
    font-size: 0.9em;
    color: #333;
    line-height: 1.4;
    word-break: break-word;
}

.search-dropdown-item:hover .search-dropdown-text {
    color: #0086B9;
}

/* ============================================
   Results Section
   ============================================ */
#stockistResults {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5em;
    min-height: 500px;
}

#stockistResults.map-only {
    grid-template-columns: 1fr;
}

#stockistResults.map-only #stockistListWrap {
    display: none;
}

#stockistResults.list-only {
    grid-template-columns: 1fr;
}

#stockistResults.list-only #stockistMapWrap {
    display: none;
}

/* Map Container */
#stockistMapWrap {
    background: #E8EEEF;
    border: 1px solid #C1CFDB;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
}

#stockistMap {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Store List */
#stockistListWrap {
    background: #FFF;
    border: 1px solid #C1CFDB;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.store-list-header {
    padding: 1em 1.2em;
    border-bottom: 1px solid #E5E5E5;
}

.store-list-header h3 {
    font-family: 'Young Serif', "Times New Roman", Times, serif;
    font-size: 1.3em;
    color: #000;
    margin: 0;
    padding: 0;
}

.store-list-header h3 #storeCount {
    font-family: Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.7em;
    font-weight: 400;
    color: #666;
}

#stockistList {
    flex: 1;
    overflow-y: auto;
    padding: 0.8em;
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

/* Individual Store Card */
.store-card {
    background: #F8FAFB;
    border: 1px solid #E0E5E7;
    border-radius: 6px;
    padding: 0.9em 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.store-card:hover {
    background: #EDF2F4;
    border-color: #0086B9;
}

.store-card.active {
    background: #E3F4FC;
    border-color: #0086B9;
}

.store-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    margin-bottom: 0.4em;
}

.store-card-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    flex-shrink: 0;
    margin-top: 4px;
}

.store-card-name {
    font-weight: 600;
    font-size: 1em;
    color: #222;
    line-height: 1.3;
}

.store-card-chain {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.3em;
}

.store-card-address {
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
}

.store-card-distance {
    font-size: 0.85em;
    color: #0086B9;
    font-weight: 500;
    margin-top: 0.3em;
}

/* ============================================
   Map Popup Styles - New Design with Image
   ============================================ */
.gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
}

/* Remove default close button padding */
.gm-style-iw-chr {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
}

.gm-style-iw-chr button {
    background: rgba(255,255,255,0.9) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
/* Hide default Google Maps close icon */
.gm-style-iw-chr button span {
    background: none !important;
}

.gm-style-iw-chr button span::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-color: #333;
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v24H0z%22/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22/%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M0%200h24v24H0z%22/%3E%3C/svg%3E");
}

.map-popup {
    min-width: 260px;
    max-width: 300px;
    overflow: hidden;
}

/* Store Image */
.map-popup-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #E8EEEF;
}

/* Content area */
.map-popup-content {
    padding: 1.2em 16px;
}

.map-popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-bottom: 0.75em;
}
.map-popup-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.map-popup-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    margin-bottom: 0.5em;
}
.map-popup-phone-icon,
.map-popup-marker {
    width: 16px;
    flex-shrink: 0;
}
.map-popup-marker {
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    margin-top: 2px;
}

.map-popup-name {
	text-align: left;
    font-weight: 600;
    font-size: 1.1em;
    color: #222;
    line-height: 1.3;
}

.map-popup-address {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.5em;
    text-align: left;
    margin-left:2em;
}

.map-popup-phone {
    font-size: 0.95em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.map-popup-phone-icon {
    font-size: 1.1em;
}

/* Get Directions Button */
.map-popup-directions-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #0086B9;
    color: #FFF;
    text-align: center;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    transition: background 0.2s ease;
}
.map-popup-directions-btn:hover {
    background: #006d96;
    color: #FFF;
}
/* Popup tail/arrow - match Get Directions button colour */
.gm-style .gm-style-iw-tc::after {
    background: #0086B9 !important;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 2em 1em;
    color: #666;
}

.no-results-icon {
    font-size: 2.5em;
    margin-bottom: 0.3em;
    opacity: 0.5;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media only screen and (max-width: 1024px) {
    #stockistResults {
        grid-template-columns: 1fr 280px;
    }
    
    .retailer-logo {
        width: 70px;
        height: 70px;
    }
}

@media only screen and (max-width: 900px) {
    /* On tablet/mobile, toggle controls map vs list view */
    #stockistResults {
        grid-template-columns: 1fr;
    }
    
    /* Show map button on mobile for view toggle */
    .btn-toggle:first-child {
        display: flex;
    }
    
    #stockistResults #stockistListWrap {
        display: none;
    }
    
    #stockistResults.list-only #stockistMapWrap {
        display: none;
    }
    
    #stockistResults.list-only #stockistListWrap {
        display: flex;
        max-height: none;
    }
    
    #stockistListWrap {
        max-height: none;
    }
    
    #stockistList {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1em;
    }
    
    .retailer-logo {
        width: 65px;
        height: 65px;
    }
    
    #retailerLogos {
        gap: 1em;
    }
}

@media only screen and (max-width: 768px) {
    .search-bar-row {
        flex-wrap: wrap;
    }
    
    .search-input-wrap {
        width: 100%;
        flex: none;
        margin-bottom: 0.5em;
    }
    
    .search-bar-row .btn {
        flex: 1;
    }
    
    .filter-field {
        min-width: 100%;
    }
    
    .retailer-logo {
        width: 55px;
        height: 55px;
        padding: 8px;
    }
    
    #retailerLogos {
        gap: 0.8em;
    }
}

@media only screen and (max-width: 600px) {
    #stockists {
        padding-bottom: 2em;
    }
    
    #stockistMapWrap {
        min-height: 400px;
        border-radius: 6px;
    }
    
    #stockistMap {
        min-height: 400px;
    }
    
    #stockistList {
        grid-template-columns: 1fr;
    }
    
    .retailer-logo {
        width: 50px;
        height: 50px;
        padding: 6px;
        border-width: 2px;
    }
}

@media only screen and (max-width: 450px) {
    #stockistMapWrap {
        min-height: 350px;
    }
    
    #stockistMap {
        min-height: 350px;
    }
    
    .search-bar-row .btn {
        padding: 0.6em 1em;
    }
    
    .btn-icon {
        width: 38px;
        height: 38px;
    }
    
    .btn-toggle {
        width: 38px;
        height: 38px;
    }
    
    .retailer-logo {
        width: 45px;
        height: 45px;
    }
}