:root {
  --spacing: 1em;
}

.google-map__wrapper * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  overflow-anchor: none;
}

.google-map__wrapper input:-webkit-autofill,
.google-map__wrapper input:-webkit-autofill:hover,
.google-map__wrapper input:-webkit-autofill:focus,
.google-map__wrapper input:-webkit-autofill:active,
.google-map__wrapper select:-webkit-autofill,
.google-map__wrapper select:-webkit-autofill:hover,
.google-map__wrapper select:-webkit-autofill:focus,
.google-map__wrapper select:-webkit-autofill:active,
.google-map__wrapper textarea:-webkit-autofill,
.google-map__wrapper textarea:-webkit-autofill:hover,
.google-map__wrapper textarea:-webkit-autofill:focus,
.google-map__wrapper textarea:-webkit-autofill:active {
  -webkit-text-fill-color: inherit !important;
  -webkit-transition: 'color 9999s ease-out, background-color 9999s ease-out';
  -webkit-transition-delay: 9999s;
}

.google-map__wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 700px;
  height: 80vh;
  background: var(--bg-base);
  overflow: hidden;
}

.google-map__wrapper .google-map__title {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: var(--spacing);
  color: var(--text-color);
}

.google-map__wrapper h2:not(.google-map__title),
.google-map__wrapper h3 {
  font-size: 18px;
  font-weight: 600;
  text-transform: unset;
  margin: 0;
  padding-bottom: var(--spacing);
  color: var(--text-color);
}

.google-map__filters {
  position: absolute;
  display: flex;
  gap: var(--spacing);
  flex-direction: column;
  width: 35%;
  max-width: 400px;
  background-color: var(--bg-contrast);
  overflow: hidden;
  padding: 30px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  border-radius: var(--spacing);
  z-index: 999;
  top: 5%;
  left: 5%;
  bottom: 5%;
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
  align-items: flex-end;
  margin-bottom: 1em;
}

.input-clearable {
  position: relative;
  width: 100%;
  flex: 1;
  width: 100%;
  min-width: calc(50% - var(--spacing));
}

.input-clearable.loading {
  position: relative;
}

.input-clearable.loading::after {
  content: '';
  display: block;
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px var(--border-color) solid;
  border-right: 2px var(--primary-color) solid;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1;
}

.input-clearable.loading input {
  padding-left: 32px !important;
}

.input-clearable .clear-btn {
  position: absolute;
  right: 0px;
  bottom: 0px;
  top: 0px;
  padding: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  width: 20px;
  border-radius: 0px;
}

.filters select,
.filters input[type='search'] {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--bg-filter-color);
  background: transparent;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-color);
  outline: none;
  width: 100%;
  padding-right: 20px;
  transition: padding 0.2s ease-out;
}

input::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

.filters select:focus,
.filters input[type='search']:focus {
  border-color: var(--primary-color);
}

.filters label {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-color);
  margin: 0;
  width: 100%;
  flex: 1 1 100%;
}

.filters label input[type='range'] {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  padding: 13px 20px;
}

.filters label input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

/* Chrome, Safari, Edge */
.filters label input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  margin-top: -6px; /* Ajusta según la altura de tu track */
}

/* Track background (opcional) */
.filters label input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border-radius: 2px;
}

/* Firefox */
.filters label input[type='range']::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
}

.filters label input[type='range']::-moz-range-track {
  height: 4px;
  background: var(--bg-filter-color);
  border-radius: 2px;
}

/* IE (si lo necesitas aún) */
.filters label input[type='range']::-ms-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
}

#distance-wrapper {
  display: none;
  width: 100%;
}

#range-value {
  font-weight: bold;
  font-size: 13px;
  color: var(--text-color);
}

.filters .suggestions-list:empty {
  display: none;
}

.filters .suggestions-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 9999;
  width: 100%;

  background: #1e1e1e;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);

  max-height: 260px;
  overflow-y: auto;
  margin: 0px;
  padding: 0;
  list-style: none;

  font-family: inherit;
  font-size: 14px;
  color: #fff;
}

.filters .suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  display: block;
  transition: background 0.2s ease;
}

.filters .suggestion-item:hover,
.filters .suggestion-item:focu {
  background-color: rgba(255, 255, 255, 0.08);
}

.filters .suggestions-list::-webkit-scrollbar {
  width: 6px;
}

.filters .suggestions-list::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

.google-map__filters:not(:has(#address:focus)):not(
    :has(#address-suggestions:hover)
  )
  #address-suggestions {
  display: none !important;
}

.google-map__filters:not(:has(.results-list li:nth-child(2))) .filters {
  display: none !important;
}

#message,
#loading {
  width: 100%;
  font-size: 13px;
  color: var(--text-color-muted);
  margin-top: 10px;
  flex: 1 1 100%;
}

#results-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

#results-list ul {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;

  scrollbar-width: thin;
  scrollbar-color: var(--bg-filter-color) transparent;
}

#results-list ul::-webkit-scrollbar {
  width: 6px;
}

#results-list ul::-webkit-scrollbar-track {
  background: transparent;
}

#results-list ul::-webkit-scrollbar-thumb {
  background-color: var(--bg-filter-color);
  border-radius: 3px;
}

#results-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing);
  margin-bottom: 1.5em;
  background: var(--bg-base);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  padding: var(--spacing);
}

#results-list li .info {
  flex: 1;
}

#results-list li .info span {
  font-size: 12px;
  font-weight: 300;
}

#results-list li .info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  padding-bottom: 10px;
  color: var(--text-color);
  text-transform: uppercase;
}

#results-list li .info p {
  padding: 0px;
  margin: 0;
  font-size: 14px;
  color: var(--text-color-muted);
  text-transform: uppercase;
}

#map {
  width: 100% !important;
  min-height: 700px !important;
  height: 100% !important;
  background-color: var(--bg-map-color);
}

.drag-handle {
  display: none;
}

.container_content__icon-map {
  max-width: 260px;
  overflow: hidden;
  min-width: 200px;
}

.container__icon-map {
  padding: 0px 5px 16px;
  text-align: left;
}

.container__icon-map h3 {
  margin: 0px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  text-transform: uppercase;
}

.container__icon-map p {
  margin: 0 0 4px;
  padding: 0px;
  font-size: 14px;
  color: var(--text-color-muted);
  text-transform: uppercase;
}

.button__icon-map {
  margin-top: 10px;
  padding: 8px 12px;
  width: 100%;
  max-width: 100%;
  background-color: var(--primary-color);
  color: var(--bg-base);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.2s ease-in-out;
}

.button__icon-map:hover {
  filter: brightness(1.1);
}

.map-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spinNoTranslate 0.8s linear infinite;
}

.hidden {
  display: none;
}

@media (max-width: 1024px) {
  .google-map__wrapper {
    flex-direction: column-reverse;
    height: auto;
  }

  .google-map__filters {
    position: relative;
    width: 100%;
    max-width: unset;
    padding: 35px 5vw;
    top: unset;
    left: unset;
    bottom: unset;
    border-radius: 20px 20px 0px 0px;
    margin-top: -20px;
  }
  
  #results-list {
    overflow: visible;
  }

  #results-list ul {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    scroll-padding: 0px 5vw;
    padding: 0px 5vw;
    flex: 1 1 auto;
    overflow: auto hidden;
    margin: 0;
    list-style: none;
    scrollbar-width: none;
    scrollbar-color: none;
    display: flex;
    gap: 5vw;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }
  
  #results-list ul::-webkit-scrollbar {
    display: none;
  }
  
  #results-list ul li {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 1 1 auto;
    min-width: 75%;
    max-width: 75%;
    margin: 0px;
  }

  #map {
    width: 100% !important;
    height: 100vw !important;
    min-height: unset !important;
  }

  #map:before {
    top: 45%;
    left: 50%;
  }

  .container_content__icon-map {
    max-width: 80vw;
    min-width: 60vw;
  }
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(0deg);
  }

  from {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes spinNoTranslate {
  to {
    transform: rotate(360deg);
  }
}
