#ew-map-wrapper.ew-ibs-map-wrapper {
  &.cmplz-blocked-content-container .ew-ibs-map-geolocate {
    display: none;
  }
  --base-color: #005370;
  a {
    color: #004964;
    text-decoration: underline;
    &:hover {
      text-decoration: none;
    }
  }
  button {
    text-transform: none;
    width: fit-content;
  }
  .hide {
    display: none;
  }
  .panel-view {
    display: grid;
    width: 100%;
    grid-template-columns: 0% 100%;
    transition: grid-template-columns 0.5s ease;
  }
  #ibs-map-detail-view {
    display: none;
  }
  .list-container {
    display: none;
    max-width: 50%;
    .retailer-list {
      background-color: #f6f7fb;
      padding: 1.5rem;
      list-style: none;
      margin-bottom: 0;
    }
    li {
      background-color: white;
      margin-left: 0;
      margin-bottom: 8px;
      padding: 2rem;
    }
    .dealer-card {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      address {
        font-style: normal;
      }
      img {
        max-height: 50px;
      }
    }
  }
  .ibs-map-filter {
    display: flex;
    #ibs-map-filter-controls {
      margin-bottom: 10px;
      label {
        display: inline-flex;
        margin-right: 10px;
        &:first-child {
          margin-left: 3rem;
        }
      }
    }
    input[type="checkbox"] {
      display: grid;
      place-content: center;
      gap: 1rem;
      -webkit-appearance: none;
      appearance: none;
      background-color: #fff;
      margin: 0 1rem 0;
      font: inherit;
      color: currentColor;
      width: 1.4rem;
      height: 1.4rem;
      border: 1px solid #b6b6b6;
      border-radius: 0.15em;
      transform: translateY(-0.075em);
      &:before {
        content: "";
        width: 1em;
        height: 1em;
        clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
        transform: scale(0);
        transform-origin: bottom left;
        transition: 12ms transform ease-in-out;
        box-shadow: inset 1em 1em black;
      }
      &:checked:before {
        transform: scale(1);
      }
    }
  }
  .panel-view.panel-visible {
    gap: 1.5rem;
    grid-template-columns: 40% 60%;
  }
  #ibs-map-geolocate-btn {
    display: flex;
    align-items: center;
    margin-bottom: 45px;
    cursor: pointer;
    &:before {
      content: url(../assets/aim.svg);
      margin-right: 12px;
      width: 22px;
      height: 22px;
    }
  }
  #ew-ibs-map {
    grid-column: 2;
    height: 600px;
    width: 100%;
  }
  .ew-btn {
    font-weight: bold;
    background: var(--base-color);
    color: white;
    margin-top: 20px;
    font-size: 14px;
    padding: 8px;
    line-height: 0;
    white-space: nowrap;
  }
  .mapboxgl-popup-content {
    padding: 22px 28px;
    .popup {
      img {
        max-width: 100px;
        max-height: 50px;
        margin: 10px;
      }
      a {
        font-weight: bold;
        display: inline-block;
      }
      .popup-break {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
    }
    .mapboxgl-popup-close-button {
      top: 5px;
      span {
        font-size: 2rem;
      }
    }
  }

  /* Overwrite theme styles */
  #ibs-map-search-card {
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    button.list-filter-reset {
      order: 2;
    }
    button.list-toggle {
      order: 2;
      margin: 0;
      &:before {
        content: "";
        display: inline-block;
        vertical-align: middle;
        background-image: url("../assets/list_icon.svg");
        margin-right: 0.5em;
        width: 20px;
        height: 20px;
        background-repeat: no-repeat;
      }
      &.maps:before {
        background-image: url("../assets/map_icon.svg");
      }
    }
    .mapboxgl-ctrl-geocoder.mapboxgl-ctrl {
      box-shadow: none;
      border: 1px solid #b6b6b6;
      border-radius: 0;
      max-width: 50%;
      width: 100%;
    }

    ul.suggestions li {
      margin-left: 0;
    }

    input {
      box-shadow: none;
    }
    .mapboxgl-ctrl-geocoder--icon-search {
      display: none;
    }
    .mapboxgl-ctrl-geocoder--input {
      font: inherit;
      width: 100%;
      border: 0;
      background-color: transparent;
      margin: 0;
      height: 50px;
      color: #404040;
      color: rgba(0, 0, 0, 0.75);
      padding: 15px 21px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }
  }

  .retailer-panel {
    display: flex;
    flex-direction: column;
    flex-flow: column;
    height: 100%;
    background-color: #f6f7fb;
    box-sizing: border-box;
    padding-top: 2rem;
    padding-bottom: 2rem;
    .panel-header {
      display: flex;
      img {
        height: 50px;
      }
    }
    > * {
      padding-left: 2rem;
      padding-right: 2rem;
    }
    address {
      font-style: normal;
      margin: 1.4rem 0;
    }
    .breaker {
      border: 1px solid white;
      margin-top: auto;
    }
    .panel-btn-wrap {
      margin-top: auto;
      border-top: 4px solid white;
    }
    #ibs-close-filiale-btn {
      margin: 40px 0 0;
    }
  }
  /* pagination */
  .dealer-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
  }
  .page-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.5rem;
    margin: 0;
    font-weight: normal;
    &.dec {
      text-decoration: underline;
      &:hover,
      &:focus,
      &:active {
        text-decoration: nones≤;
      }
    }
  }
  .page-btn.active {
    font-weight: bolder;
    text-decoration: none;
  }
  .pagination-dots {
    padding: 0 0.2rem;
    user-select: none;
  }
}

/* Mobile styles */
@media screen and (max-width: 1023px) {
  #ew-map-wrapper.ew-ibs-map-wrapper .list-container,
  #ew-map-wrapper.ew-ibs-map-wrapper .dealer-pagination {
    max-width: 100%;
  }
}
@media screen and (max-width: 849px) {
  #ew-map-wrapper.ew-ibs-map-wrapper {
    #ibs-map-geolocate-btn {
      margin-bottom: 10px;
    }
  }
  #ew-map-wrapper.ew-ibs-map-wrapper {
    .ibs-map-filter {
      flex-direction: column;
      input[type="checkbox"]#ibs-map-filter-internal {
        margin-left: 0;
      }
    }
  }
  #ew-map-wrapper.ew-ibs-map-wrapper {
    & .ibs-map-filter {
      & #ibs-map-filter-controls label {
        &:first-child {
          margin-left: 0;
        }
      }
    }
  }
  #ew-map-wrapper #panel-view {
    grid-template-rows: auto;
    &.panel-visible {
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }
    #ibs-map-detail-view {
      grid-row: 1;
      grid-column: 1 / span 2;
    }
    .mapboxgl-map {
      grid-row: 2;
      grid-column: 1 / span 2 !important;
    }
  }
  .mapboxgl-popup-content {
    max-width: 320px;
    .popup-break {
      flex-direction: column;
    }
  }
}
