/* Home Guardy geolocation — label in the top bar + popup (Figma: geolocation_press_popup) */
:root {
  --hg-geo-blue: #27a9e1;
  --hg-geo-text: #333;
  --hg-geo-border: #d6d6d6;
}

/* hide the static "Spain, Andalusia" image of the theme until the live label is in place */
#_desktop_hg_location > img,
#_mobile_hg_location > img { visibility: hidden; }
#_desktop_hg_location.hg-geo-ready > img,
#_mobile_hg_location.hg-geo-ready > img { display: none; }

.hg-geo-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  color: var(--hg-geo-blue);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 22px;
  white-space: nowrap;
  text-decoration: none;
}

/* The theme styles href="#" links as a white back-to-top button. Keep the
   location label visually identical to the original 128x22 image instead. */
nav.header-nav #_desktop_hg_location .hg-geo-label,
nav.header-nav #_mobile_hg_location .hg-geo-label {
  color: var(--hg-geo-blue) !important;
  -webkit-text-fill-color: var(--hg-geo-blue) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.hg-geo-label:hover,
.hg-geo-label:focus { color: var(--hg-geo-blue); text-decoration: none; }
.hg-geo-label__pin { display: block; flex: 0 0 auto; width: 14px; height: 18px; }
.hg-geo-label__text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* popup: transparent overlay catches the click outside the card */
.hg-geo-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
}
.hg-geo-popup[hidden] { display: none; }

.hg-geo-popup__card {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 100%;
  max-width: 300px;
  padding: 16px 16px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
  text-align: center;
}
.hg-geo-popup__title {
  margin-bottom: 12px;
  color: var(--hg-geo-text);
  font-size: 13px;
}

.hg-geo-combo { position: relative; margin-bottom: 8px; text-align: left; }
.hg-geo-combo__input {
  width: 100%;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--hg-geo-border);
  border-radius: 15px;
  background: #fff;
  color: var(--hg-geo-text);
  font-size: 12px;
  outline: none;
}
.hg-geo-combo__input:focus { border-color: var(--hg-geo-blue); }
.hg-geo-combo.is-disabled .hg-geo-combo__input { background: #f5f5f5; cursor: not-allowed; }

.hg-geo-combo__list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 2;
  max-height: 180px;
  margin: 2px 0 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid var(--hg-geo-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.hg-geo-combo__list li {
  padding: 5px 14px;
  font-size: 12px;
  color: var(--hg-geo-text);
  cursor: pointer;
}
.hg-geo-combo__list li:hover,
.hg-geo-combo__list li.is-active { color: var(--hg-geo-blue); background: #f2f9fd; }
.hg-geo-combo__list li.hg-geo-combo__empty { color: #999; cursor: default; background: none; }

.hg-geo-popup__error { margin: 4px 0 8px; color: #d9534f; font-size: 12px; }

.hg-geo-popup__ok {
  min-width: 100px;
  height: 30px;
  margin-top: 4px;
  padding: 0 24px;
  border: 0;
  border-radius: 15px;
  background: var(--hg-geo-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.hg-geo-popup__ok:hover { filter: brightness(.95); }
.hg-geo-popup__ok:disabled { opacity: .6; cursor: wait; }

.hg-geo-popup__attribution {
  display: block;
  margin-top: 9px;
  color: #999;
  font-size: 9px;
  line-height: 12px;
  text-decoration: none;
}
.hg-geo-popup__attribution:hover,
.hg-geo-popup__attribution:focus { color: #777; text-decoration: underline; }

.hg-geo-unavailable { margin: 10px 0; font-size: 13px; }
