/* ============================================================
   Zisima Social — Geolocation Styles
   Mobile-first, no map, autocomplete + GPS button
   ============================================================ */

/* ── Wrapper ── */
.zsm-geo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}
.zsm-geo-wrap > input {
  flex: 1;
  padding-right: 44px !important;
}

/* ── GPS Button ── */
.zsm-geo-gps-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(26, 122, 46, 0.12);
  color: #1a7a2e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background 0.2s,
    transform 0.15s;
  z-index: 2;
}
.zsm-geo-gps-btn:hover {
  background: rgba(26, 122, 46, 0.22);
}
.zsm-geo-gps-btn:active {
  transform: translateY(-50%) scale(0.92);
}

/* Loading state — spinning */
.zsm-geo-gps-btn--loading svg {
  animation: zsm-geo-gps-spin 0.8s linear infinite;
  pointer-events: none;
}
.zsm-geo-gps-btn--loading {
  pointer-events: none;
  opacity: 0.6;
}
@keyframes zsm-geo-gps-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── Dropdown Suggestions ── */
.zsm-geo-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  -webkit-overflow-scrolling: touch;
}

/* Suggestion item */
.zsm-geo-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.zsm-geo-suggestion:last-child {
  border-bottom: none;
}
.zsm-geo-suggestion:hover,
.zsm-geo-suggestion:focus {
  background: rgba(26, 122, 46, 0.15);
  outline: none;
}
.zsm-geo-suggestion__icon {
  color: #1a7a2e;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.zsm-geo-suggestion__text {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Loading + no result */
.zsm-geo-loading,
.zsm-geo-no-result {
  padding: 14px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

/* ── Filled highlight ── */
.zsm-geo-filled {
  animation: zsm-geo-flash 0.6s ease;
}
@keyframes zsm-geo-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 122, 46, 0.5);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(26, 122, 46, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 122, 46, 0);
  }
}

/* ── Toast Notifications ── */
.zsm-geo-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: 340px;
  width: 90%;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
.zsm-geo-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.zsm-geo-toast--success {
  background: #1a7a2e;
  color: #fff;
}
.zsm-geo-toast--error {
  background: #c2185b;
  color: #fff;
}

/* ── Responsive (mobile-first) ── */
@media (max-width: 600px) {
  .zsm-geo-dropdown {
    max-height: 200px;
  }
  .zsm-geo-suggestion {
    padding: 14px 12px;
  }
  .zsm-geo-suggestion__text {
    font-size: 13px;
  }
}

/* ── Integration — Publish form localite field ── */
.zsm-annonce-fields .zsm-geo-wrap,
.zsm-profile__edit-inner .zsm-geo-wrap,
.zsm-presta-edit-modal__body .zsm-geo-wrap,
.zsm-auth-field .zsm-geo-wrap,
.zsm-filter-loc-wrap .zsm-geo-wrap {
  width: 100%;
}

/* ── Integration — Filter panel: no extra right padding (no GPS btn inside wrap) ── */
.zsm-filter-loc-wrap .zsm-geo-wrap > input {
  padding-right: 12px !important;
}

/* ── Integration — Auth modal special positioning ── */
.zsm-auth-field .zsm-geo-wrap .zsm-geo-dropdown {
  border-radius: 0 0 8px 8px;
}
