/**
 * PrestaChamps Custom Store Locator Module - Frontend CSS
 *
 * Base look comes from Bootstrap utilities on the markup (templates and the
 * map-search.js builders); here lives only what utilities cannot express:
 * the two-track locations layout, brand surfaces, scrollbar/hover mechanics
 * and the Google info-window skin (its DOM is injected by Maps).
 *
 * @author    PrestaChamps
 * @copyright 2025 PrestaChamps
 * @license   Commercial License
 */

.pch-customstorelocator-wrapper {
    margin: 40px 0;
}

/* the newsletter breakout below needs the page to hide the 100vw overshoot */
#module-pch_customstorelocator-display #wrapper {
    overflow-x: hidden;
}

.pch-csl-intro-description {
    max-width: 800px;
}

/* Stockists */
.pch-csl-stockist-item {
    transition: all 0.3s ease;
}

.pch-csl-stockist-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.pch-csl-stockist-logo {
    width: 100%;
    max-width: 150px;
    max-height: 80px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

/* Locations: fixed rail + fluid map, stacking below lg (search panel first) */
.pch-csl-locations-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 670px;
}

.pch-no-results {
    padding: 16px;
    text-align: center;
    color: #fff;
    font-style: italic;
    opacity: 0.8;
}

.pch-csl-stores-list {
    max-height: 500px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.pch-csl-stores-list::-webkit-scrollbar {
    display: none;
    width: 8px;
}

.pch-csl-stores-list::-webkit-scrollbar-track {
    background: transparent;
}

.pch-csl-stores-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 2px;
}

.pch-csl-stores-list::-webkit-scrollbar-button {
    display: none;
}

.pch-csl-store-item {
    transition: all 0.2s ease;
}

.pch-csl-store-item:hover {
    border-color: var(--bs-primary-variant-1) !important;
}

/* contact list + Get Directions share markup between the dark side panel and
   the light Google info-window (map-search.js builders) — the skins differ */
.pch-csl-store-contact a {
    color: #fff;
    text-decoration: underline;
}

.pch-csl-store-contact a:hover,
.pch-csl-store-contact a:focus {
    text-decoration: none;
    color: #fff;
}

/* Reassurances: equal bands so icons/titles/texts align across columns */
.pch-csl-reassurances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.pch-csl-reassurance-icon {
    min-height: 96px;
}

.pch-csl-reassurance-icon img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
}

.pch-csl-reassurance-title {
    min-height: 2.6em;
}

/* Newsletter: full-bleed band + inputs skinned for the grey surface */
.pch-csl-newsletter {
    background: var(--bs-tertiary-variant-3);
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

/* own width constraint — the theme neutralizes nested .container in page content */
.pch-csl-newsletter-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.pch-csl-newsletter-input {
    background: transparent;
    color: #fff;
}

.pch-csl-newsletter-input:focus {
    color: #707071;
}

.pch-csl-newsletter-gdpr input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #fff;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .pch-csl-locations-wrapper {
        grid-template-columns: 1fr;
    }

    .pch-csl-search-panel {
        order: -1;
    }

    .pch-csl-stores-list {
        max-height: 300px;
    }
}

@media (max-width: 575.98px) {
    .pch-customstorelocator-wrapper {
        margin: 24px 0;
    }
}
