/* ============================================================
   Map & location step — Leaflet, autocomplete, socials, uploads
   ============================================================ */

/* ---- Map (location step) ---- */
.map {
  margin-top: var(--space-4);
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--line);
}

/* Location step: fill all available height */
body.is-location .wrap { padding-top: 20px; padding-bottom: 20px; }
body.is-location form { justify-content: stretch; }
body.is-location .step.is-active { flex: 1; display: flex; flex-direction: column; }
body.is-location .map {
  flex: 1 1 auto;
  height: auto;
  min-height: 220px;
}
.map-disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--field-bg);
  color: var(--muted);
  font-size: 15px;
}
.map-hint {
  color: var(--muted);
  font-size: 13px;
  margin: var(--space-2) 0 0;
}

/* Address autocomplete */
.loc-search { position: relative; }
.ac-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1100;
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--field-bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgb(0 0 0 / .35);
}
.ac-list[hidden] { display: none; }
.ac-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  line-height: 1.35;
  color: var(--fg);
  border-radius: calc(var(--radius) - 6px);
  cursor: pointer;
}
.ac-item:hover { background: var(--accent-soft); }
.ac-title { font-size: 14px; font-weight: 600; }
.ac-sub {
  font-size: 12px;
  color: var(--muted, #8a8a8a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Location selected confirmation */
.loc-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-3);
  padding: 12px 16px;
  border: 1.5px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--fg);
}
.loc-selected[hidden] { display: none; }
.loc-selected .feat-check { color: var(--accent); flex-shrink: 0; }
.loc-text { display: flex; flex-direction: column; min-width: 0; }
.loc-text strong { font-size: 15px; }
.loc-address {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Social step ---- */
.socials { display: flex; flex-direction: column; gap: var(--space-4); }
.social-row { display: flex; flex-direction: column; gap: 8px; }
.social-label { font-size: 15px; font-weight: 600; }

/* GPS button */
.gps-btn {
  margin-top: var(--space-3);
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  background: var(--field-bg);
  color: var(--fg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--ease-fast);
}
.gps-btn:hover { border-color: var(--accent); }

/* Leaflet dark tweaks */
.leaflet-container { background: var(--field-bg); font-family: var(--font-sans); }
.leaflet-control-attribution {
  background: rgb(0 0 0 / .5) !important;
  color: var(--muted) !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }

/* ---- Photo upload grid ---- */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.upload-grid:empty { display: none; }
.upload-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.upload.has-image .upload-inner {
  padding-bottom: var(--space-2);
}

/* ---- Shared bits ---- */
.feat-check {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent);
}
.feat-check svg { display: block; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: var(--fg); }
