#map { width: 100%; height: 100%; }
* {box-sizing: border-box;}

.mt-32 {
  margin-top: 32px;
}

.btn {
  display: flex;
  gap: 24px;
  align-items: center;
  border-radius: 12px;
  background: var(--Main-red, #AE040B);
  border: 0;
  padding: 4px 4px 4px 24px;
  height: 62px;
  text-decoration: none;
}

.btn:focus-visible {
  border: 0;
  outline: none;
}

.btn .text {
  display: inline-block;
  flex: 1;
  color: var(--White, #FFF);
  text-align: center;
  font-family: "Helvetica Neue";
  font-size: var(--Font-Size-Body-2, 14px);
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.btn .svg-wrapper {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 12px;
}


.page-locations {
    padding: 40px;
}
.locations {
    display: flex;
    column-gap: 12px;
    position: relative;
}

.locations-list {
    width: 30%;
    max-width: 500px;
    padding: 40px 20px;
    border-radius: 12px;
    background: var(--Background, rgba(174, 4, 11, 0.04));
    overflow-y: auto;
    max-height: 80vh;
    scrollbar-color: #C24248 rgba(174, 4, 11, 0.04);
}

.locations-list__title {
    color: var(--Black, #1D1D1D);
    font-family: "Helvetica Neue";
    font-size: 38px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    margin: 0 0 32px;
}

.locations-list__body-desktop {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.location {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 12px;
    background: var(--White, #FFF);
    padding: 24px 20px;
}

.location__title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.location__title-wrapper img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.location__title {
    color: var(--Black, #1D1D1D);
    font-family: "Helvetica Neue";
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    margin: 0;
}

.location__count {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--red, #C24248);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--White, #FFF);
    font-family: "Plaax 6 Trial";
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
}

.location__time {
    color: var(--Black, #1D1D1D);
    font-family: "Helvetica Neue";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
}

.location__address p {
    margin: 0;
    color: var(--Black, #1D1D1D);
    font-family: "Helvetica Neue";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
}

.location__btn {
    display: flex;
    width: 100%;
    max-width: 420px;
    padding: 16px 29px;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    border-radius: 12px;
    background: var(--Main-red, #AE040B);
    color: var(--White, #FFF);
    font-family: "Helvetica Neue";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%; 
    text-decoration: none;
}

.locations-map {
    width: 70%;
    flex: 1;
}

.locations-mobile-toggle-btn {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: none;
}

.locations-mobile-toggle-btn button {
  width: 100%;
  border-radius: 12px 12px 0 0;
  background: var(--red, #C24248);
  padding: 31px 0;
  border: none;
  position: relative;
}

.locations-mobile-toggle-btn span {
  color: var(--White, #FFF);
  text-align: center;
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.view-map .btn-list {
  visibility: hidden;
}

.view-list .btn-map {
  visibility: hidden;
}

.locations-list__body-mobile {
  display: none;
}

.search-mobile-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  border: 1px solid var(--red, #C24248);
  background-color: white;
  position: relative;
  margin-top: 48px;
}

.search-mobile-wrapper label {
  position: absolute;
  top: -24px;
  color: var(--black, #1D1D1D);
  font-family: "Helvetica Neue";
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.search-mobile-wrapper  input {
    width: 100%;
    border: none;
    padding: 17px 24px;
    font-size: 15px;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    color: var(--Black, #1D1D1D);
    font-family: "Helvetica Neue";
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.search-mobile-wrapper .search-icon {
    margin-right: 16px;
    margin-top: -6px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.location-mobile__list {
  margin-top: 4px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--red, #C24248);
  background: #FFF;
}

.location-mobile__title {
  margin: 0;
  color: var(--black, #1D1D1D);
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 125%;
}

.location-mobile + .location-mobile {
  margin-top: 12px;
}

.location-mobile + .location-mobile__list-footer {
  margin-top: 24px;
  border-top: 1px solid #D9D9D9;
}

/* .location-mobile__list-footer {
  margin-top: 24px;
  border-top: 1px solid #D9D9D9;
} */

.location-mobile__list-footer p {
  margin-top: 24px;
  color: rgba(1, 1, 1, 0.70);
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.location-mobile__list-footer a {
  color: var(--red, #AE040B);
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
}

.search__footer {
  display: none;
  border-top: 1px solid #D9D9D9;
}

.search__footer p {
  margin-top: 24px;
  color: rgba(1, 1, 1, 0.70);
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.search__footer a {
  color: var(--red, #AE040B);
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
}

.suggestion-item + .search__footer {
  display: block;
}
.no-results + .search__footer {
  display: block;
}

.selected-location {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  min-height: 62px;
  align-items: center;
  padding: 4px 16px;
  border-radius: 12px;
  background: var(--Background, rgba(174, 4, 11, 0.04));
}

.selected-location__icon {
  width: 50px;
  height: auto;
}

.selected-location__icon img {
  width: 100%;
  height: auto;
}

.selected-location__text {
  flex: 1;
  margin: 0;
  color: #1D1D1D;
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.selected-location__close {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 32 32' fill='none'%3E%3Cpath d='M24 8L8 24' stroke='%231D1D1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 8L24 24' stroke='%231D1D1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.mapboxgl-popup-content {
  padding: 28px 16px 16px;
  width: 100%;
}

.mapboxgl-popup-content h3 {
  color: var(--Black, #1D1D1D);
  font-family: "Helvetica Neue";
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0 0 20px;
}

.mapboxgl-popup-content p {
  max-width: 240px;
  color: var(--Black, #1D1D1D);
  font-family: "Helvetica Neue";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 125%;
  margin: 0;
}

.mapboxgl-popup-content .description,
.mapboxgl-popup-content .time {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
}

.mapboxgl-popup-content .description img,
.mapboxgl-popup-content .time img {
  width: 24px;
  height: 30px;
}

.mapboxgl-popup-close-button {
  top: 28px;
  right: 16px;
  width: 32px;
  height: 32px;
  font-size: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none'%3E%3Cpath d='M24 8L8 24' stroke='%231D1D1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 8L24 24' stroke='%231D1D1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.mapboxgl-popup-close-button:hover {
  background-color: white;
}

@media screen and (max-width: 1024px) {
  .view-map .search-container {
    width: calc(100% - 32px);
    left: 16px;
  }

  .location-mobile__footer.selected .show-location{
    display: none;
  }

  .view-list .search-container {
    display: none;
  }

  .locations-mobile-toggle-btn {
    display: block;
  }

  .page-locations {
    padding: 0;
  }

  .view-map .locations-list {
    display: none;
  }

  .view-list .locations-list {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    max-height:100vh;
    box-sizing: border-box;
    background-color: white;
  }

  .view-list .locations-map {
    display: none;

  }
  .view-map .locations-map {
    height: 100vh;
  }

  .mapboxgl-popup {
    transform: none !important;
    z-index: 3;
    max-width: 100% !important;
    width: 100%;
  }

  .locations-list__body-desktop {
    display: none;
  }

  .locations-list__body-mobile {
    display: block;
  }
  .locations-list__body-mobile:has(#mobile-search:placeholder-shown) .location-mobile__list {
    display: none;
  }

  .locations-list__title {
    color: var(--Main-red, #AE040B);
    font-family: "Helvetica Neue";
    font-size: 22px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1300px) {
  .locations-list {
    width: 40%;
  }
  .search-container {
    left: calc(min(40%, 500px) + 50px) !important;
  }
}


    .search-container {
      position: absolute;
      top: 15px;
      left: calc(min(30%, 500px) + 50px);
      /* transform: translateX(-50%); */
      width: 476px;
      z-index: 2;
    }

    .search-wrapper {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    .search-wrapper .search-icon {
      margin-right: 24px;
      cursor: pointer;
      width: 32px;
      height: 32px;
    }

    .search-container input {
      width: 100%;
      border: none;
      padding: 17px 24px;
      font-size: 15px;
      border-radius: 12px;
      outline: none;
      box-sizing: border-box;

      color: var(--Black, #1D1D1D);
      font-family: "Helvetica Neue";
      font-size: 20px;
      font-style: normal;
      font-weight: 500;
      line-height: normal;
      }

    .suggestions {
      max-height: 200px;
      overflow-y: auto;
      border-top: 1px solid #ddd;
      padding: 0;
      background: white;
      border-radius: 12px;
      margin-top: 10px;
    }

    .suggestions:has( > .suggestion-item) {
      padding: 16px;
    }
    .suggestions:has( > .no-results) {
      padding: 16px;
    }

    .suggestion-item {
      padding: 10px 0;
      cursor: pointer;
      transition: 0.2s;
    }

    .suggestion-item:hover {
      background: #f0f8ff;
    }

    .no-results {
      padding: 10px 0;
      color: #888;
      font-size: 14px;
    }

    .custom-marker {
      width: 16px;
      height: 20px;
      cursor: pointer;
    }

    .custom-marker__zoom {
      width: 100%;
      height: 100%;
      transition: transform 0.2s ease;
      transform-origin: center bottom;
    }

    .custom-marker__inner {
      width: 100%;
      height: 100%;
      background-image: url('../images/pin.png');
      background-size: cover;
      transition: transform 0.25s ease;
    }

    .custom-marker:hover .custom-marker__inner {
      transform: scale(1.8);
    }

    .mapboxgl-popup-tip {
      display: none;
    }