/**
 * PrestaChamps Custom Store Locator Module - Frontend CSS
 *
 * @author    PrestaChamps
 * @copyright 2025 PrestaChamps
 * @license   Commercial License
 */

/* Main Wrapper */
.pch-customstorelocator-wrapper {
    margin: 40px 0;
}

.pch-csl-section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* Intro Section */
.pch-csl-intro {
    padding: 40px 0;
    text-align: center;
    background-color: #f8f9fa;
}

.pch-csl-intro-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2c3e50;
}

.pch-csl-intro-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* Stockists Section */
.pch-csl-stockists {
    padding: 60px 0;
}

.pch-csl-stockists-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 32px;
}

.pch-csl-stockist-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    align-content: center;
    flex-grow: 1;
}

.pch-csl-stockist-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.pch-csl-stockist-link {
    display: block;
    text-decoration: none;
}

.pch-csl-stockist-logo {
    max-width: 150px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    width: 100%;
}

.pch-csl-stockist-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.pch-csl-locations-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    margin-top: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 670px;
}

.pch-csl-search-panel {
    background: #1e56a5;
    border-radius: 8px 0 0 8px;
    padding: 24px;
}

.pch-csl-search-box {
    margin-bottom: 24px;
    position: relative;
}

.pch-csl-search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pch-csl-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.pch-csl-search-row #pch-store-search {
    flex: 1 1 100%;
    min-width: 0;
}

.pch-csl-search-row #pch-store-radius,
.pch-csl-search-row #pch-store-search-btn {
    height: 46px;
    box-sizing: border-box;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.2;
}

.pch-csl-search-row #pch-store-radius {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 16px;
    border: 1px solid #ddd;
    background: #fff;
}

.pch-csl-search-row #pch-store-search-btn {
    flex: 0 0 auto;
    padding: 0 20px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.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: none; Firefox */
    /* -ms-overflow-style: none;  */

  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(255,255,255,0.2) transparent; /* thumb color + track */
}

.pch-csl-stores-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
  width: 8px; 
}


.pch-csl-stores-list::-webkit-scrollbar-track {
  background: transparent; /* makes track invisible */
}

.pch-csl-stores-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.75); /* translucent thumb */
  border-radius: 2px; /* smooth rounded ends */
}

.pch-csl-stores-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.8); /* brighter on hover */
}

/* Remove those ugly chevrons / arrows (Windows legacy browsers) */
.pch-csl-stores-list::-webkit-scrollbar-button {
  display: none;
}

.pch-csl-store-item {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 2px solid white;
    transition: all 0.2s ease;
}

.pch-csl-store-item:hover {
    transform: scale(0.99);
}

.pch-csl-store-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: white;
}

.pch-csl-store-address {
    font-size: 14px;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Phone / email / website lines under a store entry (dark side panel) */
.pch-csl-store-contact {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    font-size: 13px;
    line-height: 1.5;
    color: white;
}

.pch-csl-store-contact li {
    margin: 0;
    word-break: break-word;
}

.pch-csl-store-contact a {
    color: white;
    text-decoration: underline;
}

.pch-csl-store-contact a:hover,
.pch-csl-store-contact a:focus {
    text-decoration: none;
    color: white;
}

/* Get Directions button — works in both the dark side panel and (overridden
   below) the light Google info-window. */
.pch-csl-directions {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 12px;
    background: #ffffff;
    color: #1e56a5;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
}

.pch-csl-directions:hover,
.pch-csl-directions:focus {
    background: #f0f0f0;
    color: #1e56a5;
    text-decoration: none;
}


.pch-csl-map-container {
    background: #fff;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
    min-height: 300px;
}

#pch-store-map {
    width: 100%;
    height: 600px;
}

.pch-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.pch-info-window p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Contact list / Directions button restyled for the light Google info-window. */
.pch-info-window .pch-csl-store-contact {
    color: #444;
    margin-top: 8px;
    margin-bottom: 8px;
}

.pch-info-window .pch-csl-store-contact a {
    color: #1e56a5;
}

/* Remove the focus/active outline browsers add on every link inside the
   Google Maps info-window — phone, email, website, Get Directions. */
.pch-info-window a,
.pch-info-window a:hover,
.pch-info-window a:focus,
.pch-info-window a:focus-visible,
.pch-info-window a:active {
    outline: none;
    box-shadow: none;
}

.pch-info-window .pch-csl-directions {
    background: #1e56a5;
    color: #ffffff;
    margin-top: 4px;
}

.pch-info-window .pch-csl-directions:hover,
.pch-info-window .pch-csl-directions:focus {
    background: #144080;
    color: #ffffff;
}

/* Reassurances Section */
.pch-csl-reassurances {
    padding: 60px 0;
}

.pch-csl-reassurance-description {
    text-align: center;
    margin-bottom: 32px;
    color: #666;
}

.pch-csl-reassurances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.pch-csl-reassurance-item {
    text-align: center;
    padding: 24px;
    /* Make every column a flex stack so its three children (icon, title,
       description) sit in three predictable bands of the same height. */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pch-csl-reassurance-icon {
    /* Icons are at most 80px tall but can be shorter; reserving a fixed
       band and bottom-aligning the image keeps every <h4> on the same row. */
    min-height: 96px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 16px;
}

.pch-csl-reassurance-icon img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
}

.pch-csl-reassurance-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    /* Reserve enough vertical space for two-line titles so single-line
       titles in adjacent columns still line up with them. */
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pch-csl-reassurance-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .pch-csl-locations-wrapper {
        grid-template-columns: 1fr;
    }
    
    .pch-csl-search-panel {
        order: -1;
        border-radius: 8px 8px 0 0;
    }
    
    .pch-csl-stores-list {
        max-height: 300px;
    }

    .pch-csl-map-container {
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 768px) {
    .pch-csl-intro-title {
        font-size: 28px;
    }
    
    .pch-csl-section-title {
        font-size: 24px;
    }
    
    .pch-csl-reassurances-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    #pch-store-map {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .pch-customstorelocator-wrapper {
        margin: 24px 0;
    }
    
    .pch-csl-intro {
        padding: 24px 0;
    }
    
    .pch-csl-stockists,
    .pch-csl-locations,
    .pch-csl-reassurances {
        padding: 15px 0;
    }
}

.pch-csl-page-intro-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pch-csl-page-intro-wrapper .btn-primary {
    background: #1e56a5 !important;
}

#module-pch_customstorelocator-display .page-content {
    border: none;
}

.gm-ui-hover-effect:focus, .gm-ui-hover-effect:active, .gm-ui-hover-effect:hover, .gm-ui-hover-effect:focus-visible {
    outline: none;
}

h1, h2, h3 {
    color: #1e56a5;
    text-transform: capitalize;
}

#locations .text-black {
    color: black;
    text-align: center;
}

/* Newsletter Section */
.pch-csl-newsletter {
    background-color: #707071;
    padding: 60px 0;
    margin: 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.pch-csl-newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.pch-csl-newsletter-left {
    text-align: left;
}

.pch-csl-newsletter-right {
    display: flex;
    flex-direction: column;
}

.pch-csl-newsletter .pch-csl-section-title {
    margin-bottom: 12px;
    text-align: left;
    color: white;
}

.pch-csl-newsletter .pch-csl-section-description {
    margin-bottom: 0;
    color: white;
    font-size: 16px;
    text-align: left;
}

.pch-csl-newsletter-form {
    margin-top: 0;
}

.pch-csl-newsletter-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pch-csl-newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 16px;
    background: transparent;
}

.pch-csl-newsletter-submit {
    padding: 12px 16px;
    background-color: white !important;
    color: black !important;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.pch-csl-newsletter-submit:hover {
    background-color: #164280;
}

.pch-csl-newsletter-gdpr {
    text-align: left;
}

.pch-csl-newsletter-gdpr label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: white;
    cursor: pointer;
}

.pch-csl-newsletter-gdpr input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: white;
}

@media (max-width: 992px) {
    .pch-csl-newsletter-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pch-csl-newsletter-left {
        text-align: center;
    }
    
    .pch-csl-newsletter .pch-csl-section-title,
    .pch-csl-newsletter .pch-csl-section-description {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .pch-csl-newsletter {
        padding: 40px 0;
    }
    
    .pch-csl-newsletter-content {
        padding: 0 16px;
    }
    
    .pch-csl-newsletter-input-wrapper {
        flex-direction: column;
    }
    
    .pch-csl-newsletter-submit {
        width: 100%;
    }
}

#module-pch_customstorelocator-display #wrapper {
    overflow-x: hidden;
}

.stockist-grid-item {
    display: flex;
    flex-direction: column;
}

.pch-csl-newsletter-input {
    color: white
}

.pch-csl-newsletter-input:focus {
    color: #707071;
}