/* build fix */
.nearest-dealer-container {
  padding-top: 20px;
  padding-bottom: 28px;
  @media (width >=768px) {
      padding-bottom: 47px;
  }
  &:has(.loading-screen){
    position: relative;
    min-height: 470px;
    --loader-height: 470px;
    @media (width >=768px) {
      min-height: 560px;
      --loader-height: 560px;
    }
  }
  .loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: var(--loader-height);
    background: rgba(0, 0, 0, 0.7);
    color: var(--tertiary-white);
    font-family: var(--font-primary-arena);
    text-align: center;
    position: absolute;
    z-index: 9999;
    .loading-text {
      color: var(--tertiary-white);
      font-family: var(--font-primary-arena);
      font-weight: var(--fw-400);
      font-size: var(--body-font-size-xxxs);
      line-height: 16px;
      margin-bottom: 20px;
    }
    .loading-bar-container {
      width: 206px;
      height: 8px;
      background: var(--tertiary-white);
      position: relative;
      clip-path: polygon(5% 0%, 100% 0%, 95% 100%, 0% 100%);
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
      .loading-bar {
        position: absolute;
        height: 90%;
        width: 60%; /* Adjust for current progress */
        background: rgba(0, 0, 0, 0.7); /* Progress bar color */
        clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%); /* Matches container shape */
        transition: width 0.3s ease; /* Smooth transition for progress */
        animation: slide 1.5s infinite;
      }
    }
  }
}

.container__dealers {
  position: relative;
  padding-bottom: 46px;

  @media (width >= 1024px) {
    padding-bottom: 71px;
  }
}

.container__dealers .dealer__card .dealership__image {
  height: 160px;
  overflow: hidden;
}

.container__dealers .dealer__card .dealership__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: all 0.2s linear;
}

.dealers__content .dealers__headings .teaser__title * {
  color: var(--tertiary-black);
  font-size: 1.5rem;
  font-style: normal;
  font-weight: var(--fw-700);
  line-height: 1.75rem;
  margin: 0;
}

.teaser__subtitle h3 {
  color: var(--secondary-black);
  font-family: var(--body-font-arena);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: var(--fw-300);
  line-height: 1.125rem;
  margin-top: 8px;
  margin-bottom: 24px;
  width: 279px;
}

.dealer__list__container {
  display: grid;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  grid-gap: 1rem;
  grid-auto-flow: column;
  grid-auto-columns: 304px;
  padding-bottom: 12px;
  margin-right: -20px;
}

.dealer__list__container .dealer__card:last-child{
  padding-right: 20px;

  @media (width >= 768px){
    padding-right: 0;
  }
}

.dealer__list__container::-webkit-scrollbar {
  display: none;
}

.dealer__list__container .dealer__card {
  height: 100%;
  border-bottom: 1px solid var(--tertiary-black);
  padding-bottom: 16px;
  cursor: pointer;
  min-height: 340px;
  margin-bottom: -1px;
  display: flex;
  flex-direction: column;
}

.dealer__list__container .dealer__card:hover .dealership__image img {
  transform: scale(1.1);
}

.dealer__list__container .dealer__card .dealer__distance {
  color: var(--tertiary-black);
  font-family: var(--body-font-arena);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: var(--fw-400);
  line-height: 1rem;
  background-color: transparent;
  padding: 5px 8px 0px;
  display: inline-block;
  margin: 0;
  white-space: nowrap;
}

.dealer__list__container .dealer__card .dealership__top__info {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding-top: 16px;
  align-items: flex-start;
}

.dealer__list__container .dealer__card .dealer__name {
  color: var(--tertiary-black);
  font-family: var(--body-font-family);
  font-size: 1.5rem;
  font-style: normal;
  line-height: 1.875rem;
  font-weight: var(--fw-500);
  margin: 0;
}

.dealer__list__container .dealer__card .dealer__address {
  color: var(--tertiary-black);
  font-size: .75rem;
  font-style: normal;
  font-weight: var(--fw-300);
  line-height: 1.25rem;
  margin: 8px 0 8px;
  text-transform: capitalize;
  flex: 1;
}

.dealers__actions {
  position: absolute;
  bottom: 0;
  line-height: 0;
}

.dealers__actions .button.button-primary-blue{
  font-weight: var(--fw-400);
  border: 0px;
  font-size: 0.875rem;
  line-height: 1.125rem;
  letter-spacing: normal;
  @media (width >=1024px) {
    font-size: 1rem;
  }
}

.dealer__list__container .dealer__card a.dealer-link {
  display: block;
  color: var(--primary-blue-700);
  font-family: var(--body-font-arena);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: var(--fw-400);
  line-height: 1.25rem;
  text-decoration-line: underline;
  position: relative;
  padding: 8.71px 0 6.78px;
  @media (width >=1024px) {
    font-size: 1rem;
    line-height: 1.125rem;
    padding-top: 0;
  }
}

.dealer__list__container .dealer__card a.dealer-link::after {
  content: "";
  height: 19px;
  width: 19px;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 26 26" fill="none"><path d="M16.0957 10.9L9.64629 17.4687L8.84857 16.6562L15.2979 10.0875L9.23919 10.0875L9.24743 8.9375H17.2247V17.0625L16.0957 17.0709V10.9Z" fill="%23171C8F"/></svg>');
  background-position: center;
  position: absolute;
  margin-left: 1px;
  transition: all 0.2s linear;
}

.dealer__list__container .dealer__card a.dealer-link:hover::after {
  transform: scale(1.6);
  transform-origin: bottom left 0;
}



@media (width >=768px) {


  .dealer__list__container {
    -webkit-overflow-scrolling: touch;
    grid-gap: 24px;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding-bottom: 10px;
    margin-right: 0;
  }

  .teaser__subtitle h3 {
    width: 100%;
  }

  .container__dealers .dealer__card .dealership__image {
    height: 178px;
  }

  .dealer__list__container .dealer__card .dealership__top__info {
    gap: 16px;
  }

  .dealers__actions a.button{
    padding: 8px 16px;
    border: 0px;
    letter-spacing: normal;
  }

}

@media(width >= 1024px) {

  .nearest-dealer-container {
    padding-top: 60px;
    padding-bottom: 0;
  }

  .dealers__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .dealers__actions {
    position: static;
    display: flex;
    align-items: center;
    justify-content: end;
  }

  .dealers__content .dealers__headings .teaser__title * {
    font-size: 32px;
    line-height: 2.5rem;
    color: var(--secondary-black);
    width: 359px;
  }

  .teaser__subtitle h3 {
    margin: 16px 0px 40px;
    font-size: 0.75rem;
  }

  .dealers__actions a.button {
    padding: 12px 24px;
    margin-top: 26px;
  }

  .container__dealers .dealer__card .dealership__image {
    width: 100%;
    height: 162px;
  }

  .dealer__list__container{
    padding-bottom: 0;
  }

  .dealer__list__container .dealer__card .dealer__name {
    line-height: 1.75rem;
  }

  .dealer__list__container .dealer__card .dealer__distance {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }

  .dealer__list__container .dealer__card .dealer__address {
    font-size: 14px;
    margin: 8px 0 16.71px;
    min-height: 40px;
  }

}

@media (width >=1200px) {
  .dealer__list__container .dealer__card .dealer__name {
    min-height: 56px;
  }
}

@media (width >=1366px) {
  .dealers__content .dealers__headings .teaser__title h3 {
    font-size: 2rem;
    line-height: 38px;
  }

  .dealer__list__container .dealer__card .dealer__name {
    font-size: 1.5rem;
  }

  .dealer__list__container .dealer__card .dealer__address {
    font-size: .875rem;
  }

  .teaser__subtitle h3 {
    font-size: 0.75rem;
  }

  .container__dealers .dealer__card .dealership__image {
    height: 194px;
  }

  .dealer__list__container .dealer__card .dealership__top__info {
    padding-top: 16px;
    gap: 5px;
  }

  .dealer__list__container .dealer__card a.dealer-link::after {
    width: 18.2px;
    height: 18.2px;
  }
}

