/* ── Modal de alta/edición de Lugares ─────────────────────────── */
#place-form-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#place-form-modal.hidden { display: none; }

#place-form-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 420px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

#place-form-content h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #333;
}

#close-place-form {
  float: right;
  padding: 4px 12px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
}

#place-form label {
  display: block;
  font-size: 13px;
  color: #555;
  margin: 10px 0 4px;
}

#place-form input,
#place-form select,
#place-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
}

#place-form textarea { resize: vertical; }

.place-form-row {
  display: flex;
  gap: 10px;
}
.place-form-row > div { flex: 1; }

#place-phones { margin-top: 6px; }

.phone-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}
.phone-row input { flex: 1; }
.phone-row .phone-etiqueta { flex: 1; }
.phone-row .phone-numero { flex: 1; }

.phone-remove-btn {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.phone-remove-btn:hover { background: #e0e0e0; }

#add-phone-row {
  margin-top: 4px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 13px;
}
#add-phone-row:hover { background: #e0e0e0; }

.place-form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.place-form-buttons button {
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 14px;
}
#save-place-btn {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}
#save-place-btn:hover { background: #43a047; }
#cancel-place-form:hover { background: #e0e0e0; }

/* ── Botones Editar/Eliminar dentro del popup de un lugar ─────── */
.place-popup-actions {
  margin-top: 6px;
  text-align: right;
}
.place-popup-btn {
  padding: 3px 10px;
  margin-left: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 12px;
}
.place-popup-btn:hover { background: #e0e0e0; }
.place-popup-btn-danger {
  border-color: #e57373;
  color: #c0392b;
}
.place-popup-btn-danger:hover { background: #fdecea; }

/* ── Chips de teléfono copiables (popup de lugar) ─────────────── */
.phone-copy {
  display: inline-block;
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
  border-radius: 4px;
  padding: 1px 8px;
  font-weight: 600;
  font-size: 13px;
  user-select: text;
}
.phone-label { color: #555; font-size: 12px; }

#place-nearby-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #795548;
}
#place-nearby-warning.hidden { display: none; }

.nearby-list {
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
}
.nearby-item {
  padding: 5px 8px;
  margin-top: 4px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #ffe082;
  background: #fffde7;
  transition: background 0.12s;
}
.nearby-item:hover {
  background: #fff176;
  border-color: #fbc02d;
  color: #4e342e;
}
