/*
 * Reva — Distance slider (Reva_Geo::radius_control)
 * Used in the [reva_events_page] sidebar + sheet and the [reva_partners]
 * filter form. Everything is scoped to .reva-radius / .reva-dist.
 */

.reva-radius {
  --rr-brand: var(--reva-coral, #39B7CE);
  --rr-brand-dark: var(--reva-coral-dark, #2A93A6);
  --rr-soft: var(--reva-coral-soft, #EAF8FB);
  --rr-ink: var(--reva-ink, #202D2C);
  --rr-muted: var(--reva-muted, #7D8885);
  --rr-line: var(--reva-line, #E3E5E1);
  --rr-thumb: 20px;
  position: relative;
}

/* Head: label left, live value right */
.reva-radius__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 0 0 12px;
}
.reva-radius .reva-radius__label { margin: 0 !important; display: inline-block; }
.reva-radius__value {
  font-size: 13px; font-weight: 600; color: var(--rr-brand-dark);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Range input */
.reva-radius__input {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: var(--rr-thumb);
  margin: 0; padding: 0; background: transparent; cursor: pointer;
  touch-action: pan-y;
}
.reva-radius__input:focus { outline: none; }
.reva-radius__input::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(to right, var(--rr-brand) 0 var(--reva-radius-fill, 100%), var(--rr-line) var(--reva-radius-fill, 100%) 100%);
}
.reva-radius__input::-moz-range-track { height: 4px; border-radius: 99px; background: var(--rr-line); }
.reva-radius__input::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--rr-brand); }
.reva-radius__input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: var(--rr-thumb); height: var(--rr-thumb); margin-top: calc((4px - var(--rr-thumb)) / 2);
  border-radius: 50%; background: #fff; border: 2px solid var(--rr-brand);
  box-shadow: 0 1px 3px rgba(32, 45, 44, .18);
  transition: transform .12s;
}
.reva-radius__input::-moz-range-thumb {
  width: var(--rr-thumb); height: var(--rr-thumb); box-sizing: border-box;
  border-radius: 50%; background: #fff; border: 2px solid var(--rr-brand);
  box-shadow: 0 1px 3px rgba(32, 45, 44, .18);
}
.reva-radius__input:active::-webkit-slider-thumb { transform: scale(1.1); }
.reva-radius__input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(57, 183, 206, .25); }
.reva-radius__input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(57, 183, 206, .25); }

/* Stop labels, centred under each thumb position */
.reva-radius__ticks {
  position: relative; height: 18px; margin: 6px 0 0;
  font-size: 11px; color: var(--rr-muted); font-variant-numeric: tabular-nums;
}
.reva-radius__tick {
  position: absolute; top: 0;
  left: calc(var(--rr-thumb) / 2 + (100% - var(--rr-thumb)) * var(--i) / var(--n));
  transform: translateX(-50%); white-space: nowrap;
}
.reva-radius__tick.is-on { color: var(--rr-ink); font-weight: 600; }

/* No location chosen: visible but inactive, with a hint underneath */
.reva-radius.is-off .reva-radius__input { cursor: not-allowed; opacity: .45; }
.reva-radius.is-off .reva-radius__ticks { opacity: .5; }
.reva-radius.is-off .reva-radius__value { color: var(--rr-muted); }

/* Exact stop: value reads neutral, radius stops read in brand colour */
.reva-radius:not(.is-near) .reva-radius__value { color: var(--rr-ink); }

.reva-radius__hint { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--rr-muted); }
.reva-radius__hint:empty { display: none; }

.reva-radius__note {
  margin: 10px 0 0; padding: 8px 10px; border-radius: 8px;
  background: var(--rr-soft); color: var(--rr-ink); font-size: 12.5px; line-height: 1.45;
}
.reva-radius__note[hidden] { display: none; }


/* Bigger thumb in the mobile sheets */
.reva-ep-sheet .reva-radius,
.reva-psheet .reva-radius { --rr-thumb: 26px; }
.reva-ep-sheet .reva-radius__ticks,
.reva-psheet .reva-radius__ticks { font-size: 12px; }

/* Distance next to an address on event rows + partner cards */
.reva-dist {
  display: inline-flex; align-items: center;
  margin-left: 6px; padding: 1px 7px; border-radius: 99px;
  background: var(--reva-coral-soft, #EAF8FB); color: var(--reva-coral-dark, #2A93A6);
  font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Keep the end labels inside the box */
.reva-radius__tick:first-child { left: 0; transform: none; }
.reva-radius__tick:last-child { left: auto; right: 0; transform: none; }

/* "Nothing near you" empty state (events + partners) */
.reva-geo-empty {
  margin: 8px 0 0; padding: 36px 24px; border: 1px dashed var(--reva-line, #E3E5E1); border-radius: 14px;
  background: #FFF8EC; text-align: center; color: #7C4A03;
}
.reva-geo-empty[hidden] { display: none; }
.reva-geo-empty__title { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--reva-ink, #202D2C); }
.reva-geo-empty__text { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.reva-geo-empty__btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--reva-coral, #39B7CE); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.reva-geo-empty__btn:hover { background: var(--reva-coral-dark, #2A93A6); }
.reva-geo-empty__btn:focus-visible { outline: 2px solid var(--reva-coral-dark, #2A93A6); outline-offset: 2px; }

/* Action button inside the location notice ("Show all locations", "Search near …") */
.reva-geo-link {
  display: inline; margin: 0 0 0 2px; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 700; color: var(--reva-coral-dark, #2A93A6);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}
.reva-geo-link:hover { color: var(--reva-ink, #202D2C); }
.reva-geo-link:focus-visible { outline: 2px solid var(--reva-coral, #39B7CE); outline-offset: 2px; border-radius: 3px; }

/* ──────────────────────────────────────────────────────────────
 * Location search box (RevaGeo.placeBox) — Events page + Partner listing.
 * Replaces the location <select>, which stays in the DOM hidden.
 * Scoped under .reva-place so theme / Elementor input styles can't win.
 * ────────────────────────────────────────────────────────────── */
select.reva-place__native {
  position: absolute !important; width: 1px !important; height: 1px !important;
  min-width: 0 !important; max-width: none !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important;
  white-space: nowrap !important; opacity: 0 !important; pointer-events: none !important;
}
.reva-place {
  --rp2-brand: var(--reva-coral, #39B7CE);
  --rp2-brand-dark: var(--reva-coral-dark, #2A93A6);
  --rp2-soft: var(--reva-coral-soft, #EAF8FB);
  --rp2-ink: var(--reva-ink, #202D2C);
  --rp2-muted: var(--reva-muted, #7D8885);
  --rp2-line: var(--reva-line, #E3E5E1);
  --rp2-bg: var(--reva-bg, #F7F9F8);
  position: relative; width: 320px; max-width: 100%; font-family: inherit;
}
.reva-place__field { position: relative; display: flex; align-items: center; }
.reva-place__field > svg { position: absolute; left: 12px; color: var(--rp2-brand-dark); pointer-events: none; }
.reva-place .reva-place__input {
  width: 100%; height: 40px; margin: 0; min-height: 0;
  padding: 0 36px 0 34px !important;
  border: 1px solid var(--rp2-line) !important; border-radius: 10px !important;
  background: #fff !important; box-shadow: none !important;
  color: var(--rp2-ink) !important; font-family: inherit; font-size: 14px; font-weight: 500; line-height: normal;
  text-overflow: ellipsis;
}
.reva-place .reva-place__input::placeholder { color: var(--rp2-muted); font-weight: 400; opacity: 1; }
.reva-place .reva-place__input:focus { outline: none; border-color: var(--rp2-brand) !important; box-shadow: 0 0 0 3px rgba(57, 183, 206, .18) !important; }
.reva-place .reva-place__clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; box-shadow: none;
  color: var(--rp2-muted); cursor: pointer;
}
.reva-place .reva-place__clear:hover,
.reva-place .reva-place__clear:focus { background: var(--rp2-bg); color: var(--rp2-ink); }
.reva-place .reva-place__clear[hidden] { display: none; }

.reva-place__list {
  position: absolute; z-index: 10050; top: calc(100% + 6px); left: 0;
  width: 100%; min-width: 280px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none; box-sizing: border-box;
  background: #fff; border: 1px solid var(--rp2-line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(32, 45, 44, .16);
}
.reva-place__list[hidden] { display: none; }
.reva-place__list li { margin: 0; }
.reva-place__head {
  padding: 10px 10px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--rp2-muted);
}
.reva-place__opt {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  color: var(--rp2-ink); font-size: 14px; line-height: 1.3;
}
.reva-place__opt.is-active { background: var(--rp2-soft); color: var(--rp2-brand-dark); }
.reva-place__icon { flex-shrink: 0; width: 18px; text-align: center; font-size: 14px; }
.reva-place__text { flex: 1; min-width: 0; }
.reva-place__main { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reva-place__sub { display: block; margin-top: 1px; font-size: 12px; color: var(--rp2-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reva-place__tag {
  flex-shrink: 0; padding: 2px 8px; border-radius: 999px;
  background: var(--rp2-bg); color: var(--rp2-muted); font-size: 11px; font-weight: 600;
}
.reva-place__status { padding: 10px; font-size: 13px; line-height: 1.4; color: var(--rp2-muted); }
.reva-place__status.is-loading::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid var(--rp2-line); border-top-color: var(--rp2-brand); border-radius: 50%;
  animation: reva-place-spin .7s linear infinite;
}
@keyframes reva-place-spin { to { transform: rotate(360deg); } }

/* Region picked: slider greyed out, hint explains why */
.reva-radius.is-region .reva-radius__value { color: var(--rr-muted); }

/* Inside the mobile filter sheets the list pushes content down (no clipping) */
.reva-ep-sheet .reva-place,
.reva-psheet .reva-place { width: 100%; }
.reva-ep-sheet .reva-place__list,
.reva-psheet .reva-place__list { position: static; min-width: 0; max-height: none; margin-top: 6px; box-shadow: none; }

/* Location bars */
.reva-ep__geobar-actions .reva-place,
.reva-pgeo__row .reva-place { flex: 1 1 320px; }
.reva-pgeo[data-state="detecting"] .reva-place { opacity: .5; pointer-events: none; }

@media (max-width: 767px) {
  .reva-place, .reva-ep__geobar-actions .reva-place, .reva-pgeo__row .reva-place { width: 100%; flex: 1 1 100%; }
  .reva-place .reva-place__input { height: 44px; font-size: 16px; } /* 16px stops iOS zoom */
  .reva-place__list { min-width: 0; max-height: 60vh; }
  .reva-place__opt { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .reva-place__status.is-loading::before { animation: none; } }
