/* ------------------------------------------------------------
   STOCKIST LOCATOR MAIN WRAPPER
------------------------------------------------------------- */

.stockist-locator {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
}

/* ------------------------------------------------------------
   SEARCH BAR
------------------------------------------------------------- */

.stockist-locator-searchbar {
    margin-bottom: 15px;
}

.stockist-locator-form {
    margin: 0;
}

.stockist-locator-search-input-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.stockist-locator-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 15px;
    background: #fff;
}

.stockist-locator-input:focus {
    outline: none;
    border-color: #d73925;
    box-shadow: 0 0 0 1px rgba(215, 57, 37, 0.2);
}

.stockist-locator-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    background: #d73925;
    color: #fff;
    border: 1px solid #d73925;
    border-radius: 0 4px 4px 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    min-width: 110px;
}

.stockist-locator-button:hover {
    background: #b12f1f;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.stockist-locator-button-icon {
    margin-right: 6px;
}

/* ------------------------------------------------------------
   MAIN LAYOUT: SIDEBAR + MAP
------------------------------------------------------------- */

.stockist-locator-layout {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

/* Sidebar */
.stockist-locator-sidebar {
    flex: 0 0 35%;
    max-height: 540px;
    border: 1px solid #eee;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Map Wrapper */
.stockist-locator-map-wrapper {
    flex: 1;
    min-height: 540px;
    border: 1px solid #eee;
    overflow: hidden;
}

.stockist-map {
    width: 100%;
    height: 100%;
    min-height: 400px; /* ensure desktop map is visible */
}

/* ------------------------------------------------------------
   SHOPS COUNTER (RED BAR)
------------------------------------------------------------- */

.stockist-locator-count {
    background: #d73925;
    color: #fff;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 14px;
}

/* ------------------------------------------------------------
   MESSAGES ABOVE THE LIST
------------------------------------------------------------- */

.stockist-locator-message {
    padding: 8px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f1f1;
}

.stockist-error {
    color: #b32d2e;
}

.stockist-success {
    color: #2271b1;
}

.stockist-loading {
    color: #777;
}

.stockist-empty {
    color: #555;
}

/* ------------------------------------------------------------
   SIDEBAR RESULTS (SCROLLABLE LIST)
------------------------------------------------------------- */

.stockist-locator-results {
    padding: 10px 14px 12px;
    overflow-y: auto;
    flex: 1;
}

/* ------------------------------------------------------------
   STOCKIST CARD DESIGN
------------------------------------------------------------- */

.stockist-card {
    padding: 10px 10px 12px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.stockist-card:hover {
    background: #fff7f6;
}

.stockist-card:last-child {
    border-bottom: none;
}

.stockist-card-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.stockist-card-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4px;
    font-size: 13px;
}

.stockist-card-icon {
    margin-right: 6px;
    margin-top: 1px;
}

.stockist-card-text {
    flex: 1;
}

.stockist-card-link {
    font-size: 13px;
    color: #d73925;
    text-decoration: none;
}

.stockist-card-link:hover {
    text-decoration: underline;
}

/* Card Actions - (Directions only) */
.stockist-card-actions {
    margin-top: 8px;
}

.stockist-card-button {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 4px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #d73925;
    background: #d73925;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.stockist-card-button:hover {
    opacity: 0.9;
}

.stockist-card-button-secondary {
    background: #fff;
    color: #d73925;
}

/* ------------------------------------------------------------
   TOOLTIP POPUP (GOOGLE MAPS INFOWINDOW)
------------------------------------------------------------- */

.stockist-tooltip {
    font-size: 13px;
    line-height: 1.4;
    max-width: 240px;
}

.stockist-tooltip-title {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
}

.stockist-tooltip-line {
    margin: 2px 0;
}

.stockist-tooltip-distance {
    font-style: italic;
}

.stockist-tooltip-links a {
    color: #d73925;
    text-decoration: none;
    font-size: 12px;
}

.stockist-tooltip-links a:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------
   SCREEN READER LABELS
------------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ------------------------------------------------------------
   RESPONSIVE FIXES (MOBILE)
------------------------------------------------------------- */

@media (max-width: 900px) {

    .stockist-locator-layout {
        flex-direction: column;
    }

    .stockist-locator-sidebar,
    .stockist-locator-map-wrapper {
        flex: 1 1 auto;
        max-height: none;
        min-height: 320px;
    }

    .stockist-locator-sidebar {
        max-height: 320px;
    }

    .stockist-map {
        height: 320px !important;  /* FIX: map not showing on mobile */
        min-height: 320px;
    }
}
