/**
 * Styles d'intégration pour le widget ResellerLocator avec le plugin store-locator
 */

/* Compatibilité des classes entre le widget et le plugin */
.coqpit-reseller-locator.store-locator {
    --rl-primary-color: #0370C1;
    --rl-primary-color-light: red;
    --rl-primary-color-hover: rgba(3, 112, 193, 0.8);
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.coqpit-reseller-locator__container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    column-gap: 10px;
}

.coqpit-reseller-locator__left {
    flex: 1;
    min-width: 400px;
    background-color: white;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
    width: 100%;
    margin: 10px;
    border-radius: 15px;
}

.coqpit-reseller-locator__right {
    flex: 3;
    min-width: 300px;
}

/* Filtres de catégorie */
.coqpit-reseller-locator__filters-title {
    color: rgba(60, 60, 60, 0.70);
    font-family: "Figtree", sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding-top: 30px;
    padding-bottom: 15px;
}

.coqpit-reseller-locator__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.coqpit-reseller-locator__subfilters {
    margin-top: 0;
    border-top: 1px solid #3333331A;
    padding-top: 15px;
}

.coqpit-reseller-locator__subfilters .subcategory-select {
    width: 100%;
    max-width: 300px;
    padding: 6px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    color: #4C565CCC;
    cursor: pointer;
    font-family: "Figtree", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    outline: none;
    transition: all 0.3s ease;
}

.coqpit-reseller-locator__subfilters .subcategory-select:hover,
.coqpit-reseller-locator__subfilters .subcategory-select:focus {
    border-color: var(--rl-primary-color);
}

.coqpit-reseller-locator__filters .filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    color: #4C565CCC;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    font-family: "Figtree", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.coqpit-reseller-locator__filters .filter-btn .filter-marker-icon {
    flex-shrink: 0;
}

.coqpit-reseller-locator__filters .filter-btn.active {
    color: white !important;
}

.coqpit-reseller-locator__filters .filter-btn.active .filter-marker-icon path {
    fill: white;
}

.coqpit-reseller-locator__filters .filter-btn[data-category="all"].active {
    background-color: #0370C1 !important;
    border-color: #0370C1 !important;
}

.coqpit-reseller-locator__filters .filter-btn-child {
    font-size: 9px;
    padding: 4px 6px;
    opacity: 0.9;
}

/* Structure principale */
.coqpit-reseller-locator.store-locator .sidebar {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.coqpit-reseller-locator.store-locator .map-container {
    width: 100%;
    height: 712px;
}

.coqpit-reseller-locator.store-locator .map {
    width: 100%;
    height: 100%;
}

/* Recherche */
.coqpit-reseller-locator.store-locator .search {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    position: relative;
}

.coqpit-reseller-locator.store-locator .search .input {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.coqpit-reseller-locator.store-locator .search input[type="text"] {
    width: 100%;
    padding-left: 70px;
    height: 50px;
    border-radius: 7px;
    font-size: 16px;
    background-color: #F8F8F8;
    border: none;
}

.coqpit-reseller-locator.store-locator .search input[type="text"]::placeholder {
    color: rgba(76, 86, 92, 0.70);
    font-family: "Figtree", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}




.coqpit-reseller-locator.store-locator .search .search-button {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--rl-primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coqpit-reseller-locator.store-locator .search .search-button:hover {
    background-color: var(--rl-primary-color-hover);
}

.coqpit-reseller-locator.store-locator .search .search-button svg {
    width: 16px;
    height: 16px;
}

.coqpit-reseller-locator.store-locator .search-loader {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.coqpit-reseller-locator.store-locator .search-loader.active {
    display: block;
}

/* Liste des magasins */
.coqpit-reseller-locator.store-locator .stores {
    max-height: 600px;
    overflow-y: auto;
    padding: 0;
}

.coqpit-reseller-locator.store-locator .store {
    position: relative;
    padding: 20px;
    border-bottom: 1px solid rgba(102, 167, 146, 0.15);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.coqpit-reseller-locator.store-locator .store:hover {
    background-color: rgba(102, 167, 146, 0.05);
}

/* Style pour les revendeurs qui correspondent au code postal recherché */
.coqpit-reseller-locator.store-locator .store.postal-code-match {
    background-color: rgba(102, 167, 146, 0.1);
    border-left: 4px solid #66A792;
}

.coqpit-reseller-locator.store-locator .store:last-child {
    border-bottom: none;
}

.coqpit-reseller-locator.store-locator .store-data {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.coqpit-reseller-locator.store-locator .store-data__left {
    flex: 0 0 auto;
}

.coqpit-reseller-locator.store-locator .coqpit-reseller-locator__reseller-image {
    width: 120px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.coqpit-reseller-locator.store-locator .coqpit-reseller-locator__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coqpit-reseller-locator.store-locator .coqpit-reseller-locator__placeholder {
    width: 100%;
    height: 100%;
    background-color: #0370C1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coqpit-reseller-locator.store-locator .store-data__right {
    flex: 1;
}

.coqpit-reseller-locator.store-locator .store-data__right .categorie {
    max-width: fit-content;
    color: #4C565C;
    font-family: "Figtree", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 12px;
    padding: 4px 9px;
    border-radius: 20px;
    margin-bottom: 7px;
}

.coqpit-reseller-locator.store-locator .distance {
    position: absolute;
    top: 10px;
    right: 20px;
    font-weight: 600;
    color: var(--rl-primary-color);
}

.coqpit-reseller-locator.store-locator .name h4 {
    margin: 0 0 10px;
    font-weight: 600;
    color: #333;
    font-family: "katarine-web", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.coqpit-reseller-locator.store-locator .address {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.coqpit-reseller-locator.store-locator .store-links {
    display: flex;
    gap: 9px;
    margin-top: 15px;
}

.coqpit-reseller-locator.store-locator .store-link {
    display: inline-flex;
    align-items: center;
    text-decoration: underline;
    text-transform: uppercase;
    color: var(--rl-primary-color);
    margin-right: 15px;
    transition: opacity 0.3s ease;
    font-family: "Alexandria", sans-serif;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
}

.coqpit-reseller-locator.store-locator .store-link--website {
    color: var(--rl-primary-color);
    ;
}

.coqpit-reseller-locator.store-locator .store-link--email {
    color: var(--rl-primary-color);
    ;
}

.coqpit-reseller-locator.store-locator .store-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Navigation et actions */
.coqpit-reseller-locator.store-locator .navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.coqpit-reseller-locator.store-locator .navigation a,
.coqpit-reseller-locator.store-locator .navigation button {
    padding: 8px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coqpit-reseller-locator.store-locator .navigation a:hover,
.coqpit-reseller-locator.store-locator .navigation button:hover {
    background-color: var(--rl-primary-color-light);
    border-color: var(--rl-primary-color);
    color: var(--rl-primary-color);
}

.coqpit-reseller-locator__resellers-list {
    padding: 0;
    list-style: none;
}


/* Marqueurs sur la carte */
.user-marker {
    z-index: 2;
}

.store-marker {
    cursor: pointer;
    z-index: 1;
    transition: transform 0.3s ease;
}

/* Style pour les marqueurs correspondants au code postal */
.store-marker.matching-marker {
    transform: scale(1.2);
    z-index: 2;
}

/* Titre de la section */
.coqpit-reseller-locator__title {
    padding: 20px;
    background-color: #f7f7f7;
}

.coqpit-reseller-locator__title h3 {
    margin: 0;
    font-family: "katarine-web", sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--rl-primary-color);
}

/* Styles pour la popup */
.coqpit-reseller-popup {
    font-family: inherit;
    padding: 15px;
    max-width: 360px;
    color: #333;
}

/* Appliquer les mêmes styles que pour les éléments de liste */
.coqpit-reseller-popup .store-data {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.coqpit-reseller-popup .store-data__left {
    flex: 0 0 auto;
}

.coqpit-reseller-popup .store-data__right {
    flex: 1;
}

.coqpit-reseller-popup .coqpit-reseller-locator__reseller-image {
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.coqpit-reseller-popup .coqpit-reseller-locator__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coqpit-reseller-popup .coqpit-reseller-locator__placeholder {
    width: 100%;
    height: 100%;
    background-color: #0370C1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coqpit-reseller-popup .name h4 {
    margin: 0 0 10px;
    font-weight: 600;
    color: #0370C1;
    font-family: "katarine-web", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.coqpit-reseller-popup .address {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.coqpit-reseller-popup .store-links {
    display: flex;
    gap: 9px;
    margin-top: 15px;
}

.coqpit-reseller-popup .store-link {
    display: inline-flex;
    align-items: center;
    text-decoration: underline;
    text-transform: uppercase;
    color: var(--rl-primary-color);
    margin-right: 15px;
    transition: opacity 0.3s ease;
    font-family: "Alexandria", sans-serif;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
}

.coqpit-reseller-popup .store-link--website {
    color: var(--rl-primary-color);
}

.coqpit-reseller-popup .store-link--email {
    color: var(--rl-primary-color);
}

.coqpit-reseller-popup .store-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.coqpit-reseller-popup .navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.coqpit-reseller-popup .navigation a {
    padding: 8px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coqpit-reseller-popup .navigation a:hover {
    background-color: var(--rl-primary-color-light);
    border-color: var(--rl-primary-color);
    color: var(--rl-primary-color);
}

/* Styles pour la popup Mapbox */
.mapboxgl-popup {
    z-index: 10;
    max-width: 450px !important;
}

.mapboxgl-popup-content {
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid rgba(13, 106, 110, 0.1);
}

.mapboxgl-popup-close-button {
    font-size: 16px;
    color: #666;
    padding: 5px;
    right: 5px;
    top: 5px;
}

.mapboxgl-popup-close-button:hover {
    background: none;
    color: #333;
}

/* Responsive */
@media (max-width: 1024px) {
    .coqpit-reseller-locator__container {
        flex-direction: column;
    }

    .coqpit-reseller-locator__left,
    .coqpit-reseller-locator__right {
        width: 100%;
        flex: none;
    }

    .coqpit-reseller-locator.store-locator .map-container {
        height: 600px;
        order: 1;
    }

    .coqpit-reseller-locator__left {
        order: 2;
    }

    .coqpit-reseller-locator.store-locator .stores {
        max-height: none;
        height: auto;
    }
}

@media (max-width: 768px) {
    .coqpit-reseller-locator.store-locator .map-container {
        height: 600px;
    }

    .coqpit-reseller-locator.store-locator .search {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .coqpit-reseller-locator.store-locator .search label {
        margin-bottom: 10px;
    }

    .coqpit-reseller-locator.store-locator .navigation {
        flex-direction: column;
    }

    .coqpit-reseller-locator.store-locator .store {
        padding: 20px 15px;
    }

    .coqpit-reseller-locator.store-locator .store-data {
        flex-direction: column;
        gap: 15px;
    }



    .coqpit-reseller-locator.store-locator .store-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .coqpit-reseller-locator.store-locator .map-container {
        height: 300px;
    }

    .mapboxgl-popup {
        max-width: 280px !important;
    }

    .coqpit-reseller-popup .store-data {
        flex-direction: column;
        gap: 15px;
    }

    .coqpit-reseller-popup .store-data__left {
        align-self: center;
    }

    .coqpit-reseller-popup .store-links {
        flex-wrap: wrap;
    }
}