/* Markaz Ilm — "Use my location" in the search panel */

/* Label row: "LOCATION" on the left, the button on the right */
.sp-loc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.sp-loc-head > label { margin-bottom: 0; }

.sp-locate-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: -.3rem 0;               /* keeps the row the same height as the other labels */
  padding: .22rem .65rem;
  border: 1px solid var(--bs-border-color, #cfd8e3);
  border-radius: .55rem;
  background: #fff;
  color: var(--bs-primary, #0b4fb3);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sp-locate-btn .bi { font-size: .9rem; }
.sp-locate-btn:hover,
.sp-locate-btn:focus-visible {
  border-color: var(--bs-primary, #0b4fb3);
  background: rgba(11, 79, 179, .06);
  outline: none;
}
.sp-locate-btn.is-active {
  border-color: var(--bs-primary, #0b4fb3);
  background: var(--bs-primary, #0b4fb3);
  color: #fff;
}
.sp-locate-btn:disabled { cursor: progress; opacity: .85; }
.sp-locate-btn.is-loading .bi { animation: sp-near-spin 1s linear infinite; }
@keyframes sp-near-spin { to { transform: rotate(360deg); } }

/* Radius row under the dropdown (only while "near me" is on) */
.sp-near {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--mi-primary-700, var(--bs-primary, #0b4fb3));
}
.sp-near[hidden] { display: none; }
.sp-near > label { margin: 0; font: inherit; color: inherit; text-transform: none; letter-spacing: normal; }
.sp-near-radius {
  width: auto;
  padding-top: .15rem;
  padding-bottom: .15rem;
  font-size: .78rem;
}

/* Error message */
.sp-near-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 1080;
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: .7rem 1rem;
  border-radius: .6rem;
  background: #1f2937;
  color: #fff;
  font-size: .875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transition: opacity .4s ease;
}
.sp-near-toast.is-hiding { opacity: 0; }

/* "2.3 km away" on result cards */
.result-distance {
  font-size: .78rem;
  font-weight: 600;
  color: var(--mi-primary-700, var(--bs-primary, #0b4fb3));
  white-space: nowrap;
}
